aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCockpit/pom.xml136
-rw-r--r--bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml180
-rw-r--r--bpmn/MSOCommonBPMN/pom.xml392
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtil.groovy562
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy)1594
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy931
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtil.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy)6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcess.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy)863
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ConfirmVolumeGroupName.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy)330
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy)395
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateAAIVfModule.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy)1247
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy)668
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateGenericVNFUtils.groovy164
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DeleteAAIVfModule.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy)709
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy)907
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/FalloutHandler.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy)792
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenerateVfModuleName.groovy166
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericDeleteService.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy)611
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericDeleteVnf.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy)554
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericGetService.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy)764
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericGetVnf.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy)549
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericNotificationService.groovy21
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericPutService.groovy280
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericPutVnf.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy)350
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy)1815
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/NetworkUtils.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy)2816
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy)737
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapter.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy)698
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterRestV1.groovy343
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy)1803
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ServiceTaskProcessor.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy)64
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtil.groovy382
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/UpdateAAIGenericVnf.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy)658
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/UpdateAAIVfModule.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy)794
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VfModule.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy)182
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VfModuleBase.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy)1584
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VidUtils.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy)912
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VnfAdapterRestV1.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy)821
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VnfAdapterUtils.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy)153
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/MSOCommonApplication.java59
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/CallbackHeader.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java)10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/ObjectFactory.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java)182
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/RequestHeader.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java)446
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterCallbackRequest.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java)12
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterRequest.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java)4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterResponse.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java)102
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCCallbackAdapterPortType.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java)17
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/package-info.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java)4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/CreateVnfNotification.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java)10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/DeleteVnfNotification.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java)403
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoExceptionCategory.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java)122
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java)228
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java)22
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/QueryVnfNotification.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java)978
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/RollbackVnfNotification.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java)8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/UpdateVnfNotification.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java)10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfAdapterNotify.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java)30
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfAdapterNotify_Service.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java)12
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfRollback.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java)26
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfStatus.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java)122
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/package-info.java (renamed from bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java)4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java)114
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java)238
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/ICryptoHandler.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java)54
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java)535
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java)65
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy)70
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java)595
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowCallbackResponse.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java)104
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContext.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java)192
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java)376
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java141
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java)1252
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java)112
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResponse.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java)138
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/META-INF/persistence.xml (renamed from bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml)74
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml (renamed from bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml)36
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/logback.xml (renamed from bpmn/MSOGammaBPMN/src/main/resources/logback.xml)0
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/processengine.properties20
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/processes.xml81
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn554
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupName.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn)444
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupTenant.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn)10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CreateAAIVfModule.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn)24
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CreateAAIVfModuleVolumeGroup.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn)434
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/DeleteAAIVfModule.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn)24
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn542
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenerateVfModuleName.bpmn87
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn)205
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn)179
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn)636
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn)12
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericNotificationService.bpmn48
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericPutService.bpmn201
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn)10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/PrepareUpdateAAIVfModule.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn)596
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterRestV1.bpmn470
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn550
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/UpdateAAIGenericVnf.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn)418
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/UpdateAAIVfModule.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn)434
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn)62
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/urn.properties29
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl (renamed from bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl)16
-rw-r--r--bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml (renamed from bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml)62
-rw-r--r--bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/jboss-web.xml26
-rw-r--r--bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/web.xml (renamed from bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml)176
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy306
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy201
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy219
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtilTest.groovy66
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/FalloutHandlerTest.groovy311
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoGroovyTest.groovy72
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtilsTest.groovy233
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterTest.groovy948
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtilTest.groovy201
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/VidUtilsTest.groovy972
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java214
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java217
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java133
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java91
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java277
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java136
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java643
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java230
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java279
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java221
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java505
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java191
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java182
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java210
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterCallbackRule.java64
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java403
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java173
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java139
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java389
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java96
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowContextHolderTest.java97
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java1796
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTestTransformer.java21
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySim500Response.xml25
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse_noExtraTag.xml17
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume.xml22
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml22
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ARCHIVE_CAMUNDA_HISTORY-Default Store Procedure.sql140
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ROLLB_ARCHIVE_CAMUNDA_HISTORY-StoreProcedure.sql210
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/drop_mariadb_engine_7.5.6.sql76
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/mariadb_engine_7.5_patch_7.5.6.sql222
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Cleanup/create_mariadb_camunda7.5.6_ee.sql1127
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Upgrade/upgrade_mariadb_camunda7.3.7_to_7.5.6_ee.sql602
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml19
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_200.xml13
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_Fault.xml15
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModuleVolumeGroup_VID_request.json74
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModule_VID_request.json64
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBAdapter.xml1
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml19
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/DeleteVfModule_VID_request.json50
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GENDSI_getServiceInstanceResponse.xml35
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml23
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml90
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml90
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml30
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml34
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml97
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml97
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml15
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1/sdncadapterworkflowrequest.xml32
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1mock/sdncadaptercallbackrequest.xml350
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml78
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml24
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml73
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySim500Response.xml25
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml19
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml29
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/GenericVnf.xml38
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml13
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml13
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml13
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml315
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml141
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIGenericVnfRequest.xml5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIVfModuleRequest.xml10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateVfModuleRequest.xml35
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml55
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml16
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml15
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-new.xml9
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-supercool.xml27
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml25
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/aai-volume-group-id-info.xml28
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/aaiFault.xml15
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfCreateSimResponse.xml29
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfDeleteSimResponse.xml11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfQuerySimResponse.xml20
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfRollbackSimResponse.xml11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/camunda.cfg.xml61
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/logging.properties2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.properties3
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties86
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncCallbackErrorResponse.xml1
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncDeleteResponse.xml212
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest.xml342
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest_404CallBack.xml13
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata-nonfinal.text42
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata.text42
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest-act.xml33
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest.xml32
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/testAsyncResource.bpmn81
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/vnfAdapter/vnfUpdateSimResponse.xml22
-rw-r--r--bpmn/MSOCoreBPMN/pom.xml348
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/CamundaDBSetup.java (renamed from bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java)40
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java144
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java24
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java (renamed from bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java)24
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java486
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java1273
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java4
-rw-r--r--bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml4
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java30
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java106
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java24
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java83
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java539
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java41
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java342
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java20
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java85
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java21
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java58
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java331
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java58
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java339
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java117
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java83
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java5
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java27
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java103
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java88
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java83
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java81
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java533
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java165
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java120
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java114
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java78
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn2
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml26
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/request.json10
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/requestArray.json54
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy530
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy1780
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy776
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy873
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.groovy549
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy264
-rw-r--r--bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy46
-rw-r--r--bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java206
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn1297
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn466
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn463
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn1007
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.bpmn554
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn458
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn1024
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn830
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn1102
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn810
-rw-r--r--bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn287
-rw-r--r--bpmn/MSOInfrastructureBPMN/WebContent/META-INF/MANIFEST.MF (renamed from bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF)6
-rw-r--r--bpmn/MSOInfrastructureBPMN/pom.xml (renamed from bpmn/MSOGammaBPMN/pom.xml)712
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy752
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy453
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy262
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy)137
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy)589
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy)186
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy353
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy468
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy417
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy)73
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy)1105
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy)71
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy1732
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy387
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy549
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy231
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy)1132
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy)279
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy)52
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy458
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy285
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy153
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy1080
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy335
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy420
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy603
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy136
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy256
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy1399
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy304
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy)1712
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/HealchCheckActivate.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy)107
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy452
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy)227
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy331
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy)155
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy443
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy (renamed from bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy)1079
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java (renamed from bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java)116
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java50
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java57
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml37
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml81
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml159
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn1203
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn373
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn336
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn)928
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn)938
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn284
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn331
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn771
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn371
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn)653
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn)1094
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn353
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn372
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn)1972
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleInfra.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn)530
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn)1008
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn1380
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn517
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn390
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn338
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn1167
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn)1167
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn)1326
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn492
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn379
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn282
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn933
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn546
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn332
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn422
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn308
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn263
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn847
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn373
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateVfModule.bpmn (renamed from bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn)1288
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties (renamed from bpmn/MSOGammaBPMN/src/main/resources/urn.properties)59
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml31
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml (renamed from bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml)52
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml74
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy209
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy166
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy218
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy3055
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy93
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java249
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java306
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java220
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java579
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java166
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java200
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java160
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java150
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV1Test.java351
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java119
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java561
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java140
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java116
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceInfraTest.java840
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java145
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java141
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml78
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml62
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml74
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml19
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml62
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml19
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml73
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml95
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml46
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml11
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml11
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml62
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml7
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml38
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json65
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json45
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml31
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBAdapter.xml1
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml7
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml19
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml61
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml73
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json17
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml42
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml26
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml26
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml38
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json64
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml23
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml90
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml90
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml30
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json38
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json39
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json51
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml78
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml24
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml73
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml95
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml20
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml46
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml11
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml44
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json64
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json64
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml29
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/GenericVnf.xml38
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VfModule-new.xml9
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VfModule-supercool.xml27
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml25
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/deleteNetworkResponse_Success.xml3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml61
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/logging.properties2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.properties3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties85
-rw-r--r--bpmn/MSOMockServer/.gitignore4
-rw-r--r--bpmn/MSOMockServer/WebContent/META-INF/MANIFEST.MF (renamed from bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF)0
-rw-r--r--bpmn/MSOMockServer/WebContent/WEB-INF/web.xml3
-rw-r--r--bpmn/MSOMockServer/pom.xml95
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java64
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResource.java207
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java52
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java141
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java130
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseAAI.java787
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java65
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseNetworkAdapter.java93
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSDNCAdapter.java138
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java130
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java148
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterDeleteMockTransformer.java146
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterQueryMockTransformer.java160
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterRollbackMockTransformer.java147
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterUpdateMockTransformer.java148
-rw-r--r--bpmn/MSOMockServer/src/main/resources/__files/sdncSimResponse.xml19
-rw-r--r--bpmn/MSOMockServer/src/main/webapp/WEB-INF/jboss-web.xml6
-rw-r--r--bpmn/MSORESTClient/pom.xml109
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java16
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java8
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java20
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java20
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java20
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java20
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java1068
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java366
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java77
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java20
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java20
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java20
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java20
-rw-r--r--bpmn/MSOURN-plugin/pom.xml141
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPlugin.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java)107
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java)178
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisQueryCommandExecutor.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java)88
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNData.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java)94
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNService.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java)96
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java)194
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResource.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java)85
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResource.java (renamed from bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java)410
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin2
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/mappings.xml64
-rw-r--r--bpmn/MSOURN-plugin/src/main/resources/org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml (renamed from bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml)14
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTest.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java)83
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTestscaffolding.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java)182
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTest.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java)174
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTestscaffolding.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java)156
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTest.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java)70
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTestscaffolding.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java)194
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTest.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java)173
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java)188
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java)80
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java)238
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTest.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java)327
-rw-r--r--bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTestscaffolding.java (renamed from bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java)800
-rw-r--r--bpmn/pom.xml45
540 files changed, 93687 insertions, 46840 deletions
diff --git a/bpmn/MSOCockpit/pom.xml b/bpmn/MSOCockpit/pom.xml
index 939c185950..165c528812 100644
--- a/bpmn/MSOCockpit/pom.xml
+++ b/bpmn/MSOCockpit/pom.xml
@@ -1,66 +1,72 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>bpmn</artifactId>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
<version>1.1.0-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSOCockpit</artifactId>
- <packaging>pom</packaging>
- <name>MSOCockpit</name>
- <description>Builds the Camunda cockpit webapp for MSO</description>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/cockpit-build.xml</descriptor>
- </descriptors>
- <appendAssemblyId>false</appendAssemblyId>
- </configuration>
- <id>cockpit-build</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
-
- <dependency>
- <groupId>org.camunda.bpm.webapp</groupId>
- <artifactId>camunda-webapp-jboss-standalone</artifactId>
- <version>${camunda.version}</version>
- <type>war</type>
- </dependency>
-
- <dependency>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>cockpit-urnmap-plugin</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSOCoreBPMN</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCockpit</artifactId>
+ <packaging>pom</packaging>
+ <name>MSOCockpit</name>
+ <description>Builds the Camunda cockpit webapp for MSO</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/cockpit-build.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ <id>cockpit-build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.camunda.bpm.webapp</groupId>
+ <artifactId>camunda-webapp-jboss-standalone</artifactId>
+ <version>${camunda.version}</version>
+ <type>war</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>cockpit-urnmap-plugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCoreBPMN</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.evosuite</groupId>
+ <artifactId>evosuite-standalone-runtime</artifactId>
+ <version>${evosuiteVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml b/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml
index d623aa585a..b84a84df8a 100644
--- a/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml
+++ b/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml
@@ -1,91 +1,89 @@
-<!--
- ============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=========================================================
- -->
-
-<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
- <id>cockpit-build</id>
-
- <formats>
- <format>war</format>
- </formats>
-
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <dependencySets>
- <dependencySet>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>org.camunda.bpm.webapp:camunda-webapp-jboss-standalone</include>
- </includes>
- <unpack>true</unpack>
- <unpackOptions>
- <excludes>
- <exclude>WEB-INF/applicationContext.xml</exclude>
- <exclude>WEB-INF/web.xml</exclude>
- <exclude>WEB-INF/jboss-deployment-structure.xml</exclude>
- </excludes>
- </unpackOptions>
- <scope>runtime</scope>
- <useProjectArtifact>false</useProjectArtifact>
- </dependencySet>
-
- <!-- Here is where cockpit plugins are embedded -->
-
- <dependencySet>
- <outputDirectory>/WEB-INF/lib</outputDirectory>
- <includes>
- <!-- The URN Mapping plugin -->
- <!-- <include>com.att.camunda.bpm.cockpit.plugin:cockpit-urnmap-plugin</include> -->
-
- <!-- for MSO Logging -->
- <include>org.openecomp.mso:logger</include>
- <include>ch.qos.logback:logback-core</include>
- <include>ch.qos.logback:logback-classic</include>
- <include>com.att.eelf:eelf-core</include>
-
- <!-- Included so the cockpit can deserialize and display core
- class objects, like MSOWorkflowException -->
- <include>org.openecomp.mso:MSOCoreBPMN</include>
- </includes>
- <unpack>false</unpack>
- <scope>runtime</scope>
- <useProjectArtifact>false</useProjectArtifact>
- </dependencySet>
- </dependencySets>
-
- <!-- We provide our own versions of the following files -->
-
- <files>
- <file>
- <source>src/main/resources/WEB-INF/applicationContext.xml</source>
- <outputDirectory>/WEB-INF</outputDirectory>
- </file>
- <file>
- <source>src/main/resources/WEB-INF/web.xml</source>
- <outputDirectory>/WEB-INF</outputDirectory>
- </file>
- <file>
- <source>src/main/resources/WEB-INF/jboss-deployment-structure.xml</source>
- <outputDirectory>/WEB-INF</outputDirectory>
- </file>
- </files>
-</assembly>
+<!--
+ ============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=========================================================
+ -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+ <id>cockpit-build</id>
+
+ <formats>
+ <format>war</format>
+ </formats>
+
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>org.camunda.bpm.webapp:camunda-webapp-jboss-standalone</include>
+ </includes>
+ <unpack>true</unpack>
+ <unpackOptions>
+ <excludes>
+ <exclude>WEB-INF/applicationContext.xml</exclude>
+ <exclude>WEB-INF/web.xml</exclude>
+ <exclude>WEB-INF/jboss-deployment-structure.xml</exclude>
+ </excludes>
+ </unpackOptions>
+ <scope>runtime</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ </dependencySet>
+
+ <!-- Here is where cockpit plugins are embedded -->
+
+ <dependencySet>
+ <outputDirectory>/WEB-INF/lib</outputDirectory>
+ <includes>
+ <!-- The URN Mapping plugin -->
+ <!-- for MSO Logging -->
+ <include>org.openecomp.mso:logger</include>
+ <include>ch.qos.logback:logback-core</include>
+ <include>ch.qos.logback:logback-classic</include>
+ <include>com.att.eelf:eelf-core</include>
+
+ <!-- Included so the cockpit can deserialize and display core
+ class objects, like MSOWorkflowException -->
+ <include>org.openecomp.mso:MSOCoreBPMN</include>
+ </includes>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ </dependencySet>
+ </dependencySets>
+
+ <!-- We provide our own versions of the following files -->
+
+ <files>
+ <file>
+ <source>src/main/resources/WEB-INF/applicationContext.xml</source>
+ <outputDirectory>/WEB-INF</outputDirectory>
+ </file>
+ <file>
+ <source>src/main/resources/WEB-INF/web.xml</source>
+ <outputDirectory>/WEB-INF</outputDirectory>
+ </file>
+ <file>
+ <source>src/main/resources/WEB-INF/jboss-deployment-structure.xml</source>
+ <outputDirectory>/WEB-INF</outputDirectory>
+ </file>
+ </files>
+</assembly>
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
new file mode 100644
index 0000000000..e35c874a4e
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -0,0 +1,392 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>MSOCommonBPMN</artifactId>
+ <name>MSOCommonBPMN</name>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>test-compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <!-- Build MSOCommonBPMN-${version}.jar -->
+ <id>default-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>org/openecomp/mso/bpmn/common/MSOCommonApplication.class</exclude>
+<!-- <exclude>META-INF/</exclude> -->
+ </excludes>
+ </configuration>
+ </execution>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <forceCreation>true</forceCreation>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
+ <type>jar</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>2.5.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <additionalProjectnatures>
+ <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
+ </additionalProjectnatures>
+ <sourceIncludes>
+ <sourceInclude>**/*.groovy</sourceInclude>
+ </sourceIncludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${basedir}/src/main/groovy" />
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
+ <classpath refid="maven.compile.classpath" />
+ </taskdef>
+ <mkdir dir="${project.build.outputDirectory}" />
+ <groovyc destdir="${project.build.outputDirectory}"
+ srcdir="${basedir}/src/main/groovy/" listfiles="true">
+ <classpath refid="maven.compile.classpath" />
+ </groovyc>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${basedir}/src/test/groovy" />
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
+ <classpath refid="maven.test.classpath" />
+ </taskdef>
+ <mkdir dir="${project.build.testOutputDirectory}" />
+ <groovyc destdir="${project.build.testOutputDirectory}"
+ srcdir="${basedir}/src/test/groovy/" listfiles="true">
+ <classpath refid="maven.test.classpath" />
+ </groovyc>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.apache.maven.plugins
+ </groupId>
+ <artifactId>
+ maven-antrun-plugin
+ </artifactId>
+ <versionRange>
+ [1.3,)
+ </versionRange>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <!-- process engine, in compile scope to include it in the war file -->
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine</artifactId>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- Using the `DefaultEjbProcessApplication` result in: `java.sql.SQLException:
+ You cannot commit during a managed transaction!` -->
+ <dependency>
+ <!-- CDI integration, needs to be included in WAR, otherwise CDI can not
+ work correctly -->
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-cdi</artifactId>
+ </dependency>
+
+ <dependency>
+ <!-- AssertJ Testing Library -->
+ <groupId>org.camunda.bpm.extension</groupId>
+ <artifactId>camunda-bpm-assert</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.10.19</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <!-- Optional Plugin for Camunda BPM Workbench -->
+ <groupId>org.camunda.bpm.workbench</groupId>
+ <artifactId>camunda-workbench-dist-embeddable</artifactId>
+ <version>1.0.0-alpha8</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Spin dataformat support, in compile scope to include it in the war
+ file -->
+ <dependency>
+ <groupId>org.camunda.spin</groupId>
+ <artifactId>camunda-spin-dataformat-all</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-plugin-spin</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-plugin-connect</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <!-- Bootstrap for styling via Webjars project -->
+ <groupId>org.webjars</groupId>
+ <artifactId>bootstrap</artifactId>
+ <version>2.3.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-client</artifactId>
+ <version>3.0.19.Final</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <!-- Needed for InMemoryH2Test -->
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.uuid</groupId>
+ <artifactId>java-uuid-generator</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCoreBPMN</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <!-- unit test utilities -->
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCoreBPMN</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <!-- for encoding the url the same way A&AI does -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>4.3.2.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOMockServer</artifactId>
+ <version>${project.version}</version>
+ <classifier>classes</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSORESTClient</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.github.tomakehurst</groupId>
+ <artifactId>wiremock</artifactId>
+ <version>1.56</version>
+ <scope>test</scope>
+ <classifier>standalone</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.skyscreamer</groupId>
+ <artifactId>jsonassert</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.jayway.jsonpath</groupId>
+ <artifactId>json-path</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.sf.jopt-simple</groupId>
+ <artifactId>jopt-simple</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtil.groovy
new file mode 100644
index 0000000000..95a577c946
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtil.groovy
@@ -0,0 +1,562 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class AaiUtil {
+
+ public MsoUtils utils = new MsoUtils()
+ public static final String AAI_NAMESPACE_STRING = 'http://org.openecomp.aai.inventory/'
+ public static final String DEFAULT_VERSION_KEY = 'URN_mso_workflow_global_default_aai_version'
+
+ private AbstractServiceTaskProcessor taskProcessor
+
+ public AaiUtil(AbstractServiceTaskProcessor taskProcessor) {
+ this.taskProcessor = taskProcessor
+ }
+
+ public String getNetworkGenericVnfEndpoint(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String endpoint = execution.getVariable("URN_aai_endpoint")
+ def uri = getNetworkGenericVnfUri(execution)
+ taskProcessor.logDebug('AaiUtil.getNetworkGenericVnfEndpoint() - AAI endpoint: ' + endpoint + uri, isDebugLogEnabled)
+ return endpoint + uri
+ }
+
+ public String getNetworkGenericVnfUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'generic_vnf')
+ taskProcessor.logDebug('AaiUtil.getNetworkGenericVnfUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getNetworkVpnBindingUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'vpn_binding')
+ taskProcessor.logDebug('AaiUtil.getNetworkVpnBindingUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getNetworkPolicyUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'network_policy')
+ taskProcessor.logDebug('AaiUtil.getNetworkPolicyUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getNetworkTableReferencesUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'route_table_reference')
+ taskProcessor.logDebug('AaiUtil.getNetworkTableReferencesUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getNetworkVceUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'vce')
+ taskProcessor.logDebug('AaiUtil.getNetworkVceUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getNetworkL3NetworkUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'l3_network')
+ taskProcessor.logDebug('AaiUtil.getNetworkL3NetworkUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getBusinessCustomerUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'customer')
+ taskProcessor.logDebug('AaiUtil.getBusinessCustomerUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ //public String getBusinessCustomerUriv7(Execution execution) {
+ // def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ // //def uri = getUri(execution, BUSINESS_CUSTOMERV7)
+ // def uri = getUri(execution, 'Customer')
+ // taskProcessor.logDebug('AaiUtil.getBusinessCustomerUriv7() - AAI URI: ' + uri, isDebugLogEnabled)
+ // return uri
+ //}
+
+ public String getCloudInfrastructureCloudRegionEndpoint(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String endpoint = execution.getVariable("URN_aai_endpoint")
+ def uri = getCloudInfrastructureCloudRegionUri(execution)
+ taskProcessor.logDebug('AaiUtil.getCloudInfrastructureCloudRegionEndpoint() - AAI endpoint: ' + endpoint + uri, isDebugLogEnabled)
+ return endpoint + uri
+ }
+
+ public String getCloudInfrastructureCloudRegionUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'cloud_region')
+ taskProcessor.logDebug('AaiUtil.getCloudInfrastructureCloudRegionUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getCloudInfrastructureTenantUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'tenant')
+ taskProcessor.logDebug('AaiUtil.getCloudInfrastructureTenantUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getSearchNodesQueryUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'nodes_query')
+ taskProcessor.logDebug('AaiUtil.getSearchNodesQueryUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getSearchNodesQueryEndpoint(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String endpoint = execution.getVariable("URN_aai_endpoint")
+ def uri = getSearchNodesQueryUri(execution)
+ taskProcessor.logDebug('AaiUtil.getSearchNodesQueryEndpoint() - AAI endpoint: ' + endpoint + uri, isDebugLogEnabled)
+ return endpoint + uri
+ }
+
+ public String getSearchGenericQueryUri(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def uri = getUri(execution, 'generic_query')
+ taskProcessor.logDebug('AaiUtil.getSearchGenericQueryUri() - AAI URI: ' + uri, isDebugLogEnabled)
+ return uri
+ }
+
+ public String getVersion(Execution execution, resourceName, processKey) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+
+ resourceName = resourceName.replaceAll('-', '_')
+
+ def versionWithResourceKey = "URN_mso_workflow_default_aai_${resourceName}_version"
+ def versionWithProcessKey = "URN_mso_workflow_custom_${processKey}_aai_version"
+
+ def version = execution.getVariable(versionWithProcessKey)
+ if (version) {
+ taskProcessor.logDebug("AaiUtil.getVersion() - using flow specific ${versionWithProcessKey}=${version}", isDebugLogEnabled)
+ return version
+ }
+
+ version = execution.getVariable(versionWithResourceKey)
+ if (version) {
+ taskProcessor.logDebug("AaiUtil.getVersion() - using resource specific ${versionWithResourceKey}=${version}", isDebugLogEnabled)
+ return version
+ }
+
+ version = execution.getVariable(DEFAULT_VERSION_KEY)
+ if (version) {
+ taskProcessor.logDebug("AaiUtil.getVersion() - using default version ${DEFAULT_VERSION_KEY}=${version}", isDebugLogEnabled)
+ return version
+ }
+
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 9999, "Internal Error: One of the following should be defined in MSO URN properties file: ${versionWithResourceKey}, ${versionWithProcessKey}, ${DEFAULT_VERSION_KEY}")
+ }
+
+ public String getUri(Execution execution, resourceName) {
+
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def processKey = taskProcessor.getMainProcessKey(execution)
+
+ resourceName = resourceName.replaceAll('-', '_')
+
+ // Check for flow+resource specific first
+ def key = "URN_mso_workflow_${processKey}_aai_${resourceName}_uri"
+ def uri = execution.getVariable(key)
+ if(uri) {
+ taskProcessor.logDebug("AaiUtil.getUri() - using flow+resource specific key: ${key}=${uri}", isDebugLogEnabled)
+ return uri
+ }
+
+ // Check for versioned key
+ def version = getVersion(execution, resourceName, processKey)
+ key = "URN_mso_workflow_default_aai_v${version}_${resourceName}_uri"
+ uri = execution.getVariable(key)
+
+ if(uri) {
+ taskProcessor.logDebug("AaiUtil.getUri() - using versioned URI key: ${key}=${uri}", isDebugLogEnabled)
+ return uri
+ }
+
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 9999, 'Internal Error: AAI URI entry for ' + key + ' not defined in the MSO URN properties file')
+ }
+
+ public String getNamespaceFromUri(String uri) {
+ String namespace = AAI_NAMESPACE_STRING
+ if(uri!=null){
+ return namespace + uri.substring(uri.indexOf("v"), uri.indexOf("v")+2)
+ }else{
+ return namespace
+ }
+ }
+
+
+
+ /**
+ * This reusable method can be used for making AAI Get Calls. The url should
+ * be passed as a parameter along with the execution. The method will
+ * return an APIResponse.
+ *
+ * @param execution
+ * @param url
+ *
+ * @return APIResponse
+ */
+ public APIResponse executeAAIGetCall(Execution execution, String url){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ taskProcessor.logDebug(" ======== STARTED Execute AAI Get Process ======== ", isDebugEnabled)
+ try{
+ String uuid = UUID.randomUUID()
+ taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+ taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml");
+
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+
+ APIResponse apiResponse = client.get()
+ return apiResponse
+
+ }catch(Exception e){
+ taskProcessor.logDebug("Exception occured while executing AAI Get Call. Exception is: \n" + e, isDebugEnabled)
+ return e
+ }
+ taskProcessor.logDebug( "======== COMPLETED Execute AAI Get Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * This reusable method can be used for making AAI httpPut Calls. The url should
+ * be passed as a parameter along with the execution and payload. The method will
+ * return an APIResponse.
+ *
+ * @param execution
+ * @param url
+ * @param payload
+ *
+ * @return APIResponse
+ */
+ public APIResponse executeAAIPutCall(Execution execution, String url, String payload){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ taskProcessor.logDebug( " ======== Started Execute AAI Put Process ======== ", isDebugEnabled)
+ try{
+ String uuid = UUID.randomUUID()
+ taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+ taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+ 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 apiResponse = client.httpPut(payload)
+
+ return apiResponse
+ }catch(Exception e){
+ taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Put Call. Exception is: \n" + e, isDebugEnabled)
+ return e
+ }
+ taskProcessor.logDebug( "======== Completed Execute AAI Put Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * This reusable method can be used for making AAI httpPatch Calls. The url should
+ * be passed as a parameter along with the execution and payload. The method will
+ * return an APIResponse.
+ *
+ * @param execution
+ * @param url
+ * @param payload
+ *
+ * @return APIResponse
+ */
+ public APIResponse executeAAIPatchCall(Execution execution, String url, String payload){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ taskProcessor.logDebug( " ======== Started Execute AAI Patch Process ======== ", isDebugEnabled)
+ try{
+ String uuid = UUID.randomUUID()
+ taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+
+ taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Content-Type", "application/merge-patch+json").addHeader("Accept","application/json");
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ APIResponse apiResponse = client.httpPatch(payload)
+
+ return apiResponse
+ }catch(Exception e){
+ taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Patch Call. Exception is: \n" + e, isDebugEnabled)
+ return e
+ }
+ taskProcessor.logDebug( "======== Completed Execute AAI Patch Process ======== ", isDebugEnabled)
+ }
+
+
+ /**
+ * This reusable method can be used for making AAI Delete Calls. The url should
+ * be passed as a parameter along with the execution. The method will
+ * return an APIResponse.
+ *
+ * @param execution
+ * @param url
+ *
+ * @return APIResponse
+ */
+ public APIResponse executeAAIDeleteCall(Execution execution, String url){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ taskProcessor.logDebug( " ======== Started Execute AAI Delete Process ======== ", isDebugEnabled)
+ try{
+ String uuid = UUID.randomUUID()
+ taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+ taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml");
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ APIResponse apiResponse = client.delete()
+
+ return apiResponse
+
+ }catch(Exception e){
+ taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Delete Call. Exception is: \n" + e, isDebugEnabled)
+ return e
+ }
+ taskProcessor.logDebug( "======== Completed Execute AAI Delete Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * This reusable method can be used for making AAI Delete Calls. The url should
+ * be passed as a parameter along with the execution. The method will
+ * return an APIResponse.
+ *
+ * @param execution
+ * @param url
+ * @param payload
+ *
+ * @return APIResponse
+ */
+ public APIResponse executeAAIDeleteCall(Execution execution, String url, String payload, String authHeader){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ taskProcessor.logDebug( " ======== Started Execute AAI Delete Process ======== ", isDebugEnabled)
+ try{
+ String uuid = UUID.randomUUID()
+ taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+ taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml").addAuthorizationHeader(authHeader);
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+
+ APIResponse apiResponse = client.httpDelete(payload)
+
+ return apiResponse
+
+ }catch(Exception e){
+ taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Delete Call. Exception is: \n" + e, isDebugEnabled)
+ return e
+ }
+ taskProcessor.logDebug( "======== Completed Execute AAI Delete Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * This reusable method can be used for making AAI Post Calls. The url should
+ * be passed as a parameter along with the execution. The method will
+ * return an APIResponse.
+ *
+ * @param execution
+ * @param url
+ * @param payload
+ *
+ * @return APIResponse
+ */
+ public APIResponse executeAAIPostCall(Execution execution, String url, String payload){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ taskProcessor.logDebug( " ======== Started Execute AAI Post Process ======== ", isDebugEnabled)
+ try{
+ String uuid = UUID.randomUUID()
+ taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+ taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml");
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ APIResponse apiResponse = client.httpPost(payload)
+
+ return apiResponse
+
+ }catch(Exception e){
+ taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Post Call. Exception is: \n" + e, isDebugEnabled)
+ return e
+ }
+ taskProcessor.logDebug( "======== Completed Execute AAI Post Process ======== ", isDebugEnabled)
+ }
+
+ /** Utilitty to get the Cloud Region from AAI
+ * Returns String cloud region id, (ie, cloud-region-id)
+ * @param execution
+ * @param url - url for AAI get cloud region
+ * @param backend - "PO" - real region, or "SDNC" - v2.5 (fake region).
+ */
+
+ //TODO: We should refactor this method to return WorkflowException instead of Error. Also to throw MSOWorkflowException which the calling flow will then catch.
+
+ public String getAAICloudReqion(Execution execution, String url, String backend, inputCloudRegion){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ try {
+ APIResponse apiResponse = executeAAIGetCall(execution, url)
+ String returnCode = apiResponse.getStatusCode()
+ String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+ taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region Return code: " + returnCode, isDebugEnabled)
+ execution.setVariable(execution.getVariable("prefix")+"queryCloudRegionReturnCode", returnCode)
+ //taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region Response: " + aaiResponseAsString, isDebugEnabled)
+ //execution.setVariable(execution.getVariable("prefix")+"queryCloudRegionResponse", aaiResponseAsString)
+ String regionId = ""
+ if (returnCode == "200") {
+ taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region is Successful.", isDebugEnabled)
+ try {
+ String regionVersion = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-version")
+ taskProcessor.utils.log("DEBUG", "Cloud Region Version from AAI for " + backend + " is: " + regionVersion, isDebugEnabled)
+ if (backend == "PO") {
+ regionId = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-id")
+ } else { // backend not "PO"
+ if (regionVersion == "2.5" ) {
+ regionId = "AAIAIC25"
+ } else {
+ regionId = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-id")
+ }
+ }
+
+ taskProcessor.utils.log("DEBUG", "Cloud Region Id from AAI " + backend + " is: " + regionId, isDebugEnabled)
+ return regionId
+
+ } catch (Exception e) {
+ taskProcessor.utils.log("ERROR", "Exception occured while getting the Cloud Reqion. Exception is: \n" + e, isDebugEnabled)
+ return "ERROR"
+ }
+ } else { // not 200
+ if (returnCode == "404") {
+ if (backend == "PO") {
+ regionId = inputCloudRegion
+ } else { // backend not "PO"
+ regionId = "AAIAIC25"
+ }
+ taskProcessor.utils.log("DEBUG", "Cloud Region value for code='404' of " + backend + " is: " + regionId, isDebugEnabled)
+ return regionId
+ } else {
+ taskProcessor.utils.log("ERROR", "Call AAI Cloud Region is NOT Successful.", isDebugEnabled)
+ return "ERROR"
+ }
+ }
+ }catch(Exception e) {
+ taskProcessor.utils.log("ERROR", "Exception occured while getting the Cloud Reqion. Exception is: \n" + e, isDebugEnabled)
+ return "ERROR"
+ }
+ }
+
+ /* returns xml Node with service-type of searchValue */
+ def searchServiceType(xmlInput, searchValue){
+ def fxml= new XmlSlurper().parseText(xmlInput)
+ def ret = fxml.'**'.find {it.'service-type' == searchValue}
+ return ret
+ }
+
+ /* returns xml Node with service-instance-id of searchValue */
+ def searchServiceInstanceId(xmlInput, searchValue){
+ def ret = xmlInput.'**'.find {it.'service-instance-id' == searchValue}
+ return ret
+ }
+
+
+ /**
+ * Get the lowest unused VF Module index from AAI response for a given module type. The criteria for
+ * determining module type is specified by "key" parameter (for example, "persona-model-id"),
+ * the value for filtering is specified in "value" parameter
+ *
+ * @param execution
+ * @param aaiVnfResponse
+ * @param key
+ * @param value
+ *
+ * @return moduleIndex
+ *
+ */
+ public int getLowestUnusedVfModuleIndexFromAAIVnfResponse(Execution execution, String aaiVnfResponse, String key, String value) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ if (aaiVnfResponse != null) {
+ String vfModulesText = taskProcessor.utils.getNodeXml(aaiVnfResponse, "vf-modules")
+ if (vfModulesText == null || vfModulesText.isEmpty()) {
+ taskProcessor.utils.log("DEBUG", "There are no VF modules in this VNF yet", isDebugEnabled)
+ return 0
+ }
+ else {
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ int vfModulesSize = 0
+ if (vfModules != null) {
+ vfModulesSize = vfModules.size()
+ }
+ String matchingVfModules = "<vfModules>"
+ for (i in 0..vfModulesSize-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+ def keyFromAAI = taskProcessor.utils.getNodeText(vfModuleXml, key)
+ if (keyFromAAI != null && keyFromAAI.equals(value)) {
+ matchingVfModules = matchingVfModules + taskProcessor.utils.removeXmlPreamble(vfModuleXml)
+ }
+ }
+ matchingVfModules = matchingVfModules + "</vfModules>"
+ taskProcessor.utils.log("DEBUG", "Matching VF Modules: " + matchingVfModules, isDebugEnabled)
+ String lowestUnusedIndex = taskProcessor.utils.getLowestUnusedIndex(matchingVfModules)
+ return Integer.parseInt(lowestUnusedIndex)
+ }
+ }
+ else {
+ return 0
+ }
+ }
+
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
index 168cf0bc41..d7aa97906c 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
@@ -1,874 +1,720 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import javax.xml.transform.Transformer
-import javax.xml.transform.TransformerException;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.impl.core.variable.value.ObjectValueImpl
-import org.camunda.bpm.engine.runtime.Execution
-import org.camunda.bpm.engine.variable.VariableMap
-
-
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.gamma.workflow.service.WorkflowCallbackResponse
-import org.openecomp.mso.bpmn.gamma.workflow.service.WorkflowContextHolder
-
-import groovy.json.JsonSlurper
-
-import org.openecomp.mso.rest.APIResponse;
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import org.camunda.bpm.engine.variable.VariableMap;
-import org.camunda.bpm.engine.variable.Variables;
-import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats;
-import org.w3c.dom.Node;
-
-public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcessor {
- public MsoUtils utils = new MsoUtils()
-
-
- /**
- * Logs a message at the ERROR level.
- * @param message the message
- */
- public void logError(String message) {
- log('ERROR', message, null, "true")
- }
-
- /**
- * Logs a message at the ERROR level.
- * @param message the message
- * @param cause the cause (stracktrace will be included in the output)
- */
- public void logError(String message, Throwable cause) {
- log('ERROR', message, cause, "true")
- }
-
- /**
- * Logs a message at the WARN level.
- * @param message the message
- */
- public void logWarn(String message) {
- log('WARN', message, null, "true")
- }
-
- /**
- * Logs a message at the WARN level.
- * @param message the message
- * @param cause the cause (stracktrace will be included in the output)
- */
- public void logWarn(String message, Throwable cause) {
- log('WARN', message, cause, "true")
- }
-
- /**
- * Logs a message at the INFO level.
- * @param message the message
- */
- public void logInfo(String message) {
- log('INFO', message, null, "true")
- }
-
- /**
- * Logs a message at the INFO level.
- * @param message the message
- * @param cause the cause (stracktrace will be included in the output)
- */
- public void logInfo(String message, Throwable cause) {
- log('INFO', message, cause, "true")
- }
-
- /**
- * Logs a message at the DEBUG level.
- * @param message the message
- * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
- */
- public void logDebug(String message, String isDebugLogEnabled) {
- log('DEBUG', message, null, isDebugLogEnabled)
- }
-
- /**
- * Logs a message at the DEBUG level.
- * @param message the message
- * @param cause the cause (stracktrace will be included in the output)
- * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
- */
- public void logDebug(String message, Throwable cause, String isDebugLogEnabled) {
- log('DEBUG', message, cause, isDebugLogEnabled)
- }
-
- /**
- * Logs a message at the specified level.
- * @param level the level (DEBUG, INFO, WARN, ERROR)
- * @param message the message
- * @param isLevelEnabled a flag indicating if the level is enabled
- * (used only at the DEBUG level)
- */
- public void log(String level, String message, String isLevelEnabled) {
- log(level, message, null, isLevelEnabled)
- }
-
- /**
- * Logs a message at the specified level.
- * @param level the level (DEBUG, INFO, WARN, ERROR)
- * @param message the message
- * @param cause the cause (stracktrace will be included in the output)
- * @param isLevelEnabled a flag indicating if the level is enabled
- * (used only at the DEBUG level)
- */
- public void log(String level, String message, Throwable cause, String isLevelEnabled) {
- if (cause == null) {
- utils.log(level, message, isLevelEnabled);
- } else {
- StringWriter stringWriter = new StringWriter();
- PrintWriter printWriter = new PrintWriter(stringWriter);
- printWriter.println(message);
- cause.printStackTrace(printWriter);
- utils.log(level, stringWriter.toString(), isLevelEnabled);
- printWriter.close();
- }
- }
-
- /**
- * Logs a WorkflowException at the ERROR level with the specified message.
- * @param execution the execution
- */
- public void logWorkflowException(Execution execution, String message) {
- def workflowException = execution.getVariable("WorkflowException")
-
- if (workflowException == null) {
- logError(message);
- } else {
- logError(message + ": " + workflowException)
- }
- }
-
- /**
- * Saves the WorkflowException in the execution to the specified variable,
- * clearing the WorkflowException variable so the workflow can continue
- * processing (perhaps catching another WorkflowException).
- * @param execution the execution
- * @return the name of the destination variable
- */
- public saveWorkflowException(Execution execution, String variable) {
- if (variable == null) {
- throw new NullPointerException();
- }
-
- execution.setVariable(variable, execution.getVariable("WorkflowException"))
- execution.setVariable("WorkflowException", null)
- }
-
- /**
- * Builds a success response from the specified message content and numeric
- * response code. The response code may be an integer or a string representation
- * of an integer. The response is stored in the execution where it may be
- * picked up by the Workflow service.
- * <p>
- * IMPORTANT: the activity that executes this method should have an
- * asynchronous continuation after it to ensure the execution variables
- * are persisted to the database.
- * @param execution the execution
- * @param content the message content
- * @param responseCode the message response code
- */
- @Deprecated
- public void buildResponse(Execution execution, String content, Object responseCode) {
- buildResponse(execution, content, responseCode, true)
- }
-
- /**
- * Builds a standard error response containing the specified error message and
- * numeric response code. The response code may be an integer or a string
- * representation of an integer. The response is stored in the execution where
- * it may be picked up by the Workflow service.
- * <p>
- * IMPORTANT: the activity that executes this method should have an
- * asynchronous continuation after it to ensure the execution variables
- * are persisted to the database.
- * @param execution the execution
- * @param content the message content
- * @param errorCode the message response code
- */
- @Deprecated
- public void buildErrorResponse(Execution execution, String errorMessage, Object errorCode) {
-
- def encErrorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
-
- def content = """
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${encErrorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- """
-
- buildResponse(execution, content, errorCode, false)
- }
-
- // BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
- /**
- * Builds a standard error response containing the specified error message
- * and a numeric response code. The response code is obtained from the
- * prefix+"ResponseCode" execution variable. The response is stored in the
- * execution where it may be picked up by the Workflow service.
- * <p>
- * IMPORTANT: the activity that executes this method should have an
- * asynchronous continuation after it to ensure the execution variables
- * are persisted to the database.
- * <p>
- * This method is deprecated. Methods that accept a response code should
- * be used instead.
- * @param execution the execution
- * @param errorMessage the error message for the error response
- */
- @Deprecated
- public void buildErrorResponse(Execution execution, String errorMessage) {
- buildErrorResponse(execution, errorMessage, null)
- }
- // END LEGACY SUPPORT. TODO: REMOVE THIS CODE
-
- /**
- * Builds a response from the specified message content and numeric response
- * code. The response code may be an integer or a string representation of
- * an integer. The response is stored in the execution where it may be
- * picked up by the Workflow service.
- * <p>
- * IMPORTANT: the activity that executes this method should have an
- * asynchronous continuation after it to ensure the execution variables
- * are persisted to the database.
- * @param execution the execution
- * @param content the message content
- * @param responseCode the message response code
- * @param isSuccess true if this is a success response
- */
- @Deprecated
- protected void buildResponse(Execution execution, String content, Object responseCode,
- boolean isSuccess) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-
- String processKey = getProcessKey(execution);
- logDebug("Building " + processKey + " response", isDebugLogEnabled)
-
- Map<String, Object> responseMap = new HashMap<String, Object>()
-
- if (isSuccess) {
- responseMap.put("Status", "Success")
- } else {
- responseMap.put("Status", "Fail")
- }
-
- // BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
- def prefix = execution.getVariable("prefix")
-
- if (responseCode == null) {
- responseCode = execution.getVariable(prefix+"ResponseCode")
- } else {
- execution.setVariable(prefix+"ResponseCode", String.valueOf(responseCode))
- }
- // END LEGACY SUPPORT. TODO: REMOVE THIS CODE
-
- responseMap.put("ResponseCode", String.valueOf(responseCode))
-
- if (isSuccess) {
- responseMap.put("Status", "Success")
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
- execution.setVariable("WorkflowResponse", content)
- // BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
- execution.setVariable(processKey+"Response", content)
- execution.setVariable(prefix+"ErrorResponse", null)
- // END LEGACY SUPPORT. TODO: REMOVE THIS CODE
- } else {
- responseMap.put("Status", "Fail")
- // BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
- execution.setVariable(prefix+"ErrorResponse", content)
- execution.setVariable(prefix+"Response", null)
- // END LEGACY SUPPORT. TODO: REMOVE THIS CODE
- }
-
- responseMap.put("Response", content)
-
- logDebug(processKey
- + " ResponseCode=" + responseMap.get("ResponseCode")
- + " Status=" + responseMap.get("Status")
- + " Response=\n" + responseMap.get("Response"),
- isDebugLogEnabled)
-
- execution.setVariable(processKey + "ResponseMap", responseMap)
- }
-
- /**
- * Builds an error response (if one has not already been built) and throws
- * a BpmnError of type "MSOWorkflowException" that can be caught as a
- * boundary event.
- * @param execution the execution
- * @param errorMessage the error message for the error response
- * @param responseCode the message response code
- */
- @Deprecated
- public void workflowException(Execution execution, String errorMessage, Object responseCode) {
- String processKey = getProcessKey(execution);
-
- buildErrorResponse(execution, errorMessage, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
-
- /**
- * Puts a WorkflowException into the execution
- * @param execution the execution
- * @param errorCode the error code (normally a 4-digit number)
- * @param errorMessage the error message
- */
- @Deprecated
- public void newWorkflowException(Execution execution, int errorCode, String errorMessage) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- logDebug("Building a " + processKey + " WorkflowException", isDebugLogEnabled)
-
- if (errorCode < 1000) {
- throw new IllegalArgumentException("ErrorCode must be a number greater than 1000");
- }
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- }
-
- /**
- * Puts a WorkflowException into the execution and throws an MSOWorkflowException event.
- * @param execution the execution
- * @param errorCode the error code (normally a 4-digit number)
- * @param errorMessage the error message
- */
- // TODO: rename this method to be throwWorkflowException
- @Deprecated
- public void createWorkflowException(Execution execution, int errorCode, String errorMessage) {
- newWorkflowException(execution, errorCode, errorMessage)
- throw new BpmnError("MSOWorkflowException", "errorCode:" + errorCode + ", errorMessage:" + errorMessage)
- }
-
- /**
- * Puts a WorkflowException into the execution and throws an MSOWorkflowException event.
- * @param execution the execution
- * @param errorCode the error code (normally a 4-digit number)
- * @param errorMessage the error message
- */
- @Deprecated
- public void commonWorkflowException(Execution execution, int errorCode, String errorMessage) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- logDebug("Building a " + processKey + " WorkflowException", isDebugLogEnabled)
- logError(errorMessage)
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- throw new BpmnError("MSOWorkflowException","errorCode:" + errorCode + ",errorMessage:" + errorMessage)
- }
-
- /**
- * Puts a WorkflowException into the execution and throws an MSOWorkflowException event.
- * @param execution the execution
- * @param errorCode the error code (normally a 4-digit number)
- * @param errorMessage the error message
- */
- @Deprecated
- public void commonWorkflowException(Execution execution, String errorCode, String errorMessage) {
- int intRespCode
- try{
- intRespCode = Integer.parseInt(errorCode)
- }catch (Exception e){
- intRespCode = 400
- }
- commonWorkflowException(execution, intRespCode, errorMessage)
- }
-
-
-
- /**
- * Validates that the request exists and that the att-mso-request-id variable is set.
- * Additional required variables may be checked by specifying their names.
- * NOTE: services requiring att-mso-service-instance-id must specify it explicitly!
- * If a problem is found, buildAndThrowWorkflowException builds a WorkflowException
- * and throws an MSOWorkflowException. This method also sets up the log context for
- * the workflow.
- *
- * @param execution the execution
- * @return the validated request
- */
- public String validateRequest(Execution execution, String... requiredVariables) {
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- def method = getClass().getSimpleName() + '.validateRequest(' +
- 'execution=' + execution.getId() +
- ', requredVariables=' + requiredVariables +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- 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")
- }
-
- // All requests must have a request ID.
- // Some requests (e.g. SDN-MOBILITY) do not have a service instance ID.
-
- String requestId = null
- String serviceInstanceId = null
-
- List<String> allRequiredVariables = new ArrayList<String>()
- allRequiredVariables.add("att-mso-request-id")
-
- if (requiredVariables != null) {
- for (String variable : requiredVariables) {
- if (!allRequiredVariables.contains(variable)) {
- allRequiredVariables.add(variable)
- }
- }
- }
-
- for (String variable : allRequiredVariables) {
- def value = execution.getVariable(variable)
- if (value == null || ((value instanceof CharSequence) && value.length() == 0)) {
- exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey +
- " request was received with no '" + variable + "' variable")
- }
-
- if ("att-mso-request-id".equals(variable)) {
- requestId = (String) value
- } else if ("att-mso-service-instance-id".equals(variable)) {
- serviceInstanceId = (String) value
- }
- }
-
- if (serviceInstanceId == null) {
- serviceInstanceId = (String) execution.getVariable("att-mso-service-instance-id")
- }
-
- utils.logContext(requestId, serviceInstanceId)
- logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
- logDebug('Exited ' + method, isDebugLogEnabled)
- return request
- } catch (BpmnError e) {
- throw e
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
- }
- }
-
- /**
- * gets vars stored in a JSON object in prefix+Request and returns as a LazyMap
- * setting log context here too
- * @param execution the execution
- * @return the inputVars
- */
- public Map validateJSONReq(Execution execution) {
- def method = getClass().getSimpleName() + '.validateJSONReq(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- String processKey = getProcessKey(execution);
- def prefix = execution.getVariable("prefix")
-
- def requestId =getVariable(execution, "att-mso-request-id")
- def serviceInstanceId = getVariable(execution, "att-mso-service-instance-id")
- if(requestId!=null && serviceInstanceId!=null){
- utils.logContext(requestId, serviceInstanceId)
- }
-
-
- def request = getVariable(execution, prefix + 'Request')
-
- if (request == null) {
- request = getVariable(execution, processKey + 'Request')
-
- if (request == null) {
- request = getVariable(execution, 'bpmnRequest')
- }
- execution.setVariable(prefix + 'Request', request)
- }
-
- def jsonSlurper = new JsonSlurper()
- def parsed = jsonSlurper.parseText(request)
-
-
- logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
- logDebug('Exited ' + method, isDebugLogEnabled)
- return parsed
-
- }
-
-
-
-
- /**
- * Sends a response to the workflow service that invoked the process. This method
- * may only be used by top-level processes that were directly invoked by the
- * asynchronous workflow service.
- * @param execution the execution
- * @param responseCode the response code
- * @param content the message content
- * @throws IllegalArgumentException if the response code is invalid
- * by HTTP standards
- * @throws UnsupportedOperationException if not invoked by an asynchronous,
- * top-level process
- * @throws IllegalStateException if a response has already been sent
- */
- protected void sendWorkflowResponse(Execution execution, Object responseCode, String response) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- try {
- String processKey = getProcessKey(execution);
-
- // isAsyncProcess is injected by the workflow service that started the flow
- if (!String.valueOf(execution.getVariable("isAsyncProcess")).equals("true")) {
- throw new UnsupportedOperationException(processKey + ": " +
- "sendWorkflowResponse is valid only in asynchronous workflows");
- }
-
- if (String.valueOf(execution.getVariable(processKey + "WorkflowResponseSent")).equals("true")) {
- logDebug("Sync response has already been sent for " + processKey, isDebugLogEnabled)
- }else{
-
- logDebug("Building " + processKey + " response ", isDebugLogEnabled)
-
- int intResponseCode;
-
- try {
- intResponseCode = Integer.parseInt(String.valueOf(responseCode));
-
- if (intResponseCode < 100 || intResponseCode > 599) {
- throw new NumberFormatException(String.valueOf(responseCode));
- }
- } catch (NumberFormatException e) {
- throw new IllegalArgumentException("Process " + processKey
- + " provided an invalid HTTP response code: " + responseCode);
- }
-
- // Only 2XX responses are considered "Success"
- String status = (intResponseCode >= 200 && intResponseCode <= 299) ?
- "Success" : "Fail";
-
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
- execution.setVariable(processKey + "ResponseCode", String.valueOf(intResponseCode))
- execution.setVariable(processKey + "Response", response);
- execution.setVariable(processKey + "Status", status);
- execution.setVariable("WorkflowResponse", response)
-
- logDebug("Sending response for " + processKey
- + " ResponseCode=" + intResponseCode
- + " Status=" + status
- + " Response=\n" + response,
- isDebugLogEnabled)
-
- // TODO: ensure that this flow was invoked asynchronously?
-
- WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse()
- callbackResponse.setStatusCode(intResponseCode)
- callbackResponse.setMessage(status)
- callbackResponse.setResponse(response)
-
- // TODO: send this data with HTTP POST
-
- WorkflowContextHolder.getInstance().processCallback(
- processKey,
- execution.getProcessInstanceId(),
- execution.getVariable("att-mso-request-id"),
- callbackResponse)
-
- execution.setVariable(processKey + "WorkflowResponseSent", "true");
- }
-
- } catch (Exception ex) {
- logError("Unable to send workflow response to client ....", ex)
- }
- }
-
- /**
- * Returns true if a workflow response has already been sent.
- * @param execution the execution
- */
- protected boolean isWorkflowResponseSent(Execution execution) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- return String.valueOf(execution.getVariable(processKey + "WorkflowResponseSent")).equals("true");
- }
-
- /**
- * Returns the process definition key (i.e. the process name) from the
- * execution.
- * @param execution the execution
- */
- public String getProcessKey(Execution execution) {
- def testKey = execution.getVariable("testProcessKey")
- if(testKey!=null){
- return testKey
- }
- return execution.getProcessEngineServices().getRepositoryService()
- .getProcessDefinition(execution.getProcessDefinitionId()).getKey()
- }
-
- /**
- * Gets the node for the named element from the given xml. If the element
- * does not exist in the xml or is empty, a WorkflowException is created
- * (and as a result, a MSOWorkflowException event is thrown).
- *
- * @param execution The flow's execution.
- * @param xml Xml to search.
- * @param elementName Name of element to search for.
- * @return The element node, if found in the xml.
- */
- protected String getRequiredNodeXml(Execution execution, String xml, String elementName) {
- def element = utils.getNodeXml(xml, elementName, false)
- if (element.trim().isEmpty()) {
- def msg = 'Required element \'' + elementName + '\' is missing or empty'
- logError(msg)
- createWorkflowException(execution, 2000, msg)
- } else {
- return element
- }
- }
-
- /**
- * Gets the value of the named element from the given xml. If the element
- * does not exist in the xml or is empty, a WorkflowException is created
- * (and as a result, a MSOWorkflowException event is thrown).
- *
- * @param execution The flow's execution.
- * @param xml Xml to search.
- * @param elementName Name of element to whose value to get.
- * @return The value of the element, if found in the xml.
- */
- protected String getRequiredNodeText(Execution execution, String xml, String elementName) {
- def elementText = utils.getNodeText1(xml, elementName)
- if (elementText == null) {
- def msg = 'Required element \'' + elementName + '\' is missing or empty'
- logError(msg)
- createWorkflowException(execution, 2000, msg)
- } else {
- return elementText
- }
- }
-
- /**
- * Get the text for the specified element from the specified xml. If
- * the element does not exist, return an empty string.
- *
- * @param xml Xml from which to get the element's text.
- * @param elementName Name of element whose text to get.
- * @return the element's text or an empty string if the element does not
- * exist in the given xml.
- */
- protected String getNodeTextForce(String xml, String elementName) {
- def nodeText = utils.getNodeText1(xml, elementName)
- return (nodeText == null) ? '' : nodeText
- }
-
- /**
- * Sends the empty, synchronous response back to the API Handler.
- * @param execution the execution
- */
- @Deprecated
- public void sendResponse(Execution execution) {
- def method = getClass().getSimpleName() + '.sendResponse(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- buildResponse(execution, "", 200)
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
- }
- }
-
- /**
- *Store the variable as typed with java serialization type
- *@param execution
- *@param name
- *@param value
- */
- public void setVariable(Execution execution, String name, Object value) {
- VariableMap variables = Variables.createVariables()
- variables.putValueTyped('payload', Variables.objectValue(value)
- .serializationDataFormat(SerializationDataFormats.JAVA) // tells the engine to use java serialization for persisting the value
- .create())
- execution.setVariable(name,variables)
- }
-
- //TODO not sure how this will look in Cockpit
-
- /**
- * Returns the variable map
- *@param execution
- *@param name
- *@return
- **/
- public String getVariable(Execution execution, String name) {
- def myObj = execution.getVariable(name)
- if(myObj instanceof VariableMap){
- VariableMap serializedObjectMap = (VariableMap) myObj
- ObjectValueImpl payloadObj = serializedObjectMap.getValueTyped('payload')
- return payloadObj.getValue()
- }else{
- return myObj
- }
- }
-
-
- /**
- * Returns true if a value equals one of the provided set. Equality is
- * determined by using the equals method if the value object and the
- * object in the provided set have the same class. Otherwise, the objects
- * are converted to strings and then compared. Nulls are permitted for
- * the value as well as in the provided set
- * Example:
- * <pre>
- * def statusCode = getStatusCode()
- * isOneOf(statusCode, 200, 201, 204)
- * </pre>
- * @param value the value to test
- * @param these a set of permissable values
- * @return true if the value is in the provided set
- */
- public boolean isOneOf(Object value, Object... these) {
- for (Object thisOne : these) {
- if (thisOne == null) {
- if (value == null) {
- return true
- }
- } else {
- if (value != null) {
- if (value.getClass() == thisOne.getClass()) {
- if (value.equals(thisOne)) {
- return true
- }
- } else {
- if (String.valueOf(value).equals(String.valueOf(thisOne))) {
- return true
- }
- }
- }
- }
- }
-
- return false
- }
-
- public void setSuccessIndicator(Execution execution, boolean isSuccess) {
- String prefix = execution.getVariable('prefix')
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-
- logDebug('Entered SetSuccessIndicator Method', isDebugLogEnabled)
- execution.setVariable(prefix+'SuccessIndicator', isSuccess)
- logDebug('Outgoing SuccessIndicator is: ' + execution.getVariable(prefix+'SuccessIndicator') + '', isDebugLogEnabled)
- }
-
-
- public void sendSyncError(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String requestId = execution.getVariable("att-mso-request-id")
- logDebug('sendSyncError, requestId: ' + requestId, isDebugEnabled)
- WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
- if (workflowExceptionObj != null) {
- String errorMessage = workflowExceptionObj.getErrorMessage()
- def errorCode = workflowExceptionObj.getErrorCode()
- logDebug('sendSyncError, requestId: ' + requestId + ' | errorMessage: ' + errorMessage + ' | errorCode: ' + errorCode, isDebugEnabled)
- sendWorkflowResponse(execution, errorCode, errorMessage)
- }
- }
-
- /**
- * Create a WorkflowException - uses ExceptionUtil to build a WorkflowException
- * @param execution
- * @param errorCode
- * @param errorMessage
- * @param isDebugEnabled
- */
- public void buildWorkflowException(Execution execution, int errorCode, String errorMessage, boolean isDebugEnabled) {
- (new ExceptionUtil()).buildWorkflowException(execution, errorCode, errorMessage)
- }
-
- /**
- * Executes a named groovy script method in the current object
- */
- public void executeMethod(String methodName, Object... args) {
-
- if (args != null && args.size() > 0) {
-
- // First argument of method to call is always the execution object
- Execution execution = (Execution) args[0]
-
- def classAndMethod = getClass().getSimpleName() + '.' + methodName + '(execution=' + execution.getId() + ')'
- def isDebugEnabled = execution.getVariable('isDebugLogEnabled')
-
- logDebug('Entered ' + classAndMethod, isDebugEnabled)
- logDebug('Received parameters: ' + args, isDebugEnabled)
-
- try{
- def methodToCall = this.metaClass.getMetaMethod(methodName, args)
- logDebug('Method to call: ' + methodToCall, isDebugEnabled)
- methodToCall?.invoke(this, args)
- }
- catch(BpmnError bpmnError) {
- logDebug('Rethrowing BpmnError ' + bpmnError.getMessage(), isDebugEnabled)
- throw bpmnError
- }
- catch(Exception e) {
- e.printStackTrace()
- logDebug('Unexpected error encountered - ' + e.getMessage(), isDebugEnabled)
- (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 9999, e.getMessage())
- }
- finally {
- logDebug('Exited ' + classAndMethod, isDebugEnabled)
- }
- }
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import groovy.json.JsonSlurper
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.camunda.bpm.engine.variable.VariableMap
+import org.camunda.bpm.engine.variable.Variables
+import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats
+import org.camunda.bpm.engine.variable.impl.value.ObjectValueImpl
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowCallbackResponse
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowContextHolder
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.springframework.web.util.UriUtils
+
+public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcessor {
+ public MsoUtils utils = new MsoUtils()
+
+
+ /**
+ * Logs a message at the ERROR level.
+ * @param message the message
+ */
+ public void logError(String message) {
+ log('ERROR', message, null, "true")
+ }
+
+ /**
+ * Logs a message at the ERROR level.
+ * @param message the message
+ * @param cause the cause (stracktrace will be included in the output)
+ */
+ public void logError(String message, Throwable cause) {
+ log('ERROR', message, cause, "true")
+ }
+
+ /**
+ * Logs a message at the WARN level.
+ * @param message the message
+ */
+ public void logWarn(String message) {
+ log('WARN', message, null, "true")
+ }
+
+ /**
+ * Logs a message at the WARN level.
+ * @param message the message
+ * @param cause the cause (stracktrace will be included in the output)
+ */
+ public void logWarn(String message, Throwable cause) {
+ log('WARN', message, cause, "true")
+ }
+
+ /**
+ * Logs a message at the DEBUG level.
+ * @param message the message
+ * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
+ */
+ public void logDebug(String message, String isDebugLogEnabled) {
+ log('DEBUG', message, null, isDebugLogEnabled)
+ }
+
+ /**
+ * Logs a message at the DEBUG level.
+ * @param message the message
+ * @param cause the cause (stracktrace will be included in the output)
+ * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
+ */
+ public void logDebug(String message, Throwable cause, String isDebugLogEnabled) {
+ log('DEBUG', message, cause, isDebugLogEnabled)
+ }
+
+ /**
+ * Logs a message at the specified level.
+ * @param level the level (DEBUG, INFO, WARN, ERROR)
+ * @param message the message
+ * @param isLevelEnabled a flag indicating if the level is enabled
+ * (used only at the DEBUG level)
+ */
+ public void log(String level, String message, String isLevelEnabled) {
+ log(level, message, null, isLevelEnabled)
+ }
+
+ /**
+ * Logs a message at the specified level.
+ * @param level the level (DEBUG, INFO, WARN, ERROR)
+ * @param message the message
+ * @param cause the cause (stracktrace will be included in the output)
+ * @param isLevelEnabled a flag indicating if the level is enabled
+ * (used only at the DEBUG level)
+ */
+ public void log(String level, String message, Throwable cause, String isLevelEnabled) {
+ if (cause == null) {
+ utils.log(level, message, isLevelEnabled);
+ } else {
+ StringWriter stringWriter = new StringWriter();
+ PrintWriter printWriter = new PrintWriter(stringWriter);
+ printWriter.println(message);
+ cause.printStackTrace(printWriter);
+ utils.log(level, stringWriter.toString(), isLevelEnabled);
+ printWriter.close();
+ }
+ }
+
+ /**
+ * Logs a WorkflowException at the ERROR level with the specified message.
+ * @param execution the execution
+ */
+ public void logWorkflowException(Execution execution, String message) {
+ def workflowException = execution.getVariable("WorkflowException")
+
+ if (workflowException == null) {
+ logError(message);
+ } else {
+ logError(message + ": " + workflowException)
+ }
+ }
+
+ /**
+ * Saves the WorkflowException in the execution to the specified variable,
+ * clearing the WorkflowException variable so the workflow can continue
+ * processing (perhaps catching another WorkflowException).
+ * @param execution the execution
+ * @return the name of the destination variable
+ */
+ public saveWorkflowException(Execution execution, String variable) {
+ if (variable == null) {
+ throw new NullPointerException();
+ }
+
+ execution.setVariable(variable, execution.getVariable("WorkflowException"))
+ execution.setVariable("WorkflowException", null)
+ }
+
+
+ /**
+ * Validates that the request exists and that the mso-request-id variable is set.
+ * Additional required variables may be checked by specifying their names.
+ * NOTE: services requiring mso-service-instance-id must specify it explicitly!
+ * If a problem is found, buildAndThrowWorkflowException builds a WorkflowException
+ * and throws an MSOWorkflowException. This method also sets up the log context for
+ * the workflow.
+ *
+ * @param execution the execution
+ * @return the validated request
+ */
+ public String validateRequest(Execution execution, String... requiredVariables) {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ def method = getClass().getSimpleName() + '.validateRequest(' +
+ 'execution=' + execution.getId() +
+ ', requredVariables=' + requiredVariables +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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")
+ }
+
+ // All requests must have a request ID.
+ // Some requests (e.g. SDN-MOBILITY) do not have a service instance ID.
+
+ String requestId = null
+ String serviceInstanceId = null
+
+ List<String> allRequiredVariables = new ArrayList<String>()
+ allRequiredVariables.add("mso-request-id")
+
+ if (requiredVariables != null) {
+ for (String variable : requiredVariables) {
+ if (!allRequiredVariables.contains(variable)) {
+ allRequiredVariables.add(variable)
+ }
+ }
+ }
+
+ for (String variable : allRequiredVariables) {
+ def value = execution.getVariable(variable)
+ if (value == null || ((value instanceof CharSequence) && value.length() == 0)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey +
+ " request was received with no '" + variable + "' variable")
+ }
+
+ if ("mso-request-id".equals(variable)) {
+ requestId = (String) value
+ } else if ("mso-service-instance-id".equals(variable)) {
+ serviceInstanceId = (String) value
+ }
+ }
+
+ if (serviceInstanceId == null) {
+ serviceInstanceId = (String) execution.getVariable("mso-service-instance-id")
+ }
+
+ utils.logContext(requestId, serviceInstanceId)
+ logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ return request
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
+ }
+ }
+
+ /**
+ * gets vars stored in a JSON object in prefix+Request and returns as a LazyMap
+ * setting log context here too
+ * @param execution the execution
+ * @return the inputVars
+ */
+ public Map validateJSONReq(Execution execution) {
+ def method = getClass().getSimpleName() + '.validateJSONReq(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String processKey = getProcessKey(execution);
+ def prefix = execution.getVariable("prefix")
+
+ def requestId =getVariable(execution, "mso-request-id")
+ def serviceInstanceId = getVariable(execution, "mso-service-instance-id")
+ if(requestId!=null && serviceInstanceId!=null){
+ utils.logContext(requestId, serviceInstanceId)
+ }
+
+
+ def request = getVariable(execution, prefix + 'Request')
+
+ if (request == null) {
+ request = getVariable(execution, processKey + 'Request')
+
+ if (request == null) {
+ request = getVariable(execution, 'bpmnRequest')
+ }
+ execution.setVariable(prefix + 'Request', request)
+ }
+
+ def jsonSlurper = new JsonSlurper()
+ def parsed = jsonSlurper.parseText(request)
+
+
+ logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ return parsed
+
+ }
+
+ /**
+ * Sends a response to the workflow service that invoked the process. This method
+ * may only be used by top-level processes that were directly invoked by the
+ * asynchronous workflow service.
+ * @param execution the execution
+ * @param responseCode the response code
+ * @param content the message content
+ * @throws IllegalArgumentException if the response code is invalid
+ * by HTTP standards
+ * @throws UnsupportedOperationException if not invoked by an asynchronous,
+ * top-level process
+ * @throws IllegalStateException if a response has already been sent
+ */
+ protected void sendWorkflowResponse(Execution execution, Object responseCode, String response) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ try {
+ String processKey = getProcessKey(execution);
+
+ // isAsyncProcess is injected by the workflow service that started the flow
+ if (!String.valueOf(execution.getVariable("isAsyncProcess")).equals("true")) {
+ throw new UnsupportedOperationException(processKey + ": " +
+ "sendWorkflowResponse is valid only in asynchronous workflows");
+ }
+
+ if (String.valueOf(execution.getVariable(processKey + "WorkflowResponseSent")).equals("true")) {
+ logDebug("Sync response has already been sent for " + processKey, isDebugLogEnabled)
+ }else{
+
+ logDebug("Building " + processKey + " response ", isDebugLogEnabled)
+
+ int intResponseCode;
+
+ try {
+ intResponseCode = Integer.parseInt(String.valueOf(responseCode));
+
+ if (intResponseCode < 100 || intResponseCode > 599) {
+ throw new NumberFormatException(String.valueOf(responseCode));
+ }
+ } catch (NumberFormatException e) {
+ throw new IllegalArgumentException("Process " + processKey
+ + " provided an invalid HTTP response code: " + responseCode);
+ }
+
+ // Only 2XX responses are considered "Success"
+ String status = (intResponseCode >= 200 && intResponseCode <= 299) ?
+ "Success" : "Fail";
+
+ // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+ execution.setVariable(processKey + "ResponseCode", String.valueOf(intResponseCode))
+ execution.setVariable(processKey + "Response", response);
+ execution.setVariable(processKey + "Status", status);
+ execution.setVariable("WorkflowResponse", response)
+
+ logDebug("Sending response for " + processKey
+ + " ResponseCode=" + intResponseCode
+ + " Status=" + status
+ + " Response=\n" + response,
+ isDebugLogEnabled)
+
+ // TODO: ensure that this flow was invoked asynchronously?
+
+ WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse()
+ callbackResponse.setStatusCode(intResponseCode)
+ callbackResponse.setMessage(status)
+ callbackResponse.setResponse(response)
+
+ // TODO: send this data with HTTP POST
+
+ WorkflowContextHolder.getInstance().processCallback(
+ processKey,
+ execution.getProcessInstanceId(),
+ execution.getVariable("mso-request-id"),
+ callbackResponse)
+
+ execution.setVariable(processKey + "WorkflowResponseSent", "true");
+ }
+
+ } catch (Exception ex) {
+ logError("Unable to send workflow response to client ....", ex)
+ }
+ }
+
+ /**
+ * Returns true if a workflow response has already been sent.
+ * @param execution the execution
+ */
+ protected boolean isWorkflowResponseSent(Execution execution) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String processKey = getProcessKey(execution);
+ return String.valueOf(execution.getVariable(processKey + "WorkflowResponseSent")).equals("true");
+ }
+
+ /**
+ * Returns the process definition key (i.e. the process name) of the
+ * current process.
+ *
+ * @param execution the execution
+ */
+ public String getProcessKey(Execution execution) {
+ def testKey = execution.getVariable("testProcessKey")
+ if(testKey!=null){
+ return testKey
+ }
+ return execution.getProcessEngineServices().getRepositoryService()
+ .getProcessDefinition(execution.getProcessDefinitionId()).getKey()
+ }
+
+ /**
+ * Returns the process definition key (i.e. the process name) of the
+ * top-level process.
+ * @param execution the execution
+ */
+ public String getMainProcessKey(Execution execution) {
+ Execution exec = execution
+
+ while (true) {
+ Execution parent = exec.getSuperExecution()
+
+ if (parent == null) {
+ parent = exec.getParent()
+
+ if (parent == null) {
+ break
+ }
+ }
+
+ exec = parent
+ }
+
+ return execution.getProcessEngineServices().getRepositoryService()
+ .getProcessDefinition(exec.getProcessDefinitionId()).getKey()
+ }
+
+ /**
+ * Gets the node for the named element from the given xml. If the element
+ * does not exist in the xml or is empty, a WorkflowException is created
+ * (and as a result, a MSOWorkflowException event is thrown).
+ *
+ * @param execution The flow's execution.
+ * @param xml Xml to search.
+ * @param elementName Name of element to search for.
+ * @return The element node, if found in the xml.
+ */
+ protected String getRequiredNodeXml(Execution execution, String xml, String elementName) {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ def element = utils.getNodeXml(xml, elementName, false)
+ if (element.trim().isEmpty()) {
+ def msg = 'Required element \'' + elementName + '\' is missing or empty'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ } else {
+ return element
+ }
+ }
+
+ /**
+ * Gets the value of the named element from the given xml. If the element
+ * does not exist in the xml or is empty, a WorkflowException is created
+ * (and as a result, a MSOWorkflowException event is thrown).
+ *
+ * @param execution The flow's execution.
+ * @param xml Xml to search.
+ * @param elementName Name of element to whose value to get.
+ * @return The non-empty value of the element, if found in the xml.
+ */
+ protected String getRequiredNodeText(Execution execution, String xml, String elementName) {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ def elementText = utils.getNodeText1(xml, elementName)
+ if ((elementText == null) || (elementText.isEmpty())) {
+ def msg = 'Required element \'' + elementName + '\' is missing or empty'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ } else {
+ return elementText
+ }
+ }
+
+ /**
+ * Get the text for the specified element from the specified xml. If
+ * the element does not exist, return the specified default value.
+ *
+ * @param xml Xml from which to get the element's text
+ * @param elementName Name of element whose text to get
+ * @param defaultValue the default value
+ * @return the element's text or the default value if the element does not
+ * exist in the given xml
+ */
+ protected String getNodeText(String xml, String elementName, String defaultValue) {
+ def nodeText = utils.getNodeText1(xml, elementName)
+ return (nodeText == null) ? defaultValue : nodeText
+ }
+ /**
+ * Get the text for the specified element from the specified xml. If
+ * the element does not exist, return an empty string.
+ *
+ * @param xml Xml from which to get the element's text.
+ * @param elementName Name of element whose text to get.
+ * @return the element's text or an empty string if the element does not
+ * exist in the given xml.
+ */
+ protected String getNodeTextForce(String xml, String elementName) {
+ return getNodeText(xml, elementName, '');
+ }
+
+ /**
+ *Store the variable as typed with java serialization type
+ *@param execution
+ *@param name
+ *@param value
+ */
+ public void setVariable(Execution execution, String name, Object value) {
+ VariableMap variables = Variables.createVariables()
+ variables.putValueTyped('payload', Variables.objectValue(value)
+ .serializationDataFormat(SerializationDataFormats.JAVA) // tells the engine to use java serialization for persisting the value
+ .create())
+ execution.setVariable(name,variables)
+ }
+
+ //TODO not sure how this will look in Cockpit
+
+ /**
+ * Returns the variable map
+ *@param execution
+ *@param name
+ *@return
+ **/
+ public String getVariable(Execution execution, String name) {
+ def myObj = execution.getVariable(name)
+ if(myObj instanceof VariableMap){
+ VariableMap serializedObjectMap = (VariableMap) myObj
+ ObjectValueImpl payloadObj = serializedObjectMap.getValueTyped('payload')
+ return payloadObj.getValue()
+ }else{
+ return myObj
+ }
+ }
+
+
+ /**
+ * Returns true if a value equals one of the provided set. Equality is
+ * determined by using the equals method if the value object and the
+ * object in the provided set have the same class. Otherwise, the objects
+ * are converted to strings and then compared. Nulls are permitted for
+ * the value as well as in the provided set
+ * Example:
+ * <pre>
+ * def statusCode = getStatusCode()
+ * isOneOf(statusCode, 200, 201, 204)
+ * </pre>
+ * @param value the value to test
+ * @param these a set of permissable values
+ * @return true if the value is in the provided set
+ */
+ public boolean isOneOf(Object value, Object... these) {
+ for (Object thisOne : these) {
+ if (thisOne == null) {
+ if (value == null) {
+ return true
+ }
+ } else {
+ if (value != null) {
+ if (value.getClass() == thisOne.getClass()) {
+ if (value.equals(thisOne)) {
+ return true
+ }
+ } else {
+ if (String.valueOf(value).equals(String.valueOf(thisOne))) {
+ return true
+ }
+ }
+ }
+ }
+ }
+ return false
+ }
+
+ /**
+ * Sets flows success indicator variable.
+ *
+ */
+ public void setSuccessIndicator(Execution execution, boolean isSuccess) {
+ String prefix = execution.getVariable('prefix')
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+
+ logDebug('Entered SetSuccessIndicator Method', isDebugLogEnabled)
+ execution.setVariable(prefix+'SuccessIndicator', isSuccess)
+ logDebug('Outgoing SuccessIndicator is: ' + execution.getVariable(prefix+'SuccessIndicator') + '', isDebugLogEnabled)
+ }
+
+
+ /**
+ * Sends a Error Sync Response
+ *
+ */
+ public void sendSyncError(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String requestId = execution.getVariable("mso-request-id")
+ logDebug('sendSyncError, requestId: ' + requestId, isDebugEnabled)
+ WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+ if (workflowExceptionObj != null) {
+ String errorMessage = workflowExceptionObj.getErrorMessage()
+ def errorCode = workflowExceptionObj.getErrorCode()
+ logDebug('sendSyncError, requestId: ' + requestId + ' | errorMessage: ' + errorMessage + ' | errorCode: ' + errorCode, isDebugEnabled)
+ sendWorkflowResponse(execution, errorCode, errorMessage)
+ }
+ }
+
+ /**
+ * Create a WorkflowException - uses ExceptionUtil to build a WorkflowException
+ * @param execution
+ * @param errorCode
+ * @param errorMessage
+ * @param isDebugEnabled
+ */
+ public void buildWorkflowException(Execution execution, int errorCode, String errorMessage, boolean isDebugEnabled) {
+ (new ExceptionUtil()).buildWorkflowException(execution, errorCode, errorMessage)
+ }
+
+ /**
+ * Executes a named groovy script method in the current object
+ */
+ public void executeMethod(String methodName, Object... args) {
+
+ if (args != null && args.size() > 0) {
+
+ // First argument of method to call is always the execution object
+ Execution execution = (Execution) args[0]
+
+ def classAndMethod = getClass().getSimpleName() + '.' + methodName + '(execution=' + execution.getId() + ')'
+ def isDebugEnabled = execution.getVariable('isDebugLogEnabled')
+
+ logDebug('Entered ' + classAndMethod, isDebugEnabled)
+ logDebug('Received parameters: ' + args, isDebugEnabled)
+
+ try{
+ def methodToCall = this.metaClass.getMetaMethod(methodName, args)
+ logDebug('Method to call: ' + methodToCall, isDebugEnabled)
+ methodToCall?.invoke(this, args)
+ }
+ catch(BpmnError bpmnError) {
+ logDebug('Rethrowing BpmnError ' + bpmnError.getMessage(), isDebugEnabled)
+ throw bpmnError
+ }
+ catch(Exception e) {
+ e.printStackTrace()
+ logDebug('Unexpected error encountered - ' + e.getMessage(), isDebugEnabled)
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 9999, e.getMessage())
+ }
+ finally {
+ logDebug('Exited ' + classAndMethod, isDebugEnabled)
+ }
+ }
+ }
+
+ /**
+ *This method determines and adds the appropriate ending to come
+ *after a number (-st, -nd, -rd, or -th)
+ *
+ *@param int n
+ *
+ *@return String ending - number with suffix
+ */
+ public static String labelMaker(Object n) {
+ Integer num
+ if(n instanceof String){
+ num = Integer.parseInt(n)
+ }else{
+ num = n
+ }
+
+ String ending = ""; //the end to be added to the number
+ if(num != null){
+ if ((num % 10 == 1) && (num != 11)) {
+ ending = num + "st";
+ } else if ((num % 10 == 2) && (num != 12)) {
+ ending = num + "nd";
+ } else if ((num % 10 == 3) && (num != 13)) {
+ ending = num + "rd";
+ } else {
+ ending = num + "th";
+ }
+ }
+ return ending
+ }
+
+ /**
+ *
+ *This method gets and decodes SDNC Response's "RequestData".
+ *
+ *@param response - the sdnc response
+ *
+ *@return data - the response "RequestData" decoded
+ *
+ */
+ public String getRequestDataDecoded(String response){
+ String data = utils.getNodeText1(response, "RequestData")
+ if(data != null){
+ data = data.replaceAll("&lt;", "<")
+ data = data.replaceAll("&gt;", ">")
+ }
+
+ return data
+ }
+
+
+ /**
+ * Constructs a workflow message callback URL for the specified message type and correlator.
+ * @param messageType the message type (e.g. SDNCAResponse or VNFAResponse)
+ * @param correlator the correlator value (e.g. a request ID)
+ */
+ public String createCallbackURL(Execution execution, String messageType, String correlator) {
+ String endpoint = (String) execution.getVariable('URN_mso_workflow_message_endpoint')
+
+ if (endpoint == null || endpoint.isEmpty()) {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000,
+ 'mso:workflow:message:endpoint URN mapping is not set')
+ }
+
+ while (endpoint.endsWith('/')) {
+ endpoint = endpoint.substring(0, endpoint.length()-1)
+ }
+
+ return endpoint +
+ '/' + UriUtils.encodePathSegment(messageType, 'UTF-8') +
+ '/' + UriUtils.encodePathSegment(correlator, 'UTF-8')
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
new file mode 100644
index 0000000000..488535024b
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
@@ -0,0 +1,931 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.json.XML;
+import org.springframework.web.util.UriUtils;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+
+
+import groovy.json.JsonBuilder
+import groovy.json.JsonSlurper
+import groovy.util.slurpersupport.GPathResult
+import groovy.xml.QName;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+
+/***
+ * Utilities for accessing Catalog DB Adapter to retrieve Networks, VNF/VFModules, AllottedResources and complete ServiceResources information
+ *
+ */
+
+class CatalogDbUtils {
+
+ MsoUtils utils = new MsoUtils()
+ JsonUtils jsonUtils = new JsonUtils()
+ MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ static private String defaultDbAdapterVersion = "v2"
+
+ public JSONArray getAllNetworksByServiceModelUuid(String catalogDbEndpoint, String serviceModelUuid) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByServiceModelUuid(String catalogDbEndpoint, String serviceModelUuid, String catalogUtilsVersion) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", catalogUtilsVersion)
+
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid, String catalogUtilsVersion) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion, String catalogUtilsVersion) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByNetworkModelCustomizationUuid(String catalogDbEndpoint, String networkModelCustomizationUuid) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?networkModelCustomizationUuid=" + UriUtils.encode(networkModelCustomizationUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByNetworkModelCustomizationUuid(String catalogDbEndpoint, String networkModelCustomizationUuid, String catalogUtilsVersion) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?networkModelCustomizationUuid=" + UriUtils.encode(networkModelCustomizationUuid, "UTF-8")
+
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByNetworkType(String catalogDbEndpoint, String networkType) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?networkType=" + UriUtils.encode(networkType, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+ public JSONArray getAllNetworksByNetworkType(String catalogDbEndpoint, String networkType, String catalogUtilsVersion) {
+ JSONArray networksList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceNetworks?networkType=" + UriUtils.encode(networkType, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ networksList = parseNetworksJson(catalogDbResponse, "serviceNetworks", catalogUtilsVersion)
+
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return networksList
+ }
+
+
+ public JSONArray getAllVnfsByServiceModelUuid(String catalogDbEndpoint, String serviceModelUuid) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllVnfsByServiceModelUuid(String catalogDbEndpoint, String serviceModelUuid, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", catalogUtilsVersion)
+
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllVnfsByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllVnfsByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", catalogUtilsVersion)
+
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllVnfsByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllVnfsByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", catalogUtilsVersion)
+
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllVnfsByVnfModelCustomizationUuid(String catalogDbEndpoint, String vnfModelCustomizationUuid) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?vnfModelCustomizationUuid=" + UriUtils.encode(vnfModelCustomizationUuid, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllVnfsByVnfModelCustomizationUuid(String catalogDbEndpoint, String vnfModelCustomizationUuid, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceVnfs?vnfModelCustomizationUuid=" + UriUtils.encode(vnfModelCustomizationUuid, "UTF-8")
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseVnfsJson(catalogDbResponse, "serviceVnfs", catalogUtilsVersion)
+
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+
+ public JSONArray getAllottedResourcesByServiceModelUuid(String catalogDbEndpoint, String serviceModelUuid) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/ServiceAllottedResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllottedResourcesByServiceModelUuid(String catalogDbEndpoint, String serviceModelUuid, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/ServiceAllottedResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllottedResourcesByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceAllottedResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllottedResourcesByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceAllottedResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllottedResourcesByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceAllottedResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllottedResourcesByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceAllottedResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllottedResourcesByArModelCustomizationUuid(String catalogDbEndpoint, String arModelCustomizationUuid) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceAllottedResources?serviceModelCustomizationUuid=" + UriUtils.encode(arModelCustomizationUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONArray getAllottedResourcesByArModelCustomizationUuid(String catalogDbEndpoint, String arModelCustomizationUuid, String catalogUtilsVersion) {
+ JSONArray vnfsList = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceAllottedResources?serviceModelCustomizationUuid=" + UriUtils.encode(arModelCustomizationUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ vnfsList = parseAllottedResourcesJson(catalogDbResponse, "serviceAllottedResources", catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return vnfsList
+ }
+
+ public JSONObject getServiceResourcesByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid) {
+ JSONObject resources = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ resources = parseServiceResourcesJson(catalogDbResponse, "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+ public JSONObject getServiceResourcesByServiceModelInvariantUuid(String catalogDbEndpoint, String serviceModelInvariantUuid, String catalogUtilsVersion) {
+ JSONObject resources = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ resources = parseServiceResourcesJson(catalogDbResponse, catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+
+ public JSONObject getServiceResourcesByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion) {
+ JSONObject resources = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ resources = parseServiceResourcesJson(catalogDbResponse)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+ public JSONObject getServiceResourcesByServiceModelInvariantUuidAndServiceModelVersion(String catalogDbEndpoint, String serviceModelInvariantUuid, String serviceModelVersion, String catalogUtilsVersion) {
+ JSONObject resources = null
+ String endPoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + "/serviceResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8") + "&serviceModelVersion=" + UriUtils.encode(serviceModelVersion, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(endPoint)
+
+ if (catalogDbResponse != null) {
+ resources = parseServiceResourcesJson(catalogDbResponse, catalogUtilsVersion)
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+
+
+ private JSONArray parseNetworksJson (String catalogDbResponse, String arrayName, String catalogUtilsVersion) {
+ JSONArray modelInfos = null
+
+ msoLogger.debug("parseNetworksJson - catalogUtilsVersion is " + catalogUtilsVersion)
+ try {
+ // Create array of jsons
+
+ JSONObject responseJson = new JSONObject(catalogDbResponse)
+ JSONArray networks = responseJson.getJSONArray(arrayName)
+ modelInfos = new JSONArray()
+
+ for (int i = 0; i < networks.length(); i++) {
+
+ JSONObject network = networks.getJSONObject(i)
+ JSONObject modelJson = new JSONObject()
+ JSONObject modelInfo = buildModelInfo("network", network, catalogUtilsVersion)
+ modelJson.put("modelInfo", modelInfo)
+ String networkType = jsonUtils.getJsonValueForKey(network, "networkType")
+ modelJson.put("networkType", networkType)
+
+ switch (catalogUtilsVersion) {
+ case "v1":
+ break
+ default:
+ String toscaNodeType = jsonUtils.getJsonValueForKey(network, "toscaNodeType")
+ modelJson.put("toscaNodeType", toscaNodeType)
+ String networkTechnology = jsonUtils.getJsonValueForKey(network, "networkTechnology")
+ modelJson.put("networkTechnology", networkTechnology)
+ String networkRole = jsonUtils.getJsonValueForKey(network, "networkRole")
+ modelJson.put("networkRole", networkRole)
+ String networkScope = jsonUtils.getJsonValueForKey(network, "networkScope")
+ modelJson.put("networkScope", networkScope)
+ break
+ }
+ modelInfos.put(modelJson)
+ }
+
+ String modelInfosString = modelInfos.toString()
+ msoLogger.debug("Returning networks JSON: " + modelInfosString)
+
+ } catch (Exception e) {
+ utils.log("ERROR", "Exception in parsing Catalog DB Response: " + e.message)
+ }
+
+ return modelInfos
+ }
+
+ private JSONArray parseVnfsJson (String catalogDbResponse, String arrayName, String catalogUtilsVersion) {
+ JSONArray modelInfos = null
+
+ msoLogger.debug("parseVnfsJson - catalogUtilsVersion is " + catalogUtilsVersion)
+
+ try {
+ // Create array of jsons
+
+ JSONObject responseJson = new JSONObject(catalogDbResponse)
+ JSONArray vnfs = responseJson.getJSONArray(arrayName)
+ modelInfos = new JSONArray()
+
+ for (int i = 0; i < vnfs.length(); i++) {
+ JSONObject vnf = vnfs.getJSONObject(i)
+
+ msoLogger.debug(vnf.toString(2))
+ JSONObject modelInfo = buildModelInfo("vnf", vnf, catalogUtilsVersion)
+ JSONObject modelJson = new JSONObject()
+ modelJson.put("modelInfo", modelInfo)
+ switch(catalogUtilsVersion) {
+ case "v1":
+ break
+ default:
+ String toscaNodeType = jsonUtils.getJsonValueForKey(vnf, "toscaNodeType")
+ modelJson.put("toscaNodeType", toscaNodeType)
+ String nfType = jsonUtils.getJsonValueForKey(vnf, "nfType")
+ modelJson.put("nfType", nfType)
+ String nfRole = jsonUtils.getJsonValueForKey(vnf, "nfRole")
+ modelJson.put("nfRole", nfRole)
+ String nfCode = jsonUtils.getJsonValueForKey(vnf, "nfCode")
+ modelJson.put("nfCode", nfCode)
+ break
+ }
+
+ JSONObject vnfJson = vnf.getJSONObject("vnf")
+ JSONArray vfModules = null
+ try {
+ vfModules = vnfJson.getJSONArray("vfModules")
+ } catch (Exception e)
+ {
+ msoLogger.debug("Cannot find VF MODULE ARRAY: " + i + ", exception is " + e.message)
+ }
+
+ if (vfModules != null) {
+ JSONArray vfModuleInfo = new JSONArray()
+ for (int j = 0; j < vfModules.length(); j++) {
+ JSONObject vfModule = vfModules.getJSONObject(j)
+ JSONObject vfModuleModelInfo = buildModelInfo("vfModule", vfModule, catalogUtilsVersion)
+ JSONObject vfModuleModelJson = new JSONObject()
+ vfModuleModelJson.put("modelInfo", vfModuleModelInfo)
+ String vfModuleType = jsonUtils.getJsonValueForKey(vfModule, "type")
+ vfModuleModelJson.put("vfModuleType", vfModuleType)
+ switch(catalogUtilsVersion) {
+ case "v1":
+ Integer isBase = jsonUtils.getJsonIntValueForKey(vfModule, "isBase")
+ if (isBase.intValue() == 1) {
+ vfModuleModelJson.put("isBase", "true")
+ }
+ else {
+ vfModuleModelJson.put("isBase", "false")
+ }
+ break
+ default:
+ boolean isBase = jsonUtils.getJsonBooleanValueForKey(vfModule, "isBase")
+ vfModuleModelJson.put("isBase", isBase)
+ break
+ }
+ String vfModuleLabel = jsonUtils.getJsonValueForKey(vfModule, "label")
+ vfModuleModelJson.put("vfModuleLabel", vfModuleLabel)
+ Integer initialCount = jsonUtils.getJsonIntValueForKey(vfModule, "initialCount")
+ vfModuleModelJson.put("initialCount", initialCount.intValue())
+ vfModuleInfo.put(vfModuleModelJson)
+ }
+ modelJson.put("vfModules", vfModuleInfo)
+ }
+ modelInfos.put(modelJson)
+ }
+
+ String modelInfosString = modelInfos.toString()
+ msoLogger.debug("Returning vnfs JSON: " + modelInfosString)
+
+ } catch (Exception e) {
+ utils.log("ERROR", "Exception in parsing Catalog DB Response: " + e.message)
+ }
+
+ return modelInfos
+ }
+
+ private JSONArray parseAllottedResourcesJson (String catalogDbResponse, String arrayName, String catalogUtilsVersion) {
+ JSONArray modelInfos = null
+
+ msoLogger.debug("parseAllottedResourcesJson - catalogUtilsVersion is " + catalogUtilsVersion)
+
+ try {
+ // Create array of jsons
+
+ JSONObject responseJson = new JSONObject(catalogDbResponse)
+ JSONArray allottedResources = responseJson.getJSONArray(arrayName)
+ modelInfos = new JSONArray()
+
+ for (int i = 0; i < allottedResources.length(); i++) {
+ JSONObject allottedResource = allottedResources.getJSONObject(i)
+ JSONObject modelInfo = buildModelInfo("allottedResource", allottedResource, catalogUtilsVersion)
+ JSONObject modelJson = new JSONObject()
+ modelJson.put("modelInfo", modelInfo)
+ switch(catalogUtilsVersion) {
+ case "v1":
+ break
+ default:
+ String toscaNodeType = jsonUtils.getJsonValueForKey(allottedResource, "toscaNodeType")
+ modelJson.put("toscaNodeType", toscaNodeType)
+ String parentServiceModelUuid = jsonUtils.getJsonValueForKey(allottedResource, "parentServiceModelUuid")
+ modelJson.put("parentServiceModelUuid", parentServiceModelUuid)
+ break
+ }
+
+
+ modelInfos.put(modelJson)
+ }
+
+ String modelInfosString = modelInfos.toString()
+ msoLogger.debug("Returning allottedResources JSON: " + modelInfosString)
+
+ } catch (Exception e) {
+ utils.log("ERROR", "Exception in parsing Catalog DB Response: " + e.message)
+ }
+
+ return modelInfos
+ }
+
+ private JSONObject parseServiceResourcesJson (String catalogDbResponse) {
+ JSONObject serviceResources = new JSONObject()
+ String catalogUtilsVersion = "v1"
+
+ try {
+ // Create array of jsons
+
+ JSONObject responseJson = new JSONObject(catalogDbResponse)
+ JSONObject serviceResourcesRoot = responseJson.getJSONObject("serviceResources")
+ JSONArray vnfsArray = parseVnfsJson(serviceResourcesRoot.toString(), "vnfResources", catalogUtilsVersion)
+ serviceResources.put("vnfs", vnfsArray)
+ JSONArray networksArray = parseNetworksJson(serviceResourcesRoot.toString(), "networkResourceCustomization", catalogUtilsVersion)
+ serviceResources.put("networks", networksArray)
+ JSONArray allottedResourcesArray = parseAllottedResourcesJson(serviceResourcesRoot.toString(), "allottedResourceCustomization", catalogUtilsVersion)
+ serviceResources.put("allottedResources", allottedResourcesArray)
+
+ String serviceResourcesString = serviceResources.toString()
+ msoLogger.debug("Returning serviceResources JSON: " + serviceResourcesString)
+
+ } catch (Exception e) {
+ utils.log("ERROR", "Exception in parsing Catalog DB Response: " + e.message)
+ }
+
+ return serviceResources
+ }
+
+ private JSONObject parseServiceResourcesJson (String catalogDbResponse, String catalogUtilsVersion) {
+ JSONObject serviceResources = new JSONObject()
+ JSONObject serviceResourcesObject = new JSONObject()
+ String serviceResourcesString = ""
+
+ try {
+ // Create array of jsons
+
+ JSONObject responseJson = new JSONObject(catalogDbResponse)
+ JSONObject serviceResourcesRoot = responseJson.getJSONObject("serviceResources")
+ JSONObject modelInfo = buildModelInfo("", serviceResourcesRoot, catalogUtilsVersion)
+ serviceResources.put("modelInfo", modelInfo)
+ JSONArray vnfsArray = parseVnfsJson(serviceResourcesRoot.toString(), "serviceVnfs", catalogUtilsVersion)
+ serviceResources.put("serviceVnfs", vnfsArray)
+ JSONArray networksArray = parseNetworksJson(serviceResourcesRoot.toString(), "serviceNetworks", catalogUtilsVersion)
+ serviceResources.put("serviceNetworks", networksArray)
+ JSONArray allottedResourcesArray = parseAllottedResourcesJson(serviceResourcesRoot.toString(), "serviceAllottedResources", catalogUtilsVersion)
+ serviceResources.put("serviceAllottedResources", allottedResourcesArray)
+ serviceResourcesObject.put("serviceResources", serviceResources)
+
+ serviceResourcesString = serviceResourcesObject.toString()
+ msoLogger.debug("Returning serviceResources JSON: " + serviceResourcesString)
+
+ } catch (Exception e) {
+ utils.log("ERROR", "Exception in parsing Catalog DB Response: " + e.message)
+ }
+
+ return serviceResourcesObject
+ }
+
+ private JSONObject buildModelInfo(String modelType, JSONObject modelFromDb, String catalogUtilsVersion) {
+ JSONObject modelInfo = null
+ try {
+ modelInfo = new JSONObject()
+ modelInfo.put("modelType", modelType)
+ String modelInvariantId = jsonUtils.getJsonValueForKey(modelFromDb, "modelInvariantUuid")
+ modelInfo.put("modelInvariantId", modelInvariantId)
+ if(modelType.equalsIgnoreCase("allottedResource")){
+ String modelInstanceName = jsonUtils.getJsonValueForKey(modelFromDb, "modelInstanceName")
+ modelInfo.put("modelInstanceName", modelInstanceName)
+ }
+ if (!"vfModule".equals(modelType) && !"vnf".equals(modelType)) {
+ String modelVersionId = jsonUtils.getJsonValueForKey(modelFromDb, "modelUuid")
+ modelInfo.put("modelVersionId", modelVersionId)
+ }
+ else {
+ String modelVersionId = jsonUtils.getJsonValueForKey(modelFromDb, "asdcUuid")
+ modelInfo.put("modelVersionId", modelVersionId)
+ }
+ String modelName = jsonUtils.getJsonValueForKey(modelFromDb, "modelName")
+ modelInfo.put("modelName", modelName)
+ String modelVersion = jsonUtils.getJsonValueForKey(modelFromDb, "modelVersion")
+ modelInfo.put("modelVersion", modelVersion)
+ if (!"vfModule".equals(modelType)) {
+ String modelCustomizationName = jsonUtils.getJsonValueForKey(modelFromDb, "modelCustomizationName")
+ modelInfo.put("modelCustomizationName", modelCustomizationName)
+ }
+ String modelCustomizationId = jsonUtils.getJsonValueForKey(modelFromDb, "modelCustomizationUuid")
+ switch (catalogUtilsVersion) {
+ case "v1":
+ modelInfo.put("modelCustomizationId", modelCustomizationId)
+ break
+ default:
+ modelInfo.put("modelCustomizationUuid", modelCustomizationId)
+ break
+ }
+ JSONObject modelJson = new JSONObject()
+ modelJson.put("modelInfo", modelInfo)
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception while parsing model information: " + e.message)
+ }
+ return modelInfo
+ }
+
+ private String getResponseFromCatalogDb (String endPoint) {
+ try {
+ RESTConfig config = new RESTConfig(endPoint);
+ def responseData = ''
+ def bpmnRequestId = UUID.randomUUID().toString()
+ RESTClient client = new RESTClient(config).
+ addHeader('X-TransactionId', bpmnRequestId).
+ addHeader('X-FromAppId', 'BPMN').
+ addHeader('Content-Type', 'application/json').
+ addHeader('Accept','application/json');
+ msoLogger.debug('sending GET to Catalog DB endpoint' + endPoint)
+ APIResponse response = client.httpGet()
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ msoLogger.debug("Received data from Catalog DB: " + responseData)
+ }
+
+ msoLogger.debug('Response code:' + response.getStatusCode())
+ msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+ if (response.getStatusCode() == 200) {
+ // parse response as needed
+ return responseData
+ }
+ else {
+ return null
+ }
+ }
+ catch (Exception e) {
+ msoLogger.debug("ERROR WHILE QUERYING CATALOG DB: " + e.message)
+ return null
+ }
+
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtil.groovy
index fae12c343e..cce05feca8 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtil.groovy
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.common.scripts
import org.camunda.bpm.engine.runtime.Execution
import org.apache.commons.lang3.*
@@ -287,14 +287,14 @@ class CommonExceptionUtil {
}
def message = ""
if(messageId.startsWith("SVC")){
- message = """<tns:requestError xmlns:tns="http://ecomp.att.com/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ecomp.att.com/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ message = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
<tns:serviceException>
<tns:messageId>${messageId}</tns:messageId>
<tns:text>${messageTxt}</tns:text>${msgVarsBuff}
</tns:serviceException>
</tns:requestError>"""
}else{
- message ="""<tns:requestError xmlns:tns="http://ecomp.att.com/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ecomp.att.com/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ message ="""<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
<tns:policyException>
<tns:messageId>${messageId}</tns:messageId>
<tns:text>${messageTxt}</tns:text>${msgVarsBuff}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcess.groovy
index 8ec267dd19..2f9c8d299b 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcess.groovy
@@ -1,502 +1,361 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import java.text.SimpleDateFormat
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-
-
-public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
-
- String Prefix="CMSO_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- // Complete MSO Request processing
- public initializeProcessVariables(Execution execution){
-
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
-
- /* Initialize all the process request variables in this block */
- execution.setVariable("prefix",Prefix)
- //execution.setVariable("getLayer3ServiceDetailsV1Response","")
- execution.setVariable("CMSO_request_id","")
- execution.setVariable("CMSO_notification-url","")
- execution.setVariable("CMSO_mso-bpel-name","")
- execution.setVariable("CMSO_request_action","")
-
- execution.setVariable("CMSO_notification-url-Ok", false)
- execution.setVariable("CMSO_request_id-Ok", false)
-
- //These variabels are for Get Mso Aai Password Adapter
- execution.setVariable("CMSO_deliveryStatus", false)
-
- //updateRequest Adapter process variables
- execution.setVariable("CMSO_updateRequestResponse", "")
- execution.setVariable("CMSO_updateRequestResponseCode", "")
- execution.setVariable("CMSO_updateFinalNotifyAckStatusSuccessPayload", "")
- execution.setVariable("CMSO_updateFinalNotifyAckStatusFailedPayload", "")
- execution.setVariable("CMSO_gSendManagedNetworkStatusNotificationResponse", "")
-
- //Set DB adapter variables here
- execution.setVariable("CMSO_updateFinalStatusSuccessPayload", "")
- execution.setVariable("CMSO_updateDBStatusToSuccessPayload", "")
- execution.setVariable("CMSO_updateInfraRequestDBPayload", "")
- execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", "")
- execution.setVariable("CMSO_setUpdateFinalNotifyAckStatusPayload", "")
-
- //NotifyOMXSuccessFailureViaCSI Adapter variables
- execution.setVariable("CMSO_notifyOMXSuccessFailureViaCSIPayload", "")
- execution.setVariable("CMSO_notifyOMXSuccessFailureViaCSIResponseCode", null)
- execution.setVariable("CMSO_notifyOMXSuccessFailureViaCSIResponse", "")
-
- //Auth variables
- execution.setVariable("BasicAuthHeaderValue","")
-
- //Response variables
- execution.setVariable("CompletionHandlerResponse","")
- execution.setVariable("CMSO_ErrorResponse", null)
- execution.setVariable("CMSO_ResponseCode", "")
-
- setSuccessIndicator(execution, false)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
- }
-
- public void preProcessRequest (Execution execution) {
-
- initializeProcessVariables(execution)
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- utils.log("DEBUG", "*** Started CompleteMsoProcess preProcessRequest Method ***", isDebugLogEnabled);
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
- def xml = execution.getVariable("CompleteMsoProcessRequest")
-
- utils.logAudit("CompleteMsoProcess Request: " + xml)
- utils.log("DEBUG", "Incoming Request is: "+ xml, isDebugLogEnabled)
-
- //mso-bpel-name from the incoming request
- def msoBpelName = utils.getNodeText1(xml,"mso-bpel-name")
- execution.setVariable("CMSO_mso-bpel-name",msoBpelName)
-
- //Check the incoming request type
- //Incoming request can be ACTIVE_REQUESTS (request-information node) or INFRA_ACTIVE_REQUESTS (request-info node)
- if (utils.nodeExists(xml, "request-information")) {
- execution.setVariable("CMSO_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
- }
-
- //Check notification-url for the incoming request type
- //ACTIVE_REQUESTS may have notificationurl node
- //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
- def notificationurl = ""
- if (utils.nodeExists(xml, "notification-url")) {
- notificationurl = utils.getNodeText(xml,"notification-url")
- if(notificationurl != null && !notificationurl.isEmpty()) {
- execution.setVariable("CMSO_notification-url-Ok", true)
- execution.setVariable("CMSO_notification-url",notificationurl)
- }
- }
-
- //Check request_id for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
- //For ACTIVE_REQUESTS payload request-id is NOT optional
- def request_id = ""
- if (utils.nodeExists(xml, "request-id")) {
- execution.setVariable("CMSO_request_id",utils.getNodeText(xml,"request-id"))
- }
-
-
- // INFRA_ACTIVE_REQUESTS have "action" element ... mandatory
- // ACTIVE_REQUEST have "request-action" ... mandatory
- if (utils.nodeExists(xml, "request-action")) {
- execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"request-action"))
- } else if (utils.nodeExists(xml, "action")) {
- execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"action"))
- }
-
- //Check source for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload source IS optional
- //For ACTIVE_REQUESTS payload source is NOT optional
- def source = ""
- if (utils.nodeExists(xml, "source")) {
- execution.setVariable("CMSO_source",utils.getNodeText(xml,"source"))
- }
-
- utils.log("DEBUG", "CMSO_notification-url-Ok --> " + execution.getVariable("CMSO_notification-url-Ok"), isDebugLogEnabled)
- utils.log("DEBUG", "CMSO_request_id-Ok --> " + execution.getVariable("CMSO_request_id-Ok"), isDebugLogEnabled)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- utils.log("DEBUG", "Exception Occured During PreProcessRequest: " + e, isDebugLogEnabled);
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
-
- utils.log("DEBUG", "*** Completed CompleteMsoProcess preProcessRequest Method ***", isDebugLogEnabled);
- }
-
- public void postProcessResponse (Execution execution) {
-
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- utils.log("DEBUG", "*** Started CompleteMsoProcess PostProcessRequest Method ***", isDebugLogEnabled);
- try {
-
- def msoCompletionResponse = """
- <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1">
- <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} completed</sdncadapterworkflow:out>
- </sdncadapterworkflow:MsoCompletionResponse>
- """.trim()
-
- // Format Response
- def xmlMsoCompletionResponse = utils.formatXML(msoCompletionResponse)
- String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
- execution.setVariable("WorkflowResponse", buildMsoCompletionResponseAsString)
- utils.logAudit("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
- execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
- execution.setVariable("CMSO_ResponseCode", "200")
-
- setSuccessIndicator(execution, true)
-
- utils.log("DEBUG", "@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompleteMsoProcessResponse"), isDebugLogEnabled)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- utils.log("DEBUG", "*** Completed CompleteMsoProcess PostProcessRequest Method ***", isDebugLogEnabled);
-
- }
-
- public void updateFinalNotifyAckStatusSuccessPayload (Execution execution){
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
-
- def deliveryStatus = execution.getVariable("CMSO_deliveryStatus")
- String responseStatus = ""
- String responseCode = ""
- String responseBodyXml = ""
-
- if(deliveryStatus == true){
- responseStatus = "SUCCESS"
- responseCode = "200"
- responseBodyXml = """<responseBody>${execution.getVariable("CMSO_gSendManagedNetworkStatusNotificationResponse")}</responseBody>"""
- }else{
- responseStatus = "FAILED"
- responseCode = execution.getVariable("CCDStatusCode")
- }
-
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <responseStatus>${responseStatus}</responseStatus>
- <responseCode>${responseCode}</responseCode>
- ${responseBodyXml}
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- execution.setVariable("CMSO_updateFinalNotifyAckStatusSuccessPayload", payload)
- utils.logAudit("updateFinalNotifyAckStatusPayload: " + payload)
- logDebug('Exited ' + method, isDebugLogEnabled)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- }
-
-
- public String updateFinalStatusSuccessPayload (Execution execution){
-
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <responseStatus>SUCCESS</responseStatus>
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
- execution.setVariable("CMSO_updateFinalStatusSuccessPayload", payload)
- utils.logAudit("updateFinalStatusSuccessPayload: " + payload)
- logDebug('Exited ' + method, isDebugLogEnabled)
- //println("CMSO_updateFinalStatusSuccessPayload --> " + execution.getVariable("CMSO_updateFinalStatusSuccessPayload"))
-
- return execution.getVariable("CMSO_updateFinalStatusSuccessPayload")
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- }
-
- public void updateDBStatusToSuccessPayload (Execution execution){
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
-
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateStatus>
- <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <status>COMPLETED</status>
- </req:updateStatus>
- </soapenv:Body>
- </soapenv:Envelope>
- """
- execution.setVariable("CMSO_updateDBStatusToSuccessPayload", payload)
- utils.logAudit("updateDBStatusToSuccessPayload: " + payload)
- logDebug('Exited ' + method, isDebugLogEnabled)
- //println("CMSO_updateDBStatusToSuccessPayload --> " + execution.getVariable("CMSO_updateDBStatusToSuccessPayload"))
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- }
-
- public void setUpdateDBstatustoSuccessPayload (Execution execution){
-
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
-
- def xml = execution.getVariable("CompleteMsoProcessRequest")
-
- //Get statusMessage if exists
- def statusMessage
- if(utils.nodeExists(xml, "status-message")){
- statusMessage = utils.getNodeText1(xml, "status-message")
- }else{
- statusMessage = "Resource Completed Successfully"
- }
-
- //Get instance Id if exist
- String idXml = ""
- if(utils.nodeExists(xml, "vnfId")){
- idXml = utils.getNodeXml(xml, "vnfId")
- }else if(utils.nodeExists(xml, "networkId")){
- idXml = utils.getNodeXml(xml, "networkId")
- }else if(utils.nodeExists(xml, "serviceInstanceId")){
- idXml = utils.getNodeXml(xml, "serviceInstanceId")
- }else if(utils.nodeExists(xml, "vfModuleId")){
- idXml = utils.getNodeXml(xml, "vfModuleId")
- }else if(utils.nodeExists(xml, "volumeGroupId")){
- idXml = utils.getNodeXml(xml, "volumeGroupId")
- }else{
- idXml = ""
- }
- idXml = utils.removeXmlPreamble(idXml)
- utils.log("DEBUG", "Incoming Instance Id Xml: " + idXml, isDebugLogEnabled)
-
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
- <lastModifiedBy>${execution.getVariable("CMSO_mso-bpel-name")}</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <requestStatus>COMPLETE</requestStatus>
- <progress>100</progress>
- ${idXml}
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", payload)
- utils.log("DEBUG", "Outgoing Update Mso Request Payload is: " + payload, isDebugLogEnabled)
- utils.logAudit("setUpdateDBstatustoSuccessPayload: " + payload)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-
- public String updateFinalNotifyAckStatusPayload (Execution execution){
-
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateResponseStatus>
- <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
- </req:updateResponseStatus>
- </soapenv:Body>
- </soapenv:Envelope>
- """
- execution.setVariable("CMSO_setUpdateFinalNotifyAckStatusPayload", payload)
- utils.logAudit("updateFinalNotifyAckStatusPayload: " + payload)
- logDebug('Exited ' + method, isDebugLogEnabled)
-
- return execution.getVariable("CMSO_setUpdateFinalNotifyAckStatusPayload")
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
- }
-
- // public void decryptMsoPassword (Execution execution) {
- //
- // def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- // def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- // logDebug('Entered ' + method, isDebugLogEnabled)
- // try {
- // def encryptedPwd=execution.getVariable("URN_mso_csi_pwd")
- // def msoKey = execution.getVariable("URN_mso_msoKey")
- //
- // String basicAuthValue = utils.getBasicAuth(encryptedPwd, msoKey)
- // execution.setVariable("BasicAuthHeaderValueCSI",basicAuthValue)
- // logDebug('Exited ' + method, isDebugLogEnabled)
- // } catch (BpmnError e) {
- // throw e;
- // } catch (IOException e) {
- // logError('Caught exception in ' + method, e)
- // workflowException(execution, 'Internal Error', 2000)
- // }
- // }
-
- public String notifyOMXSuccessFailureViaCSIPayload (Execution execution) {
-
- return "";
- }
-
- public String notifyCCDSuccessPayload (Execution execution) {
-
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
-
- String payload ="""
- <ns:status-notification xmlns:ns="http://ecomp.att.com/mso/statusnotification/schema/v1" xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1">
- <msoservtypes:request-id>${execution.getVariable("CMSO_request_id")}</msoservtypes:request-id>
- <msoservtypes:request-action>${execution.getVariable("CMSO_request_action")}</msoservtypes:request-action>
- <msoservtypes:source>${execution.getVariable("CMSO_source")}</msoservtypes:source>
- <msoservtypes:ack-final-indicator>Y</msoservtypes:ack-final-indicator>
- </ns:status-notification>
- """
- execution.setVariable("CMSO_notifyCCDSuccessPayload", payload)
- utils.logAudit("notifyCCDSuccessPayload: " + payload)
- logDebug('Exited ' + method, isDebugLogEnabled)
-
- return execution.getVariable("CMSO_notifyCCDSuccessPayload")
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
-
- }
-
- public void buildDataError (Execution execution, String message) {
-
- def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
- try {
-
- def msoCompletionResponse = """
- <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1">
- <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} FAILED</sdncadapterworkflow:out>
- </sdncadapterworkflow:MsoCompletionResponse>
- """.trim()
-
- // Format Response
- def xmlMsoCompletionResponse = utils.formatXml(msoCompletionResponse)
- String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
- utils.logAudit("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
- execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
- utils.log("DEBUG", "@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompletionHandlerResponse"), isDebugLogEnabled)
-
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, message)
-
- } catch (BpmnError e) {
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugLogEnabled)
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+
+public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
+
+ String Prefix="CMSO_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ // Complete MSO Request processing
+ public initializeProcessVariables(Execution execution){
+
+ def method = getClass().getSimpleName() + '.initializeProcessVariables(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ try {
+
+ /* Initialize all the process request variables in this block */
+ execution.setVariable("prefix",Prefix)
+ execution.setVariable("CMSO_request_id","")
+ execution.setVariable("CMSO_notification-url","")
+ execution.setVariable("CMSO_mso-bpel-name","")
+ execution.setVariable("CMSO_request_action","")
+ execution.setVariable("CMSO_notification-url-Ok", false)
+ execution.setVariable("CMSO_request_id-Ok", false)
+
+ //updateRequest Adapter process variables
+ execution.setVariable("CMSO_updateRequestResponse", "")
+ execution.setVariable("CMSO_updateRequestResponseCode", "")
+ execution.setVariable("CMSO_updateFinalNotifyAckStatusFailedPayload", "")
+
+ //Set DB adapter variables here
+ execution.setVariable("CMSO_updateDBStatusToSuccessPayload", "")
+ execution.setVariable("CMSO_updateInfraRequestDBPayload", "")
+ execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", "")
+
+ //Auth variables
+ execution.setVariable("BasicAuthHeaderValue","")
+
+ //Response variables
+ execution.setVariable("CompletionHandlerResponse","")
+ execution.setVariable("CMSO_ErrorResponse", null)
+ execution.setVariable("CMSO_ResponseCode", "")
+
+ setSuccessIndicator(execution, false)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+
+ }
+
+ public void preProcessRequest (Execution execution) {
+
+ initializeProcessVariables(execution)
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+// utils.log("DEBUG", "*** Started CompleteMsoProcess preProcessRequest Method ***", isDebugLogEnabled);
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ try {
+ def xml = execution.getVariable("CompleteMsoProcessRequest")
+
+ utils.logAudit("CompleteMsoProcess Request: " + xml)
+ utils.log("DEBUG", "Incoming Request is: "+ xml, isDebugLogEnabled)
+
+ //mso-bpel-name from the incoming request
+ def msoBpelName = utils.getNodeText1(xml,"mso-bpel-name")
+ execution.setVariable("CMSO_mso-bpel-name",msoBpelName)
+
+ //Check the incoming request type
+ //Incoming request can be ACTIVE_REQUESTS (request-information node) or INFRA_ACTIVE_REQUESTS (request-info node)
+ if (utils.nodeExists(xml, "request-information")) {
+ execution.setVariable("CMSO_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
+ }
+
+ //Check notification-url for the incoming request type
+ //ACTIVE_REQUESTS may have notificationurl node
+ //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
+ def notificationurl = ""
+ if (utils.nodeExists(xml, "notification-url")) {
+ notificationurl = utils.getNodeText(xml,"notification-url")
+ if(notificationurl != null && !notificationurl.isEmpty()) {
+ execution.setVariable("CMSO_notification-url-Ok", true)
+ execution.setVariable("CMSO_notification-url",notificationurl)
+ }
+ }
+
+ //Check request_id for the incoming request type
+ //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
+ //For ACTIVE_REQUESTS payload request-id is NOT optional
+ def request_id = ""
+ if (utils.nodeExists(xml, "request-id")) {
+ execution.setVariable("CMSO_request_id",utils.getNodeText(xml,"request-id"))
+ }
+
+
+ // INFRA_ACTIVE_REQUESTS have "action" element ... mandatory
+ // ACTIVE_REQUEST have "request-action" ... mandatory
+ if (utils.nodeExists(xml, "request-action")) {
+ execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"request-action"))
+ } else if (utils.nodeExists(xml, "action")) {
+ execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"action"))
+ }
+
+ //Check source for the incoming request type
+ //For INFRA_ACTIVE_REQUESTS payload source IS optional
+ //For ACTIVE_REQUESTS payload source is NOT optional
+ def source = ""
+ if (utils.nodeExists(xml, "source")) {
+ execution.setVariable("CMSO_source",utils.getNodeText(xml,"source"))
+ }
+
+ utils.log("DEBUG", "CMSO_notification-url-Ok --> " + execution.getVariable("CMSO_notification-url-Ok"), isDebugLogEnabled)
+ utils.log("DEBUG", "CMSO_request_id-Ok --> " + execution.getVariable("CMSO_request_id-Ok"), isDebugLogEnabled)
+
+ // set the DHV/Service Instantiation values if specified in the request
+ execution.setVariable("CMSO_is_srv_inst_req", String.valueOf("true".equals(utils.getNodeText1(xml, "is-srv-inst-req"))))
+ utils.log("DEBUG", "CMSO_is_srv_inst_req --> " + execution.getVariable("CMSO_is_srv_inst_req"), isDebugLogEnabled)
+ execution.setVariable("CMSO_is_json_content", String.valueOf("JSON".equals(utils.getNodeText1(xml, "resp-content-type"))))
+ utils.log("DEBUG", "CMSO_is_json_content --> " + execution.getVariable("CMSO_is_json_content"), isDebugLogEnabled)
+ execution.setVariable("CMSO_service_inst_id", utils.getNodeText1(xml, "service-instance-id"))
+ utils.log("DEBUG", "CMSO_service_inst_id --> " + execution.getVariable("CMSO_service_inst_id"), isDebugLogEnabled)
+ execution.setVariable("CMSO_start_time", utils.getNodeText1(xml, "start-time"))
+ utils.log("DEBUG", "CMSO_start_time --> " + execution.getVariable("CMSO_start_time"), isDebugLogEnabled)
+ // this variable is used by the camunda flow to set the Content-Type for the async response
+ if (execution.getVariable("CMSO_is_srv_inst_req").equals("true") &&
+ execution.getVariable("CMSO_is_json_content").equals("true")) {
+ execution.setVariable("CMSO_content_type", "application/json")
+ } else {
+ execution.setVariable("CMSO_content_type", "text/xml")
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ utils.log("DEBUG", "Exception Occured During PreProcessRequest: " + e, isDebugLogEnabled);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+ }
+
+// utils.log("DEBUG", "*** Completed CompleteMsoProcess preProcessRequest Method ***", isDebugLogEnabled);
+ }
+
+ public void postProcessResponse (Execution execution) {
+
+ def method = getClass().getSimpleName() + '.postProcessResponse(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+// utils.log("DEBUG", "*** Started CompleteMsoProcess PostProcessRequest Method ***", isDebugLogEnabled);
+ try {
+
+ def msoCompletionResponse = """
+ <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} completed</sdncadapterworkflow:out>
+ </sdncadapterworkflow:MsoCompletionResponse>
+ """.trim()
+
+ // Format Response
+ def xmlMsoCompletionResponse = utils.formatXML(msoCompletionResponse)
+ String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
+ // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+ execution.setVariable("WorkflowResponse", buildMsoCompletionResponseAsString)
+ utils.logAudit("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
+ execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
+ execution.setVariable("CMSO_ResponseCode", "200")
+
+ setSuccessIndicator(execution, true)
+
+ utils.log("DEBUG", "@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompleteMsoProcessResponse"), isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+// utils.log("DEBUG", "*** Completed CompleteMsoProcess PostProcessRequest Method ***", isDebugLogEnabled);
+
+ }
+
+ public void updateDBStatusToSuccessPayload (Execution execution){
+ def method = getClass().getSimpleName() + '.updateDBStatusToSuccessPayload(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
+
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateStatus>
+ <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <status>COMPLETED</status>
+ </req:updateStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+ execution.setVariable("CMSO_updateDBStatusToSuccessPayload", payload)
+ utils.logAudit("updateDBStatusToSuccessPayload: " + payload)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ //println("CMSO_updateDBStatusToSuccessPayload --> " + execution.getVariable("CMSO_updateDBStatusToSuccessPayload"))
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+ }
+
+ public void setUpdateDBstatustoSuccessPayload (Execution execution){
+
+ def method = getClass().getSimpleName() + '.setUpdateDBstatustoSuccessPayload(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
+
+ def xml = execution.getVariable("CompleteMsoProcessRequest")
+
+ //Get statusMessage if exists
+ def statusMessage
+ if(utils.nodeExists(xml, "status-message")){
+ statusMessage = utils.getNodeText1(xml, "status-message")
+ }else{
+ statusMessage = "Resource Completed Successfully"
+ }
+
+ //Get instance Id if exist
+ String idXml = ""
+ if(utils.nodeExists(xml, "vnfId")){
+ idXml = utils.getNodeXml(xml, "vnfId")
+ }else if(utils.nodeExists(xml, "networkId")){
+ idXml = utils.getNodeXml(xml, "networkId")
+ }else if(utils.nodeExists(xml, "serviceInstanceId")){
+ idXml = utils.getNodeXml(xml, "serviceInstanceId")
+ }else if(utils.nodeExists(xml, "vfModuleId")){
+ idXml = utils.getNodeXml(xml, "vfModuleId")
+ }else if(utils.nodeExists(xml, "volumeGroupId")){
+ idXml = utils.getNodeXml(xml, "volumeGroupId")
+ }else{
+ idXml = ""
+ }
+ idXml = utils.removeXmlPreamble(idXml)
+ utils.log("DEBUG", "Incoming Instance Id Xml: " + idXml, isDebugLogEnabled)
+
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
+ <lastModifiedBy>${execution.getVariable("CMSO_mso-bpel-name")}</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ ${idXml}
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", payload)
+ utils.log("DEBUG", "Outgoing Update Mso Request Payload is: " + payload, isDebugLogEnabled)
+ utils.logAudit("setUpdateDBstatustoSuccessPayload: " + payload)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+
+ public void buildDataError (Execution execution, String message) {
+
+ def method = getClass().getSimpleName() + '.buildDataError(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ try {
+
+ def msoCompletionResponse = """
+ <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} FAILED</sdncadapterworkflow:out>
+ </sdncadapterworkflow:MsoCompletionResponse>
+ """.trim()
+
+ // Format Response
+ def xmlMsoCompletionResponse = utils.formatXml(msoCompletionResponse)
+ String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
+ utils.logAudit("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
+ execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
+ utils.log("DEBUG", "@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompletionHandlerResponse"), isDebugLogEnabled)
+
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, message)
+
+ } catch (BpmnError e) {
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugLogEnabled)
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
index b13fff7ae9..ae4a758141 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
@@ -1,171 +1,159 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-
-public class ConfirmVolumeGroupName extends AbstractServiceTaskProcessor{
-
- def Prefix="CVGN_"
-
- public void initProcessVariables(Execution execution) {
- execution.setVariable("prefix",Prefix)
- execution.setVariable("CVGN_volumeGroupId",null)
- execution.setVariable("CVGN_volumeGroupName",null)
- execution.setVariable("CVGN_aicCloudRegion", null)
- execution.setVariable("CVGN_volumeGroupGetEndpoint",null)
-
- // ConfirmVolumeGroupName workflow response variable placeholders
- execution.setVariable("CVGN_volumeGroupNameMatches", false)
- execution.setVariable("CVGN_queryVolumeGroupResponseCode",null)
- execution.setVariable("CVGN_queryVolumeGroupResponse","")
- execution.setVariable("CVGN_ResponseCode",null)
-// execution.setVariable("CVGN_ErrorResponse","")
- execution.setVariable("RollbackData", null)
- }
-
- // store the incoming data in the flow Execution
- public void preProcessRequest(Execution execution) {
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- def volumeGroupId = execution.getVariable("ConfirmVolumeGroupName_volumeGroupId")
- def volumeGroupName= execution.getVariable("ConfirmVolumeGroupName_volumeGroupName")
- def aicCloudRegion = execution.getVariable("ConfirmVolumeGroupName_aicCloudRegion")
-
- initProcessVariables(execution)
- execution.setVariable("CVGN_volumeGroupId", volumeGroupId)
- execution.setVariable("CVGN_volumeGroupName", volumeGroupName)
- execution.setVariable("CVGN_aicCloudRegion", aicCloudRegion)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getCloudInfrastructureCloudRegionUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
-
- execution.setVariable("CVGN_volumeGroupGetEndpoint","${aai_uri}/${aicCloudRegion}/volume-groups/volume-group/" +
- volumeGroupId)
- }
-
- // send a GET request to AA&I to retrieve the Volume information based on volume-group-id
- // expect a 200 response with the information in the response body or a 404 if the volume group id does not exist
- public void queryAAIForVolumeGroupId(Execution execution) {
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CVGN_volumeGroupGetEndpoint")
- def aaiRequestId = UUID.randomUUID().toString()
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(endPoint);
- utils.log("DEBUG","queryAAIForVolumeGroupId() endpoint-" + endPoint, isDebugLogEnabled)
- def responseData = ""
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
- addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- logDebug("invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugLogEnabled)
- APIResponse response = client.httpGet()
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable("CVGN_queryVolumeGroupResponseCode", response.getStatusCode())
- execution.setVariable("CVGN_queryVolumeGroupResponse", responseData)
- logDebug("Response code:" + response.getStatusCode(), isDebugLogEnabled)
- logDebug("Response:" + System.lineSeparator()+responseData,isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug("Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugLogEnabled)
- execution.setVariable("CVGN_queryVolumeGroupResponseCode", 500)
- execution.setVariable("CVGN_queryVolumeGroupResponse", "AAI GET Failed:" + ex.getMessage())
- }
- }
-
- // process the result from queryAAIVolumeGroupId()
-
- public void checkAAIQueryResult(Execution execution) {
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- def result = execution.getVariable("CVGN_queryVolumeGroupResponse")
-
- if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 404) {
- logDebug('volumeGroupId does not exist in AAI', isDebugLogEnabled)
- }
- else if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 200) {
- logDebug("volumeGroupId exists in AAI", isDebugLogEnabled)
- }
- def xml = execution.getVariable("CVGN_queryVolumeGroupResponse")
- def actualVolumeGroupName = ""
- if (utils.nodeExists(xml, "volume-group-name")) {
- actualVolumeGroupName = utils.getNodeText(xml, "volume-group-name")
- }
- execution.setVariable("CVGN_volumeGroupNameMatches", false)
- def volumeGroupName = execution.getVariable("CVGN_volumeGroupName")
-
- if (volumeGroupName.equals(actualVolumeGroupName)) {
- logDebug('Volume Group Name Matches AAI records', isDebugLogEnabled)
- execution.setVariable("CVGN_volumeGroupNameMatches", true)
- }
- }
-
-
- // generates a WorkflowException if the A&AI query returns a response code other than 200/404
- public void handleAAIQueryFailure(Execution execution) {
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
-
- logError("Error occurred attempting to query AAI, Response Code " +
- execution.getVariable("CVGN_queryVolumeGroupResponseCode") + ", Error Response " +
- execution.getVariable("CVGN_queryVolumeGroupResponse"))
- //String processKey = getProcessKey(execution);
- //WorkflowException exception = new WorkflowException(processKey, 5000,
- //execution.getVariable("CVGN_queryVolumeGroupResponse"))
- //execution.setVariable("WorkflowException", exception)
- }
-
- // generates a WorkflowException if the volume group name does not match AAI record for this volume group
- public void handleVolumeGroupNameNoMatch(Execution execution) {
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
-
- def errorNotAssociated = "Error occurred - volume group id " + execution.getVariable("CVGN_volumeGroupId") +
- " is not associated with " + execution.getVariable("CVGN_volumeGroupName")
- logError(errorNotAssociated)
- createWorkflowException(execution, 1002, errorNotAssociated)
- //String processKey = getProcessKey(execution);
- //WorkflowException exception = new WorkflowException(processKey, 1002,
- // errorNotAssociated)
- //execution.setVariable("WorkflowException", exception)
- }
-
- // sends a successful WorkflowResponse
- public void reportSuccess(Execution execution) {
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- logDebug("Sending 200 back to the caller", isDebugLogEnabled)
- def responseXML = ""
- execution.setVariable("WorkflowResponse", responseXML)
- }
-
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+
+
+public class ConfirmVolumeGroupName extends AbstractServiceTaskProcessor{
+
+ def Prefix="CVGN_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable("prefix",Prefix)
+ execution.setVariable("CVGN_volumeGroupId",null)
+ execution.setVariable("CVGN_volumeGroupName",null)
+ execution.setVariable("CVGN_aicCloudRegion", null)
+ execution.setVariable("CVGN_volumeGroupGetEndpoint",null)
+
+ // ConfirmVolumeGroupName workflow response variable placeholders
+ execution.setVariable("CVGN_volumeGroupNameMatches", false)
+ execution.setVariable("CVGN_queryVolumeGroupResponseCode",null)
+ execution.setVariable("CVGN_queryVolumeGroupResponse","")
+ execution.setVariable("CVGN_ResponseCode",null)
+// execution.setVariable("CVGN_ErrorResponse","")
+ execution.setVariable("RollbackData", null)
+ }
+
+ // store the incoming data in the flow Execution
+ public void preProcessRequest(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def volumeGroupId = execution.getVariable("ConfirmVolumeGroupName_volumeGroupId")
+ def volumeGroupName= execution.getVariable("ConfirmVolumeGroupName_volumeGroupName")
+ def aicCloudRegion = execution.getVariable("ConfirmVolumeGroupName_aicCloudRegion")
+
+ initProcessVariables(execution)
+ execution.setVariable("CVGN_volumeGroupId", volumeGroupId)
+ execution.setVariable("CVGN_volumeGroupName", volumeGroupName)
+ execution.setVariable("CVGN_aicCloudRegion", aicCloudRegion)
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getCloudInfrastructureCloudRegionUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ utils.logAudit("AAI URI: " + aai_uri)
+ execution.setVariable("CVGN_volumeGroupGetEndpoint","${aai_uri}/${aicCloudRegion}/volume-groups/volume-group/" +
+ volumeGroupId)
+ }
+
+ // send a GET request to AA&I to retrieve the Volume information based on volume-group-id
+ // expect a 200 response with the information in the response body or a 404 if the volume group id does not exist
+ public void queryAAIForVolumeGroupId(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CVGN_volumeGroupGetEndpoint")
+
+ try {
+ logDebug("invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugLogEnabled)
+ utils.log("DEBUG","queryAAIForVolumeGroupId() endpoint-" + endPoint, isDebugLogEnabled)
+ utils.logAudit("ConfirmVolumeGroup sending GET call to AAI Endpoint: " + endPoint)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint)
+ def responseData = response.getResponseBodyAsString()
+ def responseStatusCode = response.getStatusCode()
+ execution.setVariable("CVGN_queryVolumeGroupResponseCode", responseStatusCode)
+ execution.setVariable("CVGN_queryVolumeGroupResponse", responseData)
+
+ utils.logAudit("Response code:" + responseStatusCode)
+ utils.logAudit("Response:" + responseData)
+ logDebug("Response code:" + responseStatusCode, isDebugLogEnabled)
+ logDebug("Response:" + System.lineSeparator()+responseData,isDebugLogEnabled)
+ } catch (Exception ex) {
+ // ex.printStackTrace()
+ logDebug("Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugLogEnabled)
+ execution.setVariable("CVGN_queryVolumeGroupResponseCode", 500)
+ execution.setVariable("CVGN_queryVolumeGroupResponse", "AAI GET Failed:" + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "AAI GET Failed")
+ }
+ }
+
+ // process the result from queryAAIVolumeGroupId()
+
+ public void checkAAIQueryResult(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def result = execution.getVariable("CVGN_queryVolumeGroupResponse")
+
+ if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 404) {
+ logDebug('volumeGroupId does not exist in AAI', isDebugLogEnabled)
+ }
+ else if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 200) {
+ logDebug("volumeGroupId exists in AAI", isDebugLogEnabled)
+ }
+ def xml = execution.getVariable("CVGN_queryVolumeGroupResponse")
+ def actualVolumeGroupName = ""
+ if (utils.nodeExists(xml, "volume-group-name")) {
+ actualVolumeGroupName = utils.getNodeText(xml, "volume-group-name")
+ }
+ execution.setVariable("CVGN_volumeGroupNameMatches", false)
+ def volumeGroupName = execution.getVariable("CVGN_volumeGroupName")
+
+ if (volumeGroupName.equals(actualVolumeGroupName)) {
+ logDebug('Volume Group Name Matches AAI records', isDebugLogEnabled)
+ execution.setVariable("CVGN_volumeGroupNameMatches", true)
+ }
+ }
+
+
+ // generates a WorkflowException if the A&AI query returns a response code other than 200/404
+ public void handleAAIQueryFailure(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+
+ logError("Error occurred attempting to query AAI, Response Code " +
+ execution.getVariable("CVGN_queryVolumeGroupResponseCode") + ", Error Response " +
+ execution.getVariable("CVGN_queryVolumeGroupResponse"))
+ //String processKey = getProcessKey(execution);
+ //WorkflowException exception = new WorkflowException(processKey, 5000,
+ //execution.getVariable("CVGN_queryVolumeGroupResponse"))
+ //execution.setVariable("WorkflowException", exception)
+ }
+
+ // generates a WorkflowException if the volume group name does not match AAI record for this volume group
+ public void handleVolumeGroupNameNoMatch(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+
+ def errorNotAssociated = "Error occurred - volume group id " + execution.getVariable("CVGN_volumeGroupId") +
+ " is not associated with " + execution.getVariable("CVGN_volumeGroupName")
+ logError(errorNotAssociated)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, errorNotAssociated)
+ //String processKey = getProcessKey(execution);
+ //WorkflowException exception = new WorkflowException(processKey, 1002,
+ // errorNotAssociated)
+ //execution.setVariable("WorkflowException", exception)
+ }
+
+ // sends a successful WorkflowResponse
+ public void reportSuccess(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ logDebug("Sending 200 back to the caller", isDebugLogEnabled)
+ def responseXML = ""
+ execution.setVariable("WorkflowResponse", responseXML)
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
index 45ffd5552f..cc26d9fa35 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
@@ -1,202 +1,193 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-import javax.xml.transform.Transformer
-import javax.xml.transform.TransformerFactory
-import javax.xml.transform.TransformerException
-import javax.xml.transform.dom.DOMSource
-import javax.xml.transform.stream.StreamResult
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-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 org.apache.commons.codec.binary.Base64
-import org.apache.commons.lang3.*
-
-
-/**
- * Vnf Module Subflow for confirming the volume group belongs
- * to the tenant
- *
- * @param tenantId
- * @param volumeGroupId
- *
- */
-class ConfirmVolumeGroupTenant extends AbstractServiceTaskProcessor{
-
- String Prefix="CVGT_"
-
- public void preProcessRequest(Execution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
- utils.log("DEBUG", " ======== STARTED Confirm Volume Group Tenant Subflow ======== ", isDebugEnabled)
- String processKey = getProcessKey(execution);
- try{
- utils.log("DEBUG", " === Started QueryAAIForVolumeGroup Process === ", isDebugEnabled)
-
- String volumeGroupId = execution.getVariable("volumeGroupId")
- String incomingGroupName = execution.getVariable("volumeGroupName")
- String incomingTenantId = execution.getVariable("tenantId")
- def aicCloudRegion = execution.getVariable("aicCloudRegion")
- String aai = execution.getVariable("URN_aai_endpoint")
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getCloudInfrastructureCloudRegionUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
-
- String path = aai + "${aai_uri}/${aicCloudRegion}/volume-groups/volume-group/" + volumeGroupId
-
- APIResponse queryAAIForVolumeGroupResponse = aaiUriUtil.executeAAIGetCall(execution, path)
-
- def responseCode = queryAAIForVolumeGroupResponse.getStatusCode()
- execution.setVariable("queryVolumeGroupResponseCode", responseCode)
- String response = queryAAIForVolumeGroupResponse.getResponseBodyAsString()
- response = StringEscapeUtils.unescapeXml(response)
-
- if(responseCode == 200 && response != null){
- execution.setVariable("queryAAIVolumeGroupResponse", response)
- utils.log("DEBUG", "QueryAAIForVolumeGroup Received a Good REST Response is: \n" + response, isDebugEnabled)
-
- String volumeGroupTenantId = ""
- InputSource source = new InputSource(new StringReader(response));
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- docFactory.setNamespaceAware(true)
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
- Document createVCERequestXml = docBuilder.parse(source)
- NodeList nodeList = createVCERequestXml.getElementsByTagNameNS("*", "relationship")
- for (int x = 0; x < nodeList.getLength(); x++) {
- Node node = nodeList.item(x)
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- String e = eElement.getElementsByTagNameNS("*", "related-to").item(0).getTextContent()
- if(e.equals("tenant")){
- NodeList relationDataList = eElement.getElementsByTagNameNS("*", "relationship-data")
- for (int d = 0; d < relationDataList.getLength(); d++) {
- Node dataNode = relationDataList.item(d)
- if (dataNode.getNodeType() == Node.ELEMENT_NODE) {
- Element dElement = (Element) dataNode
- String key = dElement.getElementsByTagNameNS("*", "relationship-key").item(0).getTextContent()
- if(key.equals("tenant.tenant-id")){
- volumeGroupTenantId = dElement.getElementsByTagNameNS("*", "relationship-value").item(0).getTextContent()
- }
- }
- }
- }
- }
- }
-
- //Determine if Tenant Ids match
- if(incomingTenantId.equals(volumeGroupTenantId)){
- utils.log("DEBUG", "Tenant Ids Match", isDebugEnabled)
- execution.setVariable("tenantIdsMatch", true)
- }else{
- utils.log("DEBUG", "Tenant Ids DO NOT Match", isDebugEnabled)
- execution.setVariable("tenantIdsMatch", false)
- }
-
- //Determine if Volume Group Names match
- String volumeGroupName = utils.getNodeText1(response, "volume-group-name")
- if(incomingGroupName == null || incomingGroupName.length() < 1){
- utils.log("DEBUG", "Incoming Volume Group Name is NOT Provided.", isDebugEnabled)
- execution.setVariable("groupNamesMatch", true)
- }else{
- utils.log("DEBUG", "Incoming Volume Group Name is: " + incomingGroupName, isDebugEnabled)
- if(volumeGroupName.equals(incomingGroupName)){
- utils.log("DEBUG", "Volume Group Names Match.", isDebugEnabled)
- execution.setVariable("groupNamesMatch", true)
- }else{
- utils.log("DEBUG", "Volume Group Names DO NOT Match.", isDebugEnabled)
- execution.setVariable("groupNamesMatch", false)
- }
- }
- }else{
- utils.log("DEBUG", "QueryAAIForVolumeGroup Bad REST Response!", isDebugEnabled)
- WorkflowException exception = new WorkflowException(processKey, 1, "Error Searching AAI for Volume Group. Received a Bad Response.")
- execution.setVariable("WorkflowException", exception)
- throw new BpmnError("MSOWorkflowException")
- }
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing queryAAIForVolumeGroup. Exception is:\n" + e, isDebugEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
- utils.log("DEBUG", "=== COMPLETED queryAAIForVolumeGroup Process === ", isDebugEnabled)
- }
-
- public void assignVolumeHeatId(Execution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
- try{
- utils.log("DEBUG", " === Started assignVolumeHeatId Process === ", isDebugEnabled)
-
- String response = execution.getVariable("queryAAIVolumeGroupResponse")
- String heatStackId = utils.getNodeText1(response, "heat-stack-id")
- execution.setVariable("volumeHeatStackId", heatStackId)
- execution.setVariable("ConfirmVolumeGroupTenantResponse", heatStackId)
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
- execution.setVariable("WorkflowResponse", heatStackId)
- utils.log("DEBUG", "Volume Heat Stack Id is: " + heatStackId, isDebugEnabled)
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing assignVolumeHeatId. Exception is:\n" + e, isDebugEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
- utils.log("DEBUG", "=== COMPLETED assignVolumeHeatId Process === ", isDebugEnabled)
- utils.log("DEBUG", "======== COMPLETED Confirm Volume Group Tenant Subflow ======== ", isDebugEnabled)
-}
-
- public void assignWorkflowException(Execution execution, String message){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
- String processKey = getProcessKey(execution);
- utils.log("DEBUG", " === STARTED Assign Workflow Exception === ", isDebugEnabled)
- try{
- String volumeGroupId = execution.getVariable("volumeGroupId")
- int errorCode = 1
- String errorMessage = "Volume Group " + volumeGroupId + " " + message
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage)
- execution.setVariable("WorkflowException", exception)
- execution.setVariable("CVGT_ErrorResponse", "") // Setting for Unit Testing Purposes
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing assignWorkflowException. Exception is:\n" + e, isDebugEnabled)
- }
- utils.log("DEBUG", "=== COMPLETED Assign Workflow Exception ==== ", isDebugEnabled)
- }
-
-
-
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.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.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+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
+
+
+/**
+ * Vnf Module Subflow for confirming the volume group belongs
+ * to the tenant
+ *
+ * @param tenantId
+ * @param volumeGroupId
+ *
+ */
+class ConfirmVolumeGroupTenant extends AbstractServiceTaskProcessor{
+
+ String Prefix="CVGT_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest(Execution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ utils.log("DEBUG", " ======== STARTED Confirm Volume Group Tenant Subflow ======== ", isDebugEnabled)
+ String processKey = getProcessKey(execution);
+ try{
+ utils.log("DEBUG", " === Started QueryAAIForVolumeGroup Process === ", isDebugEnabled)
+
+ String volumeGroupId = execution.getVariable("volumeGroupId")
+ String incomingGroupName = execution.getVariable("volumeGroupName")
+ String incomingTenantId = execution.getVariable("tenantId")
+ def aicCloudRegion = execution.getVariable("aicCloudRegion")
+ String aai = execution.getVariable("URN_aai_endpoint")
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getCloudInfrastructureCloudRegionUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+
+ String path = aai + "${aai_uri}/${aicCloudRegion}/volume-groups/volume-group/" + volumeGroupId
+
+ APIResponse queryAAIForVolumeGroupResponse = aaiUriUtil.executeAAIGetCall(execution, path)
+
+ def responseCode = queryAAIForVolumeGroupResponse.getStatusCode()
+ execution.setVariable("queryVolumeGroupResponseCode", responseCode)
+ String response = queryAAIForVolumeGroupResponse.getResponseBodyAsString()
+ response = StringEscapeUtils.unescapeXml(response)
+
+ utils.logAudit("ConfirmVolumeGroup Response: " + response)
+ utils.logAudit("ConfirmVolumeGroup Response Code: " + responseCode)
+
+ if(responseCode == 200 && response != null){
+ execution.setVariable("queryAAIVolumeGroupResponse", response)
+ utils.log("DEBUG", "QueryAAIForVolumeGroup Received a Good REST Response is: \n" + response, isDebugEnabled)
+
+ String volumeGroupTenantId = ""
+ InputSource source = new InputSource(new StringReader(response));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document createVCERequestXml = docBuilder.parse(source)
+ NodeList nodeList = createVCERequestXml.getElementsByTagNameNS("*", "relationship")
+ for (int x = 0; x < nodeList.getLength(); x++) {
+ Node node = nodeList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ String e = eElement.getElementsByTagNameNS("*", "related-to").item(0).getTextContent()
+ if(e.equals("tenant")){
+ NodeList relationDataList = eElement.getElementsByTagNameNS("*", "relationship-data")
+ for (int d = 0; d < relationDataList.getLength(); d++) {
+ Node dataNode = relationDataList.item(d)
+ if (dataNode.getNodeType() == Node.ELEMENT_NODE) {
+ Element dElement = (Element) dataNode
+ String key = dElement.getElementsByTagNameNS("*", "relationship-key").item(0).getTextContent()
+ if(key.equals("tenant.tenant-id")){
+ volumeGroupTenantId = dElement.getElementsByTagNameNS("*", "relationship-value").item(0).getTextContent()
+ }
+ }
+ }
+ }
+ }
+ }
+
+ //Determine if Tenant Ids match
+ if(incomingTenantId.equals(volumeGroupTenantId)){
+ utils.log("DEBUG", "Tenant Ids Match", isDebugEnabled)
+ execution.setVariable("tenantIdsMatch", true)
+ }else{
+ utils.log("DEBUG", "Tenant Ids DO NOT Match", isDebugEnabled)
+ execution.setVariable("tenantIdsMatch", false)
+ }
+
+ //Determine if Volume Group Names match
+ String volumeGroupName = utils.getNodeText1(response, "volume-group-name")
+ if(incomingGroupName == null || incomingGroupName.length() < 1){
+ utils.log("DEBUG", "Incoming Volume Group Name is NOT Provided.", isDebugEnabled)
+ execution.setVariable("groupNamesMatch", true)
+ }else{
+ utils.log("DEBUG", "Incoming Volume Group Name is: " + incomingGroupName, isDebugEnabled)
+ if(volumeGroupName.equals(incomingGroupName)){
+ utils.log("DEBUG", "Volume Group Names Match.", isDebugEnabled)
+ execution.setVariable("groupNamesMatch", true)
+ }else{
+ utils.log("DEBUG", "Volume Group Names DO NOT Match.", isDebugEnabled)
+ execution.setVariable("groupNamesMatch", false)
+ }
+ }
+ }else{
+ utils.log("DEBUG", "QueryAAIForVolumeGroup Bad REST Response!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1, "Error Searching AAI for Volume Group. Received a Bad Response.")
+ }
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing queryAAIForVolumeGroup. Exception is:\n" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in preProcessRequest.")
+ }
+ utils.log("DEBUG", "=== COMPLETED queryAAIForVolumeGroup Process === ", isDebugEnabled)
+ }
+
+ public void assignVolumeHeatId(Execution execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ try{
+ utils.log("DEBUG", " === Started assignVolumeHeatId Process === ", isDebugEnabled)
+
+ String response = execution.getVariable("queryAAIVolumeGroupResponse")
+ String heatStackId = utils.getNodeText1(response, "heat-stack-id")
+ execution.setVariable("volumeHeatStackId", heatStackId)
+ execution.setVariable("ConfirmVolumeGroupTenantResponse", heatStackId)
+ // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+ execution.setVariable("WorkflowResponse", heatStackId)
+ utils.log("DEBUG", "Volume Heat Stack Id is: " + heatStackId, isDebugEnabled)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing assignVolumeHeatId. Exception is:\n" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in assignVolumeHeatId.")
+ }
+ utils.log("DEBUG", "=== COMPLETED assignVolumeHeatId Process === ", isDebugEnabled)
+ utils.log("DEBUG", "======== COMPLETED Confirm Volume Group Tenant Subflow ======== ", isDebugEnabled)
+}
+
+ public void assignWorkflowException(Execution execution, String message){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ String processKey = getProcessKey(execution);
+ utils.log("DEBUG", " === STARTED Assign Workflow Exception === ", isDebugEnabled)
+ try{
+ String volumeGroupId = execution.getVariable("volumeGroupId")
+ int errorCode = 1
+ String errorMessage = "Volume Group " + volumeGroupId + " " + message
+
+ exceptionUtil.buildWorkflowException(execution, errorCode, errorMessage)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing assignWorkflowException. Exception is:\n" + e, isDebugEnabled)
+ }
+ utils.log("DEBUG", "=== COMPLETED Assign Workflow Exception ==== ", isDebugEnabled)
+ }
+
+
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateAAIVfModule.groovy
index ea01503811..986111ccda 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateAAIVfModule.groovy
@@ -1,623 +1,624 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.runtime.Execution
-import org.springframework.web.util.UriUtils
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-
-public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
-
- def Prefix="CAAIVfMod_"
-
- public void initProcessVariables(Execution execution) {
- execution.setVariable("prefix",Prefix)
- execution.setVariable("CAAIVfMod_vnfId",null)
- execution.setVariable("CAAIVfMod_vnfName",null)
- execution.setVariable("CAAIVfMod_vnfType",null)
- execution.setVariable("CAAIVfMod_serviceId",null)
- execution.setVariable("CAAIVfMod_personaId",null)
- execution.setVariable("CAAIVfMod_personaVer",null)
- execution.setVariable("CAAIVfMod_vnfPersonaId",null)
- execution.setVariable("CAAIVfMod_vnfPersonaVer",null)
- execution.setVariable("CAAIVfMod_isBaseVfModule", false)
- execution.setVariable("CAAIVfMod_moduleName",null)
- execution.setVariable("CAAIVfMod_moduleModelName",null)
- execution.setVariable("CAAIVfMod_newGenericVnf",false)
- execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",null)
- execution.setVariable("CAAIVfMod_genericVnfPutEndpoint",null)
- execution.setVariable("CAAIVfMod_aaiNamespace",null)
- execution.setVariable("CAAIVfMod_moduleExists",false)
- execution.setVariable("CAAIVfMod_baseModuleConflict", false)
- execution.setVariable("CAAIVfMod_vnfNameFromAAI", null)
-
-
- // CreateAAIVfModule workflow response variable placeholders
- execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode",null)
- execution.setVariable("CAAIVfMod_queryGenericVnfResponse","")
- execution.setVariable("CAAIVfMod_createGenericVnfResponseCode",null)
- execution.setVariable("CAAIVfMod_createGenericVnfResponse","")
- execution.setVariable("CAAIVfMod_createVfModuleResponseCode",null)
- execution.setVariable("CAAIVfMod_createVfModuleResponse","")
- execution.setVariable("CAAIVfMod_parseModuleResponse","")
- execution.setVariable("CAAIVfMod_deleteGenericVnfResponseCode",null)
- execution.setVariable("CAAIVfMod_deleteGenericVnfResponse","")
- execution.setVariable("CAAIVfMod_deleteVfModuleResponseCode",null)
- execution.setVariable("CAAIVfMod_deleteVfModuleResponse","")
-// execution.setVariable("CAAIVfMod_ResponseCode",null)
-// execution.setVariable("CAAIVfMod_ErrorResponse","")
- execution.setVariable("CreateAAIVfModuleResponse","")
- execution.setVariable("RollbackData", null)
-
- }
-
- // parse the incoming CREATE_VF_MODULE request and store the Generic VNF
- // and VF Module data in the flow Execution
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("CreateAAIVfModuleRequest")
- utils.log("DEBUG", "input request xml:" + xml, isDebugEnabled)
- initProcessVariables(execution)
-
- def vnfId = ""
- if (utils.nodeExists(xml, "vnf-id")) {
- vnfId = utils.getNodeText(xml,"vnf-id")
- }
- if (vnfId.isEmpty()) {
- execution.setVariable("CAAIVfMod_newGenericVnf", true)
- }
- execution.setVariable("CAAIVfMod_vnfId",vnfId)
-
- def vnfName = ""
- if (utils.nodeExists(xml, "vnf-name")) {
- vnfName = utils.getNodeText(xml,"vnf-name")
- }
- execution.setVariable("CAAIVfMod_vnfName", vnfName)
-
- if (utils.nodeExists(xml, "vnf-type")) {
- execution.setVariable("CAAIVfMod_vnfType",utils.getNodeText(xml,"vnf-type"))
- } else {
- execution.setVariable("CAAIVfMod_vnfType","")
- }
-
- execution.setVariable("CAAIVfMod_serviceId",utils.getNodeText(xml,"service-id"))
-
- if (utils.nodeExists(xml, "persona-model-id")) {
- execution.setVariable("CAAIVfMod_personaId",utils.getNodeText(xml,"persona-model-id"))
- } else {
- execution.setVariable("CAAIVfMod_personaId","")
- }
-
- if (utils.nodeExists(xml, "persona-model-version")) {
- execution.setVariable("CAAIVfMod_personaVer",utils.getNodeText(xml,"persona-model-version"))
- } else {
- execution.setVariable("CAAIVfMod_personaVer","")
- }
-
- if (utils.nodeExists(xml, "vnf-persona-model-id")) {
- execution.setVariable("CAAIVfMod_vnfPersonaId",utils.getNodeText(xml,"vnf-persona-model-id"))
- } else {
- execution.setVariable("CAAIVfMod_vnfPersonaId","")
- }
-
- if (utils.nodeExists(xml, "vnf-persona-model-version")) {
- execution.setVariable("CAAIVfMod_vnfPersonaVer",utils.getNodeText(xml,"vnf-persona-model-version"))
- } else {
- execution.setVariable("CAAIVfMod_vnfPersonaVer","")
- }
-
- //isBaseVfModule
- Boolean isBaseVfModule = false
- if (utils.nodeExists(xml, "is-base-vf-module")) {
- String isBaseVfModuleString = utils.getNodeText(xml, "is-base-vf-module")
- if (isBaseVfModuleString.equals("true")) {
- isBaseVfModule = true
- }
- }
- execution.setVariable("CAAIVfMod_isBaseVfModule", isBaseVfModule)
-
- String isVidRequest = execution.getVariable("isVidRequest")
- if (isVidRequest != null && "true".equals(isVidRequest)) {
- logDebug("VID Request received", isDebugEnabled)
- }
-
- execution.setVariable("CAAIVfMod_moduleName",utils.getNodeText(xml,"vf-module-name"))
- execution.setVariable("CAAIVfMod_moduleModelName",utils.getNodeText(xml,"vf-module-model-name"))
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
- String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
- logDebug('AAI namespace is: ' + aaiNamespace, isDebugEnabled)
-
- execution.setVariable("CAAIVfMod_aaiNamespace","${aaiNamespace}")
-
-
- if (vnfId.isEmpty()) {
- // TBD - assert that the vnfName is not empty
- execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",
- "${aai_uri}/?vnf-name=" +
- UriUtils.encode(vnfName,"UTF-8"))
- } else {
- execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",
- "${aai_uri}/" + UriUtils.encode(vnfId,"UTF-8"))
- }
-
-
- execution.setVariable("CAAIVfMod_genericVnfPutEndpoint","${aai_uri}/")
- }
-
- // send a GET request to AA&I to retrieve the Generic VNF/VF Module information based on a Vnf Name
- // expect a 200 response with the information in the response body or a 404 if the Generic VNF does not exist
- public void queryAAIForGenericVnf(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CAAIVfMod_genericVnfGetEndpoint")
- def aaiRequestId = UUID.randomUUID().toString()
-
- RESTConfig config = new RESTConfig(endPoint);
- utils.log("DEBUG","queryAAIForGenericVnf() endpoint-" + endPoint, isDebugEnabled)
- def responseData = ""
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
- addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- utils.log("DEBUG", "invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugEnabled)
- APIResponse response = client.httpGet()
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode", response.getStatusCode())
- execution.setVariable("CAAIVfMod_queryGenericVnfResponse", responseData)
- utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
- utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- utils.log("DEBUG", "Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugEnabled)
- execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode", 500)
- execution.setVariable("CAAIVfMod_queryGenericVnfResponse", "AAI GET Failed:" + ex.getMessage())
- }
- }
-
- // process the result from queryAAIForGenericVnf()
- // note: this method is primarily for logging as the actual decision logic is embedded in the bpmn flow
- public void processAAIGenericVnfQuery(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def result = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
-
- if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
- execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
- utils.log("DEBUG", "New Generic VNF requested and it does not already exist", isDebugEnabled)
- } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200 &&
- !execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
- utils.log("DEBUG", "Adding module to existing Generic VNF", isDebugEnabled)
- } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200 &&
- execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
- utils.log("DEBUG", "Invalid request for new Generic VNF which already exists", isDebugEnabled)
- execution.setVariable("CAAIVfMod_queryGenericVnfResponse",
- "Invalid request for new Generic VNF which already exists, Vnf Name=" +
- execution.getVariable("CAAIVfMod_vnfName"))
- } else { // execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
- // !execution.getVariable("CAAIVfMod_vnfId").isEmpty())
- utils.log("DEBUG", "Invalid request for Add-on Module requested for non-existant Generic VNF", isDebugEnabled)
- execution.setVariable("CAAIVfMod_createVfModuleResponse",
- "Invalid request for Add-on Module requested for non-existant Generic VNF, VNF Id=" +
- execution.getVariable("CAAIVfMod_vnfId"))
- }
- }
-
- // construct and send a PUT request to A&AI to create a new Generic VNF
- // note: to get here, the vnf-id in the original CREATE_VF_MODULE request was absent or ""
- public void createGenericVnf(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def aaiRequestId = UUID.randomUUID().toString()
- // TBD - is this how we want to generate the Id for the new Generic VNF?
- def newVnfId = UUID.randomUUID().toString()
- def endPoint = execution.getVariable("URN_aai_endpoint") +
- execution.getVariable("CAAIVfMod_genericVnfPutEndpoint") + newVnfId
- // update the flow execution with the new Vnf Id
- execution.setVariable("CAAIVfMod_vnfId",newVnfId)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- // AaiUriUtil aaiUriUtil = new AaiUriUtil(this)
- // def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- // logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
- // String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
- // logDebug('AAI namespace is: ' + namespace, isDebugEnabled)
-
-
- String payload = """<generic-vnf xmlns="${execution.getVariable("CAAIVfMod_aaiNamespace")}">
- <vnf-id>${newVnfId}</vnf-id>
- <vnf-name>${execution.getVariable("CAAIVfMod_vnfName")}</vnf-name>
- <vnf-type>${execution.getVariable("CAAIVfMod_vnfType")}</vnf-type>
- <service-id>${execution.getVariable("CAAIVfMod_serviceId")}</service-id>
- <orchestration-status>active</orchestration-status>
- <persona-model-id>${execution.getVariable("CAAIVfMod_vnfPersonaId")}</persona-model-id>
- <persona-model-version>${execution.getVariable("CAAIVfMod_vnfPersonaVer")}</persona-model-version>
- </generic-vnf>""" as String
- execution.setVariable("CAAIVfMod_createGenericVnfPayload", payload)
-
- RESTConfig config = new RESTConfig(endPoint);
- utils.log("DEBUG","createGenericVnf() endpoint-" + endPoint, isDebugEnabled)
- def responseData = ""
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
- addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- utils.log("DEBUG", "invoking PUT call to AAI with payload:"+System.lineSeparator()+payload,isDebugEnabled)
- APIResponse response = client.httpPut(payload)
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable("CAAIVfMod_createGenericVnfResponseCode", response.getStatusCode())
- execution.setVariable("CAAIVfMod_createGenericVnfResponse", responseData)
- utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
- utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
- execution.setVariable("CAAIVfMod_createGenericVnfResponseCode", 500)
- execution.setVariable("CAAIVfMod_createGenericVnfResponse", "AAI PUT Failed:" + ex.getMessage())
- }
- }
-
- // construct and send a PUT request to A&AI to create a Base or Add-on VF Module
- public void createVfModule(Execution execution, Boolean isBaseModule) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- // TBD - is this how we want to generate the Id for the new (Base) VF Module?
-
- // Generate the new VF Module ID here if it has not been provided by the parent process
- def newModuleId = execution.getVariable('newVfModuleId')
- if (newModuleId == null || newModuleId.isEmpty()) {
- newModuleId = UUID.randomUUID().toString()
- }
- def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CAAIVfMod_genericVnfPutEndpoint")
- // need to append the existing Vnf Id or the one generated in createGenericVnf() to the url
- endPoint = endPoint + UriUtils.encode(execution.getVariable("CAAIVfMod_vnfId"), "UTF-8") +
- "/vf-modules/vf-module/" + newModuleId;
- def aaiRequestId = UUID.randomUUID().toString()
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- // if we get to this point, we may be about to create the Vf Module,
- // add rollback information about the Generic VNF for this base/add-on module
- def rollbackData = execution.getVariable("RollbackData")
- if (rollbackData == null) {
- rollbackData = new RollbackData();
- }
- rollbackData.put("VFMODULE", "vnfId", execution.getVariable("CAAIVfMod_vnfId"))
- rollbackData.put("VFMODULE", "vnfName", execution.getVariable("CAAIVfMod_vnfName"))
- rollbackData.put("VFMODULE", "isBaseModule", isBaseModule.toString())
- execution.setVariable("RollbackData", rollbackData)
- utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
- String payload = """<vf-module xmlns="${execution.getVariable("CAAIVfMod_aaiNamespace")}">
- <vf-module-id>${newModuleId}</vf-module-id>
- <vf-module-name>${execution.getVariable("CAAIVfMod_moduleName")}</vf-module-name>
- <persona-model-id>${execution.getVariable("CAAIVfMod_personaId")}</persona-model-id>
- <persona-model-version>${execution.getVariable("CAAIVfMod_personaVer")}</persona-model-version>
- <is-base-vf-module>${isBaseModule}</is-base-vf-module>
- <orchestration-status>pending-create</orchestration-status>
- </vf-module>""" as String
- execution.setVariable("CAAIVfMod_createVfModulePayload", payload)
-
- RESTConfig config = new RESTConfig(endPoint);
- utils.log("DEBUG","createVfModule() endpoint-" + endPoint, isDebugEnabled)
- def responseData = ""
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
- addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- utils.log("DEBUG", "invoking PUT call to AAI with payload:"+System.lineSeparator()+payload,isDebugEnabled)
- APIResponse response = client.httpPut(payload)
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable("CAAIVfMod_createVfModuleResponseCode", response.getStatusCode())
- execution.setVariable("CAAIVfMod_createVfModuleResponse", responseData)
- utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
- utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
-
- // the base or add-on VF Module was successfully created,
- // add the module name to the rollback data and the response
- if (isOneOf(response.getStatusCode(), 200, 201)) {
- rollbackData.put("VFMODULE", "vfModuleId", newModuleId)
- rollbackData.put("VFMODULE", "vfModuleName", execution.getVariable("CAAIVfMod_moduleName"))
- execution.setVariable("RollbackData", rollbackData)
- utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
-
- String responseOut = ""
-
- String isVidRequest = execution.getVariable("isVidRequest")
-
- if (isBaseModule && (isVidRequest == null || "false".equals(isVidRequest))) {
-
- responseOut = """<CreateAAIVfModuleResponse>
- <vnf-id>${execution.getVariable("CAAIVfMod_vnfId")}</vnf-id>
- <vf-module-id>${newModuleId}</vf-module-id>
- </CreateAAIVfModuleResponse>""" as String
- }
- else {
- responseOut = """<CreateAAIVfModuleResponse>
- <vnf-name>${execution.getVariable("CAAIVfMod_vnfNameFromAAI")}</vnf-name>
- <vnf-id>${execution.getVariable("CAAIVfMod_vnfId")}</vnf-id>
- <vf-module-id>${newModuleId}</vf-module-id>
- </CreateAAIVfModuleResponse>""" as String
- }
-
- execution.setVariable("CreateAAIVfModuleResponse", responseOut)
- utils.log("DEBUG", "CreateAAIVfModuleResponse:" + System.lineSeparator()+responseOut,isDebugEnabled)
- }
- } catch (Exception ex) {
- ex.printStackTrace()
- utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
- execution.setVariable("CAAIVfMod_createVfModuleResponseCode", 500)
- execution.setVariable("CAAIVfMod_createVfModuleResponse", "AAI PUT Failed:" + ex.getMessage())
- }
- }
-
- // parses the output from the result from queryAAIForGenericVnf() to determine if the vf-module-name
- // requested for an Add-on VF Module does not already exist for the specified Generic VNF
- // also retrieves VNF name from AAI response for existing VNF
- public void parseForAddOnModule(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
- def vnfNameFromAAI = utils.getNodeText1(xml, "vnf-name")
- execution.setVariable("CAAIVfMod_vnfNameFromAAI", vnfNameFromAAI)
- utils.log("DEBUG", "Obtained vnf-name from AAI for existing VNF: " + vnfNameFromAAI)
- def newModuleName = execution.getVariable("CAAIVfMod_moduleName")
- utils.log("DEBUG", "VF Module to be added: " + newModuleName, isDebugEnabled)
- def qryModuleNameList = utils.getMultNodes(xml, "vf-module-name")
- execution.setVariable("CAAIVfMod_moduleExists", false)
- if (qryModuleNameList != null) {
- utils.log("DEBUG", "Existing VF Module List: " + qryModuleNameList, isDebugEnabled)
- for (String qryModuleName : qryModuleNameList) {
- if (newModuleName.equals(qryModuleName)) {
- // a module with the requested name already exists - failure
- utils.log("DEBUG", "VF Module " + qryModuleName + " already exists for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
- execution.setVariable("CAAIVfMod_moduleExists", true)
- execution.setVariable("CAAIVfMod_parseModuleResponse",
- "VF Module " + qryModuleName + " already exists for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
- break
- }
- }
- }
- if (execution.getVariable("CAAIVfMod_moduleExists") == false) {
- utils.log("DEBUG", "VF Module " + execution.getVariable("CAAIVfMod_moduleName") +
- " does not exist for Generic VNF " + execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
- execution.setVariable("CAAIVfMod_parseModuleResponse",
- "VF Module " + newModuleName + " does not exist for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
- }
- }
-
- // parses the output from the result from queryAAIForGenericVnf() to determine if the vf-module-name
- // requested for an Add-on VF Module does not already exist for the specified Generic VNF;
- // also retrieves VNF name from AAI response for existing VNF
- public void parseForBaseModule(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
- def vnfNameFromAAI = utils.getNodeText1(xml, "vnf-name")
- execution.setVariable("CAAIVfMod_vnfNameFromAAI", vnfNameFromAAI)
- utils.log("DEBUG", "Obtained vnf-name from AAI for existing VNF: " + vnfNameFromAAI)
- def newModuleName = execution.getVariable("CAAIVfMod_moduleName")
- utils.log("DEBUG", "VF Module to be added: " + newModuleName, isDebugEnabled)
- def qryModuleNameList = utils.getMultNodes(xml, "vf-module-name")
- execution.setVariable("CAAIVfMod_moduleExists", false)
- if (qryModuleNameList != null) {
- utils.log("DEBUG", "Existing VF Module List: " + qryModuleNameList, isDebugEnabled)
- for (String qryModuleName : qryModuleNameList) {
- if (newModuleName.equals(qryModuleName)) {
- // a module with the requested name already exists - failure
- utils.log("DEBUG", "VF Module " + qryModuleName + " already exists for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
- execution.setVariable("CAAIVfMod_baseModuleConflict", true)
- execution.setVariable("CAAIVfMod_parseModuleResponse",
- "VF Module " + qryModuleName + " already exists for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
- break
- }
- }
- }
- def isBaseVfModuleList = utils.getMultNodes(xml, "is-base-vf-module")
- if (isBaseVfModuleList != null && !execution.getVariable("CAAIVfMod_baseModuleConflict")) {
-
- for (String baseValue : isBaseVfModuleList) {
- if (baseValue.equals("true")) {
- // a base module already exists in this VNF - failure
- utils.log("DEBUG", "Base VF Module already exists for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
- execution.setVariable("CAAIVfMod_baseModuleConflict", true)
- execution.setVariable("CAAIVfMod_parseModuleResponse",
- "Base VF Module already exists for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
- break
- }
- }
-
- }
- if (execution.getVariable("CAAIVfMod_moduleExists") == false && execution.getVariable("CAAIVfMod_baseModuleConflict") == false) {
- utils.log("DEBUG", "VF Module " + execution.getVariable("CAAIVfMod_moduleName") +
- " does not exist for Generic VNF " + execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
- execution.setVariable("CAAIVfMod_parseModuleResponse",
- "VF Module " + newModuleName + " does not exist for Generic VNF " +
- execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
- }
- }
-
- // generates a WorkflowException when the A&AI query returns a response code other than 200 or 404
- public void handleAAIQueryFailure(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- utils.log("ERROR", "Error occurred attempting to query AAI, Response Code " +
- execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " +
- execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable("CAAIVfMod_queryGenericVnfResponse"))
- execution.setVariable("WorkflowException", exception)
- }
-
- // generates a WorkflowException if
- // - the A&AI Generic VNF PUT returns a response code other than 200 or 201
- // - the requested Generic VNF already exists but vnf-id == null
- // - the requested Generic VNF does not exist but vnf-id != null
- // - the A&AI VF Module PUT returns a response code other than 200 or 201
- // - the requested VF Module already exists for the Generic VNF
- public void handleCreateVfModuleFailure(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- def errorCode
- def errorResponse
- if (execution.getVariable("CAAIVfMod_createGenericVnfResponseCode") != null &&
- !isOneOf(execution.getVariable("CAAIVfMod_createGenericVnfResponseCode"), 200, 201)) {
- utils.log("DEBUG", "Failure creating Generic VNF: " +
- execution.getVariable("CAAIVfMod_createGenericVnfResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("CAAIVfMod_createGenericVnfResponse")
- errorCode = 5000
- } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponse") != null &&
- execution.getVariable("CAAIVfMod_newGenericVnf") == true) {
- // attempted to create a Generic VNF that already exists but vnf-id == null
- utils.log("DEBUG", execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
- errorCode = 1002
- } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
- execution.getVariable("CAAIVfMod_newGenericVnf") == false) {
- // attempted to create a Generic VNF where vnf-name does not exist but vnf-id != null
- utils.log("DEBUG", execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
- errorCode = 1002
- } else if (execution.getVariable("CAAIVfMod_createVfModuleResponseCode") != null) {
- utils.log("DEBUG", "Failed to add VF Module: " +
- execution.getVariable("CAAIVfMod_createVfModuleResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("CAAIVfMod_createVfModuleResponse")
- errorCode = 5000
- } else if (execution.getVariable("CAAIVfMod_moduleExists") == true) {
- utils.log("DEBUG", "Attempting to add VF Module that already exists: " +
- execution.getVariable("CAAIVfMod_parseModuleResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("CAAIVfMod_parseModuleResponse")
- errorCode = 1002
- } else if (execution.getVariable("CAAIVfMod_baseModuleConflict") == true) {
- utils.log("DEBUG", "Attempting to add Base VF Module to VNF that already has a Base VF Module: " +
- execution.getVariable("CAAIVfMod_parseModuleResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("CAAIVfMod_parseModuleResponse")
- errorCode = 1002
- } else {
- // if the responses get populated corerctly, we should never get here
- errorResponse = "Unknown error occurred during CreateAAIVfModule flow"
- errorCode = 2000
- }
-
- utils.log("ERROR", "Error occurred during CreateAAIVfModule flow: " + errorResponse, isDebugEnabled)
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorResponse)
- execution.setVariable("WorkflowException", exception)
- }
-
- /**
- * Performs a rollback.
- * TBD: This method requires additional testing once integrated with the
- * main CreateVfModule flow.
- * @param execution the execution
- */
- public void rollback(Execution execution) {
- def method = getClass().getSimpleName() + ".rollback(" +
- "execution=" + execution.getId() +
- ")"
- def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
- logDebug("Entered " + method, isDebugLogEnabled)
-
- try {
- RollbackData rollbackData = (RollbackData) execution.getVariable("RollbackData")
- logDebug("RollbackData:" + rollbackData, isDebugLogEnabled)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
-
- if (rollbackData != null) {
- if (rollbackData.hasType("VFMODULE")) {
- // use the DeleteAAIVfModule groovy methods for the rollback
- def vnfId = rollbackData.get("VFMODULE", "vnfId")
- def vfModuleId = rollbackData.get("VFMODULE", "vfModuleId")
- def isBaseModule = rollbackData.get("VFMODULE", "isBaseModule")
- execution.setVariable("DAAIVfMod_vnfId", vnfId)
- execution.setVariable("DAAIVfMod_vfModuleId", vfModuleId)
- execution.setVariable("DAAIVfMod_genericVnfEndpoint", "${aai_uri}/" + vnfId)
- execution.setVariable("DAAIVfMod_vfModuleEndpoint", "${aai_uri}/" + vnfId +
- "/vf-modules/vf-module/" + vfModuleId)
- DeleteAAIVfModule dvm = new DeleteAAIVfModule()
- // query A&AI to get the needed information for the delete(s)
- dvm.queryAAIForGenericVnf(execution)
- dvm.parseForVfModule(execution)
-
- // roll back the base or add-on module
- dvm.deleteVfModule(execution)
- def responseCode = execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode")
- def response = execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode")
-
- if (isOneOf(responseCode, 200, 204)) {
- logDebug("Received " + responseCode + " to VF Module rollback request", isDebugLogEnabled)
-// execution.setVariable("RollbackResult", "SUCCESS")
- } else {
- logError("Received " + responseCode + " to VF Module rollback request: " + rollbackData +
- System.lineSeparator() + "Response: " + response)
- }
-
- // a new Generic VNF was created that needs to be rolled back
- if (isBaseModule.equals("true")) {
- dvm.deleteGenericVnf(execution)
- responseCode = execution.getVariable("DAAIVfMod_deleteGenericVnfResponseCode")
- response = execution.getVariable("DAAIVfMod_deleteGenericVnfResponse")
-
- if (isOneOf(responseCode, 200, 204)) {
- logDebug("Received " + responseCode + " to Generic VNF rollback request", isDebugLogEnabled)
- execution.setVariable("RollbackResult", "SUCCESS")
- } else {
- logError("Received " + responseCode + " to Generic VNF rollback request: " + rollbackData +
- System.lineSeparator() + "Response: " + response)
- }
- } else {
- execution.setVariable("RollbackResult", "SUCCESS")
- }
- }
- }
-
- logDebug("Exited " + method, isDebugLogEnabled)
- } catch (Exception e) {
- logError("Caught exception in " + method, e)
- }
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
+
+ def Prefix="CAAIVfMod_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable("prefix",Prefix)
+ execution.setVariable("CAAIVfMod_vnfId",null)
+ execution.setVariable("CAAIVfMod_vnfName",null)
+ execution.setVariable("CAAIVfMod_vnfType",null)
+ execution.setVariable("CAAIVfMod_serviceId",null)
+ execution.setVariable("CAAIVfMod_personaId",null)
+ execution.setVariable("CAAIVfMod_personaVer",null)
+ execution.setVariable("CAAIVfMod_modelCustomizationId",null)
+ execution.setVariable("CAAIVfMod_vnfPersonaId",null)
+ execution.setVariable("CAAIVfMod_vnfPersonaVer",null)
+ execution.setVariable("CAAIVfMod_isBaseVfModule", false)
+ execution.setVariable("CAAIVfMod_moduleName",null)
+ execution.setVariable("CAAIVfMod_moduleModelName",null)
+ execution.setVariable("CAAIVfMod_newGenericVnf",false)
+ execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",null)
+ execution.setVariable("CAAIVfMod_genericVnfPutEndpoint",null)
+ execution.setVariable("CAAIVfMod_aaiNamespace",null)
+ execution.setVariable("CAAIVfMod_moduleExists",false)
+ execution.setVariable("CAAIVfMod_baseModuleConflict", false)
+ execution.setVariable("CAAIVfMod_vnfNameFromAAI", null)
+
+
+ // CreateAAIVfModule workflow response variable placeholders
+ execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode",null)
+ execution.setVariable("CAAIVfMod_queryGenericVnfResponse","")
+ execution.setVariable("CAAIVfMod_createGenericVnfResponseCode",null)
+ execution.setVariable("CAAIVfMod_createGenericVnfResponse","")
+ execution.setVariable("CAAIVfMod_createVfModuleResponseCode",null)
+ execution.setVariable("CAAIVfMod_createVfModuleResponse","")
+ execution.setVariable("CAAIVfMod_parseModuleResponse","")
+ execution.setVariable("CAAIVfMod_deleteGenericVnfResponseCode",null)
+ execution.setVariable("CAAIVfMod_deleteGenericVnfResponse","")
+ execution.setVariable("CAAIVfMod_deleteVfModuleResponseCode",null)
+ execution.setVariable("CAAIVfMod_deleteVfModuleResponse","")
+// execution.setVariable("CAAIVfMod_ResponseCode",null)
+// execution.setVariable("CAAIVfMod_ErrorResponse","")
+ execution.setVariable("CreateAAIVfModuleResponse","")
+ execution.setVariable("RollbackData", null)
+
+ }
+
+ // parse the incoming CREATE_VF_MODULE request and store the Generic VNF
+ // and VF Module data in the flow Execution
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ initProcessVariables(execution)
+
+ def vnfId = execution.getVariable("vnfId")
+ if (vnfId == null || vnfId.isEmpty()) {
+ execution.setVariable("CAAIVfMod_newGenericVnf", true)
+ execution.setVariable("CAAIVfMod_vnfId","")
+ }
+ else {
+ execution.setVariable("CAAIVfMod_vnfId",vnfId)
+ }
+
+ def vnfName = execution.getVariable("vnfName")
+ execution.setVariable("CAAIVfMod_vnfName", vnfName)
+
+ String vnfType = execution.getVariable("vnfType")
+ if (vnfType != null && !vnfType.isEmpty()) {
+ execution.setVariable("CAAIVfMod_vnfType", vnfType)
+ } else {
+ execution.setVariable("CAAIVfMod_vnfType","")
+ }
+
+ execution.setVariable("CAAIVfMod_serviceId", execution.getVariable("serviceId"))
+
+ String personaModelId = execution.getVariable("personaModelId")
+
+ if (personaModelId != null && !personaModelId.isEmpty()) {
+ execution.setVariable("CAAIVfMod_personaId",personaModelId)
+ } else {
+ execution.setVariable("CAAIVfMod_personaId","")
+ }
+
+ String personaModelVersion = execution.getVariable("personaModelVersion")
+
+ if (personaModelVersion != null && !personaModelVersion.isEmpty()) {
+ execution.setVariable("CAAIVfMod_personaVer", personaModelVersion)
+ } else {
+ execution.setVariable("CAAIVfMod_personaVer","")
+ }
+
+
+ String modelCustomizationId = execution.getVariable("modelCustomizationId")
+
+ if (modelCustomizationId != null && !modelCustomizationId.isEmpty()) {
+ execution.setVariable("CAAIVfMod_modelCustomizationId",modelCustomizationId)
+ } else {
+ execution.setVariable("CAAIVfMod_modelCustomizationId","")
+ }
+
+ String vnfPersonaModelId = execution.getVariable("vnfPersonaModelId")
+
+ if (vnfPersonaModelId != null && !vnfPersonaModelId.isEmpty()) {
+ execution.setVariable("CAAIVfMod_vnfPersonaId",vnfPersonaModelId)
+ } else {
+ execution.setVariable("CAAIVfMod_vnfPersonaId","")
+ }
+
+ String vnfPersonaModelVersion = execution.getVariable("vnfPersonaModelVersion")
+
+ if (vnfPersonaModelVersion != null && !vnfPersonaModelVersion.isEmpty()) {
+ execution.setVariable("CAAIVfMod_vnfPersonaVer",vnfPersonaModelVersion)
+ } else {
+ execution.setVariable("CAAIVfMod_vnfPersonaVer","")
+ }
+
+ //isBaseVfModule
+ Boolean isBaseVfModule = false
+ String isBaseVfModuleString = execution.getVariable("isBaseVfModule")
+ if (isBaseVfModuleString != null && isBaseVfModuleString.equals("true")) {
+ isBaseVfModule = true
+ }
+ execution.setVariable("CAAIVfMod_isBaseVfModule", isBaseVfModule)
+
+ String isVidRequest = execution.getVariable("isVidRequest")
+ if (isVidRequest != null && "true".equals(isVidRequest)) {
+ logDebug("VID Request received", isDebugEnabled)
+ }
+
+ execution.setVariable("CAAIVfMod_moduleName",execution.getVariable("vfModuleName"))
+ execution.setVariable("CAAIVfMod_moduleModelName",execution.getVariable("vfModuleModelName"))
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+ String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ logDebug('AAI namespace is: ' + aaiNamespace, isDebugEnabled)
+
+ execution.setVariable("CAAIVfMod_aaiNamespace","${aaiNamespace}")
+
+ if (vnfId == null || vnfId.isEmpty()) {
+ // TBD - assert that the vnfName is not empty
+ execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",
+ "${aai_uri}/?vnf-name=" +
+ UriUtils.encode(vnfName,"UTF-8") + "&depth=1")
+ } else {
+ execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",
+ "${aai_uri}/" + UriUtils.encode(vnfId,"UTF-8") + "?depth=1")
+ }
+
+ utils.logAudit("CreateAAIVfModule VNF PUT Endpoint: ${aai_uri}/")
+ execution.setVariable("CAAIVfMod_genericVnfPutEndpoint","${aai_uri}/")
+ }
+
+ // send a GET request to AA&I to retrieve the Generic VNF/VF Module information based on a Vnf Name
+ // expect a 200 response with the information in the response body or a 404 if the Generic VNF does not exist
+ public void queryAAIForGenericVnf(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CAAIVfMod_genericVnfGetEndpoint")
+
+ try {
+ utils.log("DEBUG","queryAAIForGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+ utils.log("DEBUG", "invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugEnabled)
+ utils.logAudit("CreateAAIVfModule sending GET call to AAI Endpoint: " + endPoint)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint)
+ def responseData = response.getResponseBodyAsString()
+ def statusCode = response.getStatusCode()
+ execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode", statusCode)
+ execution.setVariable("CAAIVfMod_queryGenericVnfResponse", responseData)
+
+ utils.logAudit("CreateAAIVfModule Response Code: " + statusCode)
+ utils.logAudit("CreateAAIVfModule Response data: " + responseData)
+ utils.log("DEBUG", "Response code:" + statusCode, isDebugEnabled)
+ utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in queryAAIForGenericVnf.")
+
+ }
+ }
+
+ // process the result from queryAAIForGenericVnf()
+ // note: this method is primarily for logging as the actual decision logic is embedded in the bpmn flow
+ public void processAAIGenericVnfQuery(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def result = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+
+ if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
+ execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
+ utils.log("DEBUG", "New Generic VNF requested and it does not already exist", isDebugEnabled)
+ } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200 &&
+ !execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
+ utils.log("DEBUG", "Adding module to existing Generic VNF", isDebugEnabled)
+ } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200 &&
+ execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
+ utils.log("DEBUG", "Invalid request for new Generic VNF which already exists", isDebugEnabled)
+ execution.setVariable("CAAIVfMod_queryGenericVnfResponse",
+ "Invalid request for new Generic VNF which already exists, Vnf Name=" +
+ execution.getVariable("CAAIVfMod_vnfName"))
+ } else { // execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
+ // !execution.getVariable("CAAIVfMod_vnfId").isEmpty())
+ utils.log("DEBUG", "Invalid request for Add-on Module requested for non-existant Generic VNF", isDebugEnabled)
+ execution.setVariable("CAAIVfMod_createVfModuleResponse",
+ "Invalid request for Add-on Module requested for non-existant Generic VNF, VNF Id=" +
+ execution.getVariable("CAAIVfMod_vnfId"))
+ }
+ }
+
+ // construct and send a PUT request to A&AI to create a new Generic VNF
+ // note: to get here, the vnf-id in the original CREATE_VF_MODULE request was absent or ""
+ public void createGenericVnf(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ // TBD - is this how we want to generate the Id for the new Generic VNF?
+ def newVnfId = UUID.randomUUID().toString()
+ def endPoint = execution.getVariable("URN_aai_endpoint") +
+ execution.getVariable("CAAIVfMod_genericVnfPutEndpoint") + newVnfId
+ // update the flow execution with the new Vnf Id
+ execution.setVariable("CAAIVfMod_vnfId",newVnfId)
+
+ // AaiUriUtil aaiUriUtil = new AaiUriUtil(this)
+ // def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ // logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+ // String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ // logDebug('AAI namespace is: ' + namespace, isDebugEnabled)
+
+
+ String payload = """<generic-vnf xmlns="${execution.getVariable("CAAIVfMod_aaiNamespace")}">
+ <vnf-id>${newVnfId}</vnf-id>
+ <vnf-name>${execution.getVariable("CAAIVfMod_vnfName")}</vnf-name>
+ <vnf-type>${execution.getVariable("CAAIVfMod_vnfType")}</vnf-type>
+ <service-id>${execution.getVariable("CAAIVfMod_serviceId")}</service-id>
+ <orchestration-status>active</orchestration-status>
+ <persona-model-id>${execution.getVariable("CAAIVfMod_vnfPersonaId")}</persona-model-id>
+ <persona-model-version>${execution.getVariable("CAAIVfMod_vnfPersonaVer")}</persona-model-version>
+ </generic-vnf>""" as String
+ execution.setVariable("CAAIVfMod_createGenericVnfPayload", payload)
+
+ try {
+ utils.log("DEBUG","createGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+ utils.log("DEBUG", "invoking PUT call to AAI with payload:"+System.lineSeparator()+payload,isDebugEnabled)
+ utils.logAudit("Sending PUT call to AAI with Endpoint /n" + endPoint + " with payload /n" + payload)
+
+ AaiUtil aaiUtil = new AaiUtil(this);
+ APIResponse response = aaiUtil.executeAAIPutCall(execution, endPoint, payload);
+ def responseData = response.getResponseBodyAsString()
+ def responseStatusCode = response.getStatusCode()
+ execution.setVariable("CAAIVfMod_createGenericVnfResponseCode", responseStatusCode)
+ execution.setVariable("CAAIVfMod_createGenericVnfResponse", responseData)
+
+ utils.logAudit("Response Code: " + responseStatusCode)
+ utils.logAudit("Response Data: " + responseData)
+ utils.log("DEBUG", "Response code:" + responseStatusCode, isDebugEnabled)
+ utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in createGenericVnf.")
+ }
+ }
+
+ // construct and send a PUT request to A&AI to create a Base or Add-on VF Module
+ public void createVfModule(Execution execution, Boolean isBaseModule) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ // TBD - is this how we want to generate the Id for the new (Base) VF Module?
+
+ // Generate the new VF Module ID here if it has not been provided by the parent process
+ def newModuleId = execution.getVariable('newVfModuleId')
+ if (newModuleId == null || newModuleId.isEmpty()) {
+ newModuleId = UUID.randomUUID().toString()
+ }
+ def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CAAIVfMod_genericVnfPutEndpoint")
+ // need to append the existing Vnf Id or the one generated in createGenericVnf() to the url
+ endPoint = endPoint + UriUtils.encode(execution.getVariable("CAAIVfMod_vnfId"), "UTF-8") +
+ "/vf-modules/vf-module/" + newModuleId;
+ int moduleIndex = 0
+ if (!isBaseModule) {
+ def aaiVnfResponse = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ def personaModelId = execution.getVariable("CAAIVfMod_personaId")
+ moduleIndex = aaiUtil.getLowestUnusedVfModuleIndexFromAAIVnfResponse(execution, aaiVnfResponse,
+ "persona-model-id", personaModelId)
+ }
+ def moduleIndexString = String.valueOf(moduleIndex)
+
+ // if we get to this point, we may be about to create the Vf Module,
+ // add rollback information about the Generic VNF for this base/add-on module
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData();
+ }
+ rollbackData.put("VFMODULE", "vnfId", execution.getVariable("CAAIVfMod_vnfId"))
+ rollbackData.put("VFMODULE", "vnfName", execution.getVariable("CAAIVfMod_vnfName"))
+ rollbackData.put("VFMODULE", "isBaseModule", isBaseModule.toString())
+ execution.setVariable("RollbackData", rollbackData)
+ utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
+ String payload = """<vf-module xmlns="${execution.getVariable("CAAIVfMod_aaiNamespace")}">
+ <vf-module-id>${newModuleId}</vf-module-id>
+ <vf-module-name>${execution.getVariable("CAAIVfMod_moduleName")}</vf-module-name>
+ <persona-model-id>${execution.getVariable("CAAIVfMod_personaId")}</persona-model-id>
+ <persona-model-version>${execution.getVariable("CAAIVfMod_personaVer")}</persona-model-version>
+ <persona-model-customization-id>${execution.getVariable("CAAIVfMod_modelCustomizationId")}</persona-model-customization-id>
+ <is-base-vf-module>${isBaseModule}</is-base-vf-module>
+ <orchestration-status>pending-create</orchestration-status>
+ <module-index>${moduleIndex}</module-index>
+ </vf-module>""" as String
+ execution.setVariable("CAAIVfMod_createVfModulePayload", payload)
+
+ try {
+ utils.log("DEBUG","createVfModule() endpoint-" + endPoint, isDebugEnabled)
+ utils.log("DEBUG", "invoking PUT call to AAI with payload:"+System.lineSeparator()+payload,isDebugEnabled)
+ utils.logAudit("CreateAAIVfModule sending PUT call to AAI with endpoint /n" + endPoint + " with payload /n " + payload)
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ APIResponse response = aaiUtil.executeAAIPutCall(execution, endPoint, payload)
+ def responseData = response.getResponseBodyAsString()
+ def statusCode = response.getStatusCode()
+ execution.setVariable("CAAIVfMod_createVfModuleResponseCode", statusCode)
+ execution.setVariable("CAAIVfMod_createVfModuleResponse", responseData)
+
+ utils.log("DEBUG", "Response code:" + statusCode, isDebugEnabled)
+ utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+ utils.logAudit("Response Code: " + statusCode)
+ utils.logAudit("Response data: " + responseData)
+ // the base or add-on VF Module was successfully created,
+ // add the module name to the rollback data and the response
+ if (isOneOf(statusCode, 200, 201)) {
+ rollbackData.put("VFMODULE", "vfModuleId", newModuleId)
+ rollbackData.put("VFMODULE", "vfModuleName", execution.getVariable("CAAIVfMod_moduleName"))
+ execution.setVariable("RollbackData", rollbackData)
+ utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
+
+ String responseOut = ""
+
+ String isVidRequest = execution.getVariable("isVidRequest")
+
+ if (isBaseModule && (isVidRequest == null || "false".equals(isVidRequest))) {
+
+ responseOut = """<CreateAAIVfModuleResponse>
+ <vnf-id>${execution.getVariable("CAAIVfMod_vnfId")}</vnf-id>
+ <vf-module-id>${newModuleId}</vf-module-id>
+ <vf-module-index>${moduleIndexString}</vf-module-index>
+ </CreateAAIVfModuleResponse>""" as String
+ }
+ else {
+ responseOut = """<CreateAAIVfModuleResponse>
+ <vnf-name>${execution.getVariable("CAAIVfMod_vnfNameFromAAI")}</vnf-name>
+ <vnf-id>${execution.getVariable("CAAIVfMod_vnfId")}</vnf-id>
+ <vf-module-id>${newModuleId}</vf-module-id>
+ <vf-module-index>${moduleIndexString}</vf-module-index>
+ </CreateAAIVfModuleResponse>""" as String
+ }
+
+ execution.setVariable("CreateAAIVfModuleResponse", responseOut)
+ utils.log("DEBUG", "CreateAAIVfModuleResponse:" + System.lineSeparator()+responseOut,isDebugEnabled)
+ utils.logAudit("CreateAAIVfModule Response /n " + responseOut)
+ }
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in createVfModule.")
+ }
+ }
+
+ // parses the output from the result from queryAAIForGenericVnf() to determine if the vf-module-name
+ // requested for an Add-on VF Module does not already exist for the specified Generic VNF
+ // also retrieves VNF name from AAI response for existing VNF
+ public void parseForAddOnModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def xml = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+ def vnfNameFromAAI = utils.getNodeText1(xml, "vnf-name")
+ execution.setVariable("CAAIVfMod_vnfNameFromAAI", vnfNameFromAAI)
+ utils.log("DEBUG", "Obtained vnf-name from AAI for existing VNF: " + vnfNameFromAAI)
+ def newModuleName = execution.getVariable("CAAIVfMod_moduleName")
+ utils.log("DEBUG", "VF Module to be added: " + newModuleName, isDebugEnabled)
+ def qryModuleNameList = utils.getMultNodes(xml, "vf-module-name")
+ execution.setVariable("CAAIVfMod_moduleExists", false)
+ if (qryModuleNameList != null) {
+ utils.log("DEBUG", "Existing VF Module List: " + qryModuleNameList, isDebugEnabled)
+ for (String qryModuleName : qryModuleNameList) {
+ if (newModuleName.equals(qryModuleName)) {
+ // a module with the requested name already exists - failure
+ utils.log("DEBUG", "VF Module " + qryModuleName + " already exists for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+ execution.setVariable("CAAIVfMod_moduleExists", true)
+ execution.setVariable("CAAIVfMod_parseModuleResponse",
+ "VF Module " + qryModuleName + " already exists for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+ break
+ }
+ }
+ }
+ if (execution.getVariable("CAAIVfMod_moduleExists") == false) {
+ utils.log("DEBUG", "VF Module " + execution.getVariable("CAAIVfMod_moduleName") +
+ " does not exist for Generic VNF " + execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+ execution.setVariable("CAAIVfMod_parseModuleResponse",
+ "VF Module " + newModuleName + " does not exist for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+ }
+ }
+
+ // parses the output from the result from queryAAIForGenericVnf() to determine if the vf-module-name
+ // requested for an Add-on VF Module does not already exist for the specified Generic VNF;
+ // also retrieves VNF name from AAI response for existing VNF
+ public void parseForBaseModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def xml = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+ def vnfNameFromAAI = utils.getNodeText1(xml, "vnf-name")
+ execution.setVariable("CAAIVfMod_vnfNameFromAAI", vnfNameFromAAI)
+ utils.log("DEBUG", "Obtained vnf-name from AAI for existing VNF: " + vnfNameFromAAI)
+ def newModuleName = execution.getVariable("CAAIVfMod_moduleName")
+ utils.log("DEBUG", "VF Module to be added: " + newModuleName, isDebugEnabled)
+ def qryModuleNameList = utils.getMultNodes(xml, "vf-module-name")
+ execution.setVariable("CAAIVfMod_moduleExists", false)
+ if (qryModuleNameList != null) {
+ utils.log("DEBUG", "Existing VF Module List: " + qryModuleNameList, isDebugEnabled)
+ for (String qryModuleName : qryModuleNameList) {
+ if (newModuleName.equals(qryModuleName)) {
+ // a module with the requested name already exists - failure
+ utils.log("DEBUG", "VF Module " + qryModuleName + " already exists for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+ execution.setVariable("CAAIVfMod_baseModuleConflict", true)
+ execution.setVariable("CAAIVfMod_parseModuleResponse",
+ "VF Module " + qryModuleName + " already exists for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+ break
+ }
+ }
+ }
+ def isBaseVfModuleList = utils.getMultNodes(xml, "is-base-vf-module")
+ if (isBaseVfModuleList != null && !execution.getVariable("CAAIVfMod_baseModuleConflict")) {
+
+ for (String baseValue : isBaseVfModuleList) {
+ if (baseValue.equals("true")) {
+ // a base module already exists in this VNF - failure
+ utils.log("DEBUG", "Base VF Module already exists for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+ execution.setVariable("CAAIVfMod_baseModuleConflict", true)
+ execution.setVariable("CAAIVfMod_parseModuleResponse",
+ "Base VF Module already exists for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+ break
+ }
+ }
+
+ }
+ if (execution.getVariable("CAAIVfMod_moduleExists") == false && execution.getVariable("CAAIVfMod_baseModuleConflict") == false) {
+ utils.log("DEBUG", "VF Module " + execution.getVariable("CAAIVfMod_moduleName") +
+ " does not exist for Generic VNF " + execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+ execution.setVariable("CAAIVfMod_parseModuleResponse",
+ "VF Module " + newModuleName + " does not exist for Generic VNF " +
+ execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+ }
+ }
+
+ // generates a WorkflowException when the A&AI query returns a response code other than 200 or 404
+ public void handleAAIQueryFailure(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("ERROR", "Error occurred attempting to query AAI, Response Code " +
+ execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " +
+ execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+ int code = execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode")
+ exceptionUtil.buildAndThrowWorkflowException(execution, code, "Error occurred attempting to query AAI")
+
+ }
+
+ // generates a WorkflowException if
+ // - the A&AI Generic VNF PUT returns a response code other than 200 or 201
+ // - the requested Generic VNF already exists but vnf-id == null
+ // - the requested Generic VNF does not exist but vnf-id != null
+ // - the A&AI VF Module PUT returns a response code other than 200 or 201
+ // - the requested VF Module already exists for the Generic VNF
+ public void handleCreateVfModuleFailure(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ def errorCode
+ def errorResponse
+ if (execution.getVariable("CAAIVfMod_createGenericVnfResponseCode") != null &&
+ !isOneOf(execution.getVariable("CAAIVfMod_createGenericVnfResponseCode"), 200, 201)) {
+ utils.log("DEBUG", "Failure creating Generic VNF: " +
+ execution.getVariable("CAAIVfMod_createGenericVnfResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("CAAIVfMod_createGenericVnfResponse")
+ errorCode = 5000
+ } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponse") != null &&
+ execution.getVariable("CAAIVfMod_newGenericVnf") == true) {
+ // attempted to create a Generic VNF that already exists but vnf-id == null
+ utils.log("DEBUG", execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+ errorCode = 1002
+ } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
+ execution.getVariable("CAAIVfMod_newGenericVnf") == false) {
+ // attempted to create a Generic VNF where vnf-name does not exist but vnf-id != null
+ utils.log("DEBUG", execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+ errorCode = 1002
+ } else if (execution.getVariable("CAAIVfMod_createVfModuleResponseCode") != null) {
+ utils.log("DEBUG", "Failed to add VF Module: " +
+ execution.getVariable("CAAIVfMod_createVfModuleResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("CAAIVfMod_createVfModuleResponse")
+ errorCode = 5000
+ } else if (execution.getVariable("CAAIVfMod_moduleExists") == true) {
+ utils.log("DEBUG", "Attempting to add VF Module that already exists: " +
+ execution.getVariable("CAAIVfMod_parseModuleResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("CAAIVfMod_parseModuleResponse")
+ errorCode = 1002
+ } else if (execution.getVariable("CAAIVfMod_baseModuleConflict") == true) {
+ utils.log("DEBUG", "Attempting to add Base VF Module to VNF that already has a Base VF Module: " +
+ execution.getVariable("CAAIVfMod_parseModuleResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("CAAIVfMod_parseModuleResponse")
+ errorCode = 1002
+ } else {
+ // if the responses get populated corerctly, we should never get here
+ errorResponse = "Unknown error occurred during CreateAAIVfModule flow"
+ errorCode = 2000
+ }
+
+ utils.log("ERROR", "Error occurred during CreateAAIVfModule flow: " + errorResponse, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode, errorResponse)
+ utils.logAudit("Workflow exception occurred in CreateAAIVfModule: " + errorResponse)
+ }
+
+ /**
+ * Performs a rollback.
+ * TBD: This method requires additional testing once integrated with the
+ * main CreateVfModule flow.
+ * @param execution the execution
+ */
+ public void rollback(Execution execution) {
+ def method = getClass().getSimpleName() + ".rollback(" +
+ "execution=" + execution.getId() +
+ ")"
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ logDebug("Entered " + method, isDebugLogEnabled)
+
+ try {
+ RollbackData rollbackData = (RollbackData) execution.getVariable("RollbackData")
+ logDebug("RollbackData:" + rollbackData, isDebugLogEnabled)
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ utils.logAudit("CreateAAIVfModule rollback AAI URI: " + aai_uri)
+
+ if (rollbackData != null) {
+ if (rollbackData.hasType("VFMODULE")) {
+ // use the DeleteAAIVfModule groovy methods for the rollback
+ def vnfId = rollbackData.get("VFMODULE", "vnfId")
+ def vfModuleId = rollbackData.get("VFMODULE", "vfModuleId")
+ def isBaseModule = rollbackData.get("VFMODULE", "isBaseModule")
+ execution.setVariable("DAAIVfMod_vnfId", vnfId)
+ execution.setVariable("DAAIVfMod_vfModuleId", vfModuleId)
+ execution.setVariable("DAAIVfMod_genericVnfEndpoint", "${aai_uri}/" + vnfId)
+ execution.setVariable("DAAIVfMod_vfModuleEndpoint", "${aai_uri}/" + vnfId +
+ "/vf-modules/vf-module/" + vfModuleId)
+ DeleteAAIVfModule dvm = new DeleteAAIVfModule()
+ // query A&AI to get the needed information for the delete(s)
+ dvm.queryAAIForGenericVnf(execution)
+ dvm.parseForVfModule(execution)
+
+ // roll back the base or add-on module
+ dvm.deleteVfModule(execution)
+ def responseCode = execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode")
+ def response = execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode")
+
+ if (isOneOf(responseCode, 200, 204)) {
+ logDebug("Received " + responseCode + " to VF Module rollback request", isDebugLogEnabled)
+// execution.setVariable("RollbackResult", "SUCCESS")
+ } else {
+ logError("Received " + responseCode + " to VF Module rollback request: " + rollbackData +
+ System.lineSeparator() + "Response: " + response)
+ }
+
+ // a new Generic VNF was created that needs to be rolled back
+ if (isBaseModule.equals("true")) {
+ dvm.deleteGenericVnf(execution)
+ responseCode = execution.getVariable("DAAIVfMod_deleteGenericVnfResponseCode")
+ response = execution.getVariable("DAAIVfMod_deleteGenericVnfResponse")
+
+ if (isOneOf(responseCode, 200, 204)) {
+ logDebug("Received " + responseCode + " to Generic VNF rollback request", isDebugLogEnabled)
+ execution.setVariable("RollbackResult", "SUCCESS")
+ } else {
+ logError("Received " + responseCode + " to Generic VNF rollback request: " + rollbackData +
+ System.lineSeparator() + "Response: " + response)
+ }
+ } else {
+ execution.setVariable("RollbackResult", "SUCCESS")
+ }
+ }
+ }
+
+ logDebug("Exited " + method, isDebugLogEnabled)
+ } catch (Exception e) {
+ logError("Caught exception in " + method, e)
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
index 51e77a813d..07b98e6231 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
@@ -1,334 +1,334 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.util.Node
-import groovy.util.XmlParser;
-import groovy.xml.QName
-
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-
-public class CreateAAIVfModuleVolumeGroup extends AbstractServiceTaskProcessor {
-
- private XmlParser xmlParser = new XmlParser()
-
- /**
- * Initialize the flow's variables.
- *
- * @param execution The flow's execution instance.
- */
- public void initProcessVariables(Execution execution) {
- execution.setVariable('prefix', 'CAAIVfModVG_')
- execution.setVariable('CAAIVfModVG_vnfId', null)
- execution.setVariable('CAAIVfModVG_vfModuleId', null)
- execution.setVariable('CAAIVfModVG_aicCloudRegion', null)
- execution.setVariable('CAAIVfModVG_volumeGroupId', null)
- execution.setVariable('CAAIVfModVG_getVfModuleResponseCode' ,null)
- execution.setVariable('CAAIVfModVG_getVfModuleResponse', '')
- execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', null)
- execution.setVariable('CAAIVfModVG_updateVfModuleResponse', '')
- }
-
- /**
- * Check for missing elements in the received request.
- *
- * @param execution The flow's execution instance.
- */
- public void preProcessRequest(Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def xml = execution.getVariable('CreateAAIVfModuleVolumeGroupRequest')
- logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
- initProcessVariables(execution)
-
- def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
- execution.setVariable('CAAIVfModVG_vnfId', vnfId)
-
- def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
- execution.setVariable('CAAIVfModVG_vfModuleId', vfModuleId)
-
- def aicCloudRegion = getRequiredNodeText(execution, xml,'aic-cloud-region')
- execution.setVariable('CAAIVfModVG_aicCloudRegion', aicCloudRegion)
-
- def volumeGroupId = getRequiredNodeText(execution, xml,'volume-group-id')
- execution.setVariable('CAAIVfModVG_volumeGroupId', volumeGroupId)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
- }
- }
-
- /**
- * Using the received vnfId and vfModuleId, query AAI to get the corresponding VF Module.
- * A 200 response is expected with the VF Module in the response body.
- *
- * @param execution The flow's execution instance.
- */
- public void getVfModule(Execution execution) {
- def method = getClass().getSimpleName() + '.getVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('CAAIVfModVG_vnfId')
- def vfModuleId = execution.getVariable('CAAIVfModVG_vfModuleId')
-
- // Construct endpoint
- AaiUtil aaiUtil = new AaiUtil(this)
- def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
- String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + URLEncoder.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + URLEncoder.encode(vfModuleId, "UTF-8")
-
- try {
- logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
- APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint)
- def responseData = response.getResponseBodyAsString()
- execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', response.getStatusCode())
- execution.setVariable('CAAIVfModVG_getVfModuleResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
- execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', 500)
- execution.setVariable('CAAIVfModVG_getVfModuleResponse', 'AAI GET Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in getVfModule(): ' + e.getMessage())
- }
- }
-
- /**
- * Construct and send a PUT request to AAI to update the VF Module with the
- * created Volume Group relationship.
- *
- * @param execution The flow's execution instance.
- */
- public void updateVfModule(Execution execution) {
- def method = getClass().getSimpleName() + '.updateVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('CAAIVfModVG_vnfId')
- def vfModuleId = execution.getVariable('CAAIVfModVG_vfModuleId')
- def vfModule = execution.getVariable('CAAIVfModVG_getVfModuleResponse')
- def origRequest = execution.getVariable('CreateAAIVfModuleVolumeGroupRequest')
- def Node vfModuleNode = xmlParser.parseText(vfModule)
-
- // Confirm resource-version is in retrieved VF Module
- if (utils.getChildNode(vfModuleNode, 'resource-version') == null) {
- def msg = 'Can\'t update VF Module ' + vfModuleId + ' since \'resource-version\' is missing'
- logError(msg)
- throw new Exception(msg)
- }
-
- // Construct payload by creating a Volume Group relationhip and inserting it into the VF Module
- def aicCloudRegion = execution.getVariable('CAAIVfModVG_aicCloudRegion')
- def volumeGroupId = execution.getVariable('CAAIVfModVG_volumeGroupId')
- def Node vgRelationshipNode = createVolumeGroupRelationshipNode(aicCloudRegion, volumeGroupId)
- insertVolumeGroupRelationshipNode(vfModuleNode, vgRelationshipNode)
- def payload = utils.nodeToString(vfModuleNode)
-
- // Construct endpoint
- AaiUtil aaiUtil = new AaiUtil(this)
- def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
- String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + URLEncoder.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + URLEncoder.encode(vfModuleId, "UTF-8")
-
- try {
- logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
- APIResponse response = aaiUtil.executeAAIPutCall(execution, endPoint, payload)
- def responseData = response.getResponseBodyAsString()
- execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', response.getStatusCode())
- execution.setVariable('CAAIVfModVG_updateVfModuleResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(),isDebugLogEnabled)
- execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', 500)
- execution.setVariable('CAAIVfModVG_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
- }
- }
-
- /**
- * Construct a Volume Group relationship Node with the given AIC Cloud Region and
- * Volume Group ID for insertion into a VF Module.
- *
- * @param aicCloudRegion Cloud Region ID to use in the Volume Group relationship
- * @param volumeGroupId Volume Group ID to use in the Volume Group relationship
- * @return a Node representing the new Volume Group relationship
- */
- private Node createVolumeGroupRelationshipNode(String aicCloudRegion, String volumeGroupId) {
-
- def Node relatedTo = new Node(null, 'related-to', 'volume-group')
-
- def Node relationshipKeyCO = new Node(null, 'relationship-key', 'cloud-region.cloud-owner')
- def Node relationshipValueCO = new Node(null, 'relationship-value', 'att-aic')
- def Node relationshipDataCO = new Node(null, 'relationship-data')
- relationshipDataCO.append(relationshipKeyCO)
- relationshipDataCO.append(relationshipValueCO)
-
- def Node relationshipKeyCRI = new Node(null, 'relationship-key', 'cloud-region.cloud-region-id')
- def Node relationshipValueCRI = new Node(null, 'relationship-value', aicCloudRegion)
- def Node relationshipDataCRI = new Node(null, 'relationship-data')
- relationshipDataCRI.append(relationshipKeyCRI)
- relationshipDataCRI.append(relationshipValueCRI)
-
- def Node relationshipKeyVGI = new Node(null, 'relationship-key', 'volume-group.volume-group-id')
- def Node relationshipValueVGI = new Node(null, 'relationship-value', volumeGroupId)
- def Node relationshipDataVGI = new Node(null, 'relationship-data')
- relationshipDataVGI.append(relationshipKeyVGI)
- relationshipDataVGI.append(relationshipValueVGI)
-
- def Node volumeGroupRelationship = new Node(null, 'relationship')
- volumeGroupRelationship.append(relatedTo)
- volumeGroupRelationship.append(relationshipDataCO)
- volumeGroupRelationship.append(relationshipDataCRI)
- volumeGroupRelationship.append(relationshipDataVGI)
-
- return volumeGroupRelationship;
- }
-
- /**
- * Insert the given Volume Group relationship Node into the given VF Module.
- * If the VF Module does NOT contain a relationship list:
- * - Create a relationship list containing the Volume Group relationship and insert it into the VF Module
- * If the VF Module contains a relationship list but not a Volume Group relationship:
- * - Insert the the Volume Group relationship into the relationship lsit
- * If the VF Module contains a relationship list and has a Volume Group relationship:
- * - Replace the existing Volume Group relationship with the new one
- * @param vfModuleNode
- * @param volumeGroupRelationshipNode
- */
- private void insertVolumeGroupRelationshipNode(Node vfModuleNode, Node volumeGroupRelationshipNode) {
- def Node relationshipList = utils.getChildNode(vfModuleNode, 'relationship-list')
- if (relationshipList == null) {
- relationshipList = new Node(null, 'relationship-list')
- relationshipList.append(volumeGroupRelationshipNode)
- vfModuleNode.append(relationshipList)
- } else {
- def Node currVolumeGroupRelationshipNode = getCurrVolumeGroupRelationshipNode(relationshipList)
- if (currVolumeGroupRelationshipNode == null) {
- relationshipList.append(volumeGroupRelationshipNode)
- } else {
- currVolumeGroupRelationshipNode.replaceNode(volumeGroupRelationshipNode)
- }
- }
- }
-
- /**
- * Find and return the value of the Volume Group ID for the specified VF Module. If
- * the value of the Volume Group ID cannot be found for any reason, 'null' is returned.
- *
- * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
- * @return the value of the Volume Group ID for the specified VF Module. If the
- * value of the Volume Group ID cannot be found for any reason, 'null' is returned.
- */
- private Node getCurrVolumeGroupRelationshipNode(Node relationshipList) {
- def Node currVolumeGroupRelationshipNode = null
- def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
- for (Node relationshipNode in relationships) {
- def String relatedTo = utils.getChildNodeText(relationshipNode, 'related-to')
- if ((relatedTo != null) && relatedTo.equals('volume-group')) {
- currVolumeGroupRelationshipNode = relationshipNode
- }
- }
- return currVolumeGroupRelationshipNode
- }
-
- /**
- * Generates a WorkflowException if the AAI query returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleAAIQueryFailure(Execution execution) {
- def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to query AAI, Response Code ' +
- execution.getVariable('CAAIVfModVG_getVfModuleResponseCode') + ', Error Response ' +
- execution.getVariable('CAAIVfModVG_getVfModuleResponse'))
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- exceptionUtil.buildWorkflowException(execution, 5000, execution.getVariable('CAAIVfModVG_getVfModuleResponse'))
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-
- /**
- * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleUpdateVfModuleFailure(Execution execution) {
- def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
- execution.getVariable('CAAIVfModVG_updateVfModuleResponseCode') + ', Error Response ' +
- execution.getVariable('CAAIVfModVG_updateVfModuleResponse'))
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- exceptionUtil.buildWorkflowException(execution, 5000, execution.getVariable('CAAIVfModVG_updateVfModuleResponse'))
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+
+
+public class CreateAAIVfModuleVolumeGroup extends AbstractServiceTaskProcessor {
+
+ private XmlParser xmlParser = new XmlParser()
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'CAAIVfModVG_')
+ execution.setVariable('CAAIVfModVG_vnfId', null)
+ execution.setVariable('CAAIVfModVG_vfModuleId', null)
+ execution.setVariable('CAAIVfModVG_aicCloudRegion', null)
+ execution.setVariable('CAAIVfModVG_volumeGroupId', null)
+ execution.setVariable('CAAIVfModVG_getVfModuleResponseCode' ,null)
+ execution.setVariable('CAAIVfModVG_getVfModuleResponse', '')
+ execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', null)
+ execution.setVariable('CAAIVfModVG_updateVfModuleResponse', '')
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def xml = execution.getVariable('CreateAAIVfModuleVolumeGroupRequest')
+ logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+ utils.logAudit("CreateAAIVfModuleVolume Received Request XML: " + xml)
+ initProcessVariables(execution)
+
+ def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+ execution.setVariable('CAAIVfModVG_vnfId', vnfId)
+
+ def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
+ execution.setVariable('CAAIVfModVG_vfModuleId', vfModuleId)
+
+ def aicCloudRegion = getRequiredNodeText(execution, xml,'aic-cloud-region')
+ execution.setVariable('CAAIVfModVG_aicCloudRegion', aicCloudRegion)
+
+ def volumeGroupId = getRequiredNodeText(execution, xml,'volume-group-id')
+ execution.setVariable('CAAIVfModVG_volumeGroupId', volumeGroupId)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+
+ }
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VF Module.
+ * A 200 response is expected with the VF Module in the response body.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void getVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('CAAIVfModVG_vnfId')
+ def vfModuleId = execution.getVariable('CAAIVfModVG_vfModuleId')
+
+ // Construct endpoint
+ AaiUtil aaiUtil = new AaiUtil(this)
+ def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + URLEncoder.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + URLEncoder.encode(vfModuleId, "UTF-8")
+
+ try {
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ utils.logAudit("aaiResponse GET TO AAI Endpoint: " + endPoint)
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint)
+ def responseData = response.getResponseBodyAsString()
+ execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('CAAIVfModVG_getVfModuleResponse', responseData)
+
+ utils.logAudit("CreateAAIVfModule Response Code: " + response.getStatusCode())
+ utils.logAudit("CreateAAIVfModule Response: " + response)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', 500)
+ execution.setVariable('CAAIVfModVG_getVfModuleResponse', 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Construct and send a PUT request to AAI to update the VF Module with the
+ * created Volume Group relationship.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void updateVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.updateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('CAAIVfModVG_vnfId')
+ def vfModuleId = execution.getVariable('CAAIVfModVG_vfModuleId')
+ def vfModule = execution.getVariable('CAAIVfModVG_getVfModuleResponse')
+ def origRequest = execution.getVariable('CreateAAIVfModuleVolumeGroupRequest')
+ def Node vfModuleNode = xmlParser.parseText(vfModule)
+
+ // Confirm resource-version is in retrieved VF Module
+ if (utils.getChildNode(vfModuleNode, 'resource-version') == null) {
+ def msg = 'Can\'t update VF Module ' + vfModuleId + ' since \'resource-version\' is missing'
+ logError(msg)
+ throw new Exception(msg)
+ }
+
+ // Construct payload by creating a Volume Group relationhip and inserting it into the VF Module
+ def aicCloudRegion = execution.getVariable('CAAIVfModVG_aicCloudRegion')
+ def volumeGroupId = execution.getVariable('CAAIVfModVG_volumeGroupId')
+ def Node vgRelationshipNode = createVolumeGroupRelationshipNode(aicCloudRegion, volumeGroupId)
+ insertVolumeGroupRelationshipNode(vfModuleNode, vgRelationshipNode)
+ def payload = utils.nodeToString(vfModuleNode)
+
+ // Construct endpoint
+ AaiUtil aaiUtil = new AaiUtil(this)
+ def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + URLEncoder.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + URLEncoder.encode(vfModuleId, "UTF-8")
+
+ try {
+ utils.logAudit("CreateAAIVfModuleVolume Sendind PUT to AAI Endpoint \n " + endPoint + " with payload \n " + payload)
+ logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+ APIResponse response = aaiUtil.executeAAIPutCall(execution, endPoint, payload)
+ def responseData = response.getResponseBodyAsString()
+ execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('CAAIVfModVG_updateVfModuleResponse', responseData)
+
+ utils.logAudit("CreateAAIVfModule Response code: " + response.getStatusCode())
+ utils.logAudit("CreateAAIVfModule Response: " + responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(),isDebugLogEnabled)
+ execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', 500)
+ execution.setVariable('CAAIVfModVG_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Construct a Volume Group relationship Node with the given AIC Cloud Region and
+ * Volume Group ID for insertion into a VF Module.
+ *
+ * @param aicCloudRegion Cloud Region ID to use in the Volume Group relationship
+ * @param volumeGroupId Volume Group ID to use in the Volume Group relationship
+ * @return a Node representing the new Volume Group relationship
+ */
+ private Node createVolumeGroupRelationshipNode(String aicCloudRegion, String volumeGroupId) {
+
+ def Node relatedTo = new Node(null, 'related-to', 'volume-group')
+
+ def Node relationshipKeyCO = new Node(null, 'relationship-key', 'cloud-region.cloud-owner')
+ def Node relationshipValueCO = new Node(null, 'relationship-value', 'att-aic')
+ def Node relationshipDataCO = new Node(null, 'relationship-data')
+ relationshipDataCO.append(relationshipKeyCO)
+ relationshipDataCO.append(relationshipValueCO)
+
+ def Node relationshipKeyCRI = new Node(null, 'relationship-key', 'cloud-region.cloud-region-id')
+ def Node relationshipValueCRI = new Node(null, 'relationship-value', aicCloudRegion)
+ def Node relationshipDataCRI = new Node(null, 'relationship-data')
+ relationshipDataCRI.append(relationshipKeyCRI)
+ relationshipDataCRI.append(relationshipValueCRI)
+
+ def Node relationshipKeyVGI = new Node(null, 'relationship-key', 'volume-group.volume-group-id')
+ def Node relationshipValueVGI = new Node(null, 'relationship-value', volumeGroupId)
+ def Node relationshipDataVGI = new Node(null, 'relationship-data')
+ relationshipDataVGI.append(relationshipKeyVGI)
+ relationshipDataVGI.append(relationshipValueVGI)
+
+ def Node volumeGroupRelationship = new Node(null, 'relationship')
+ volumeGroupRelationship.append(relatedTo)
+ volumeGroupRelationship.append(relationshipDataCO)
+ volumeGroupRelationship.append(relationshipDataCRI)
+ volumeGroupRelationship.append(relationshipDataVGI)
+
+ return volumeGroupRelationship;
+ }
+
+ /**
+ * Insert the given Volume Group relationship Node into the given VF Module.
+ * If the VF Module does NOT contain a relationship list:
+ * - Create a relationship list containing the Volume Group relationship and insert it into the VF Module
+ * If the VF Module contains a relationship list but not a Volume Group relationship:
+ * - Insert the the Volume Group relationship into the relationship lsit
+ * If the VF Module contains a relationship list and has a Volume Group relationship:
+ * - Replace the existing Volume Group relationship with the new one
+ * @param vfModuleNode
+ * @param volumeGroupRelationshipNode
+ */
+ private void insertVolumeGroupRelationshipNode(Node vfModuleNode, Node volumeGroupRelationshipNode) {
+ def Node relationshipList = utils.getChildNode(vfModuleNode, 'relationship-list')
+ if (relationshipList == null) {
+ relationshipList = new Node(null, 'relationship-list')
+ relationshipList.append(volumeGroupRelationshipNode)
+ vfModuleNode.append(relationshipList)
+ } else {
+ def Node currVolumeGroupRelationshipNode = getCurrVolumeGroupRelationshipNode(relationshipList)
+ if (currVolumeGroupRelationshipNode == null) {
+ relationshipList.append(volumeGroupRelationshipNode)
+ } else {
+ currVolumeGroupRelationshipNode.replaceNode(volumeGroupRelationshipNode)
+ }
+ }
+ }
+
+ /**
+ * Find and return the value of the Volume Group ID for the specified VF Module. If
+ * the value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+ *
+ * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
+ * @return the value of the Volume Group ID for the specified VF Module. If the
+ * value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+ */
+ private Node getCurrVolumeGroupRelationshipNode(Node relationshipList) {
+ def Node currVolumeGroupRelationshipNode = null
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationshipNode in relationships) {
+ def String relatedTo = utils.getChildNodeText(relationshipNode, 'related-to')
+ if ((relatedTo != null) && relatedTo.equals('volume-group')) {
+ currVolumeGroupRelationshipNode = relationshipNode
+ }
+ }
+ return currVolumeGroupRelationshipNode
+ }
+
+ /**
+ * Generates a WorkflowException if the AAI query returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleAAIQueryFailure(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to query AAI, Response Code ' +
+ execution.getVariable('CAAIVfModVG_getVfModuleResponseCode') + ', Error Response ' +
+ execution.getVariable('CAAIVfModVG_getVfModuleResponse'))
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ exceptionUtil.buildWorkflowException(execution, 5000, execution.getVariable('CAAIVfModVG_getVfModuleResponse'))
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+
+ /**
+ * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleUpdateVfModuleFailure(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
+ execution.getVariable('CAAIVfModVG_updateVfModuleResponseCode') + ', Error Response ' +
+ execution.getVariable('CAAIVfModVG_updateVfModuleResponse'))
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ exceptionUtil.buildWorkflowException(execution, 5000, execution.getVariable('CAAIVfModVG_updateVfModuleResponse'))
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateGenericVNFUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateGenericVNFUtils.groovy
new file mode 100644
index 0000000000..887eb7456d
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CreateGenericVNFUtils.groovy
@@ -0,0 +1,164 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+
+import org.camunda.bpm.engine.runtime.Execution;
+import org.camunda.bpm.engine.delegate.BpmnError
+
+/**
+ * Please describe the CreateGenericVNFUtils.groovy class
+ *
+ */
+class CreateGenericVNFUtils{
+
+ String Prefix="CRTGVNF_"
+
+ def utils=new MsoUtils()
+
+ private AbstractServiceTaskProcessor taskProcessor
+
+ public CreateGenericVNFUtils(AbstractServiceTaskProcessor taskProcessor) {
+ this.taskProcessor = taskProcessor
+ }
+
+ /**
+ * This method is executed during the Initialization task of the process.
+ *
+ * @param execution
+ *
+ */
+
+ public APIResponse queryAAI(Execution execution, String path){
+
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ utils.log("DEBUG", " ======== STARTED queryAAI Process ======== ", isDebugEnabled)
+
+ def uuid = execution.getVariable("CRTGVNF_uuid")
+ utils.log("DEBUG", "UUID is: " + uuid, isDebugEnabled)
+
+ //Setting request path
+ String queryAAIRequestPath = execution.getVariable("URN_aai_endpoint")+path
+// execution.setVariable("CRTGVNF_queryAAIRequestPath", queryAAIRequestPath)
+ utils.log("DEBUG", "QueryAAIRequest Path is: " + "\n" + queryAAIRequestPath, isDebugEnabled)
+
+ try {
+ AaiUtil aaiUtil = new AaiUtil(taskProcessor)
+ return aaiUtil.executeAAIGetCall(execution, queryAAIRequestPath)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing queryAAI. Exception is:\n" + e, isDebugEnabled)
+ execution.setVariable("CRTGVNF_dataValidationFlag", false)
+ execution.setVariable("CRTGVNF_ErrorResponse", "Error Occured during queryAAI Method:\n" + e.getMessage())
+ }
+ utils.log("DEBUG", "======== COMPLETED queryAAI Process ======== ", isDebugEnabled)
+}
+
+ public String buildSDNCRequest(Execution 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("CRTGVNF_sdncCallbackUrl")
+ def requestId = execution.getVariable("CRTGVNF_requestId")
+ def serviceType = execution.getVariable("CRTGVNF_serviceType")
+ def vnfType = execution.getVariable("CRTGVNF_vnfType")
+ def vnfName = execution.getVariable("CRTGVNF_vnfName")
+ def tenantId = execution.getVariable("CRTGVNF_tenantId")
+ def source = execution.getVariable("CRTGVNF_source")
+ String vnfId = svcInstId
+ String sdncVNFParamsXml = ""
+
+ if(execution.getVariable("CRTGVNF_vnfParamsExistFlag") == true){
+ sdncVNFParamsXml = buildSDNCParamsXml(execution)
+ }else{
+ sdncVNFParamsXml = ""
+ }
+
+ String sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>VNFActivateRequest</request-action>
+ <source>${source}</source>
+ </request-information>
+ <service-information>
+ <service-type>${serviceType}</service-type>
+ <service-instance-id>${vnfId}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <vnf-name>${vnfName}</vnf-name>
+ <tenant>${tenantId}</tenant>
+${sdncVNFParamsXml}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ return sdncRequest
+
+ }
+
+ public String buildSDNCParamsXml(Execution execution){
+
+ String params = ""
+ StringBuilder sb = new StringBuilder()
+ Map<String, String> paramsMap = execution.getVariable("CRTGVNF_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
+ }
+
+}
+
+
+
+
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DeleteAAIVfModule.groovy
index 0e5360de7f..72ad1402e1 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DeleteAAIVfModule.groovy
@@ -1,360 +1,349 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-
-public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
-
- def Prefix="DAAIVfMod_"
-
- public void initProcessVariables(Execution execution) {
- execution.setVariable("prefix",Prefix)
- execution.setVariable("DAAIVfMod_vnfId",null)
- execution.setVariable("DAAIVfMod_vnfName",null)
- execution.setVariable("DAAIVfMod_genVnfRsrcVer",null)
- execution.setVariable("DAAIVfMod_vfModuleId",null)
- execution.setVariable("DAAIVfMod_vfModRsrcVer",null)
- execution.setVariable("DAAIVfMod_genericVnfEndpoint",null)
- execution.setVariable("DAAIVfMod_vfModuleEndpoint",null)
- execution.setVariable("DAAIVfMod_moduleExists",false)
- execution.setVariable("DAAIVfMod_isBaseModule", false)
- execution.setVariable("DAAIVfMod_isLastModule", false)
-
- // DeleteAAIVfModule workflow response variable placeholders
- execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode",null)
- execution.setVariable("DAAIVfMod_queryGenericVnfResponse","")
- execution.setVariable("DAAIVfMod_parseModuleResponse","")
- execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode",null)
- execution.setVariable("DAAIVfMod_deleteGenericVnfResponse","")
- execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode",null)
- execution.setVariable("DAAIVfMod_deleteVfModuleResponse","")
-
- }
-
- // parse the incoming DELETE_VF_MODULE request and store the Generic Vnf
- // and Vf Module Ids in the flow Execution
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DeleteAAIVfModuleRequest")
- utils.logAudit("DeleteAAIVfModule Request: " + xml)
- utils.log("DEBUG", "input request xml:" + xml, isDebugEnabled)
- initProcessVariables(execution)
- def vnfId = utils.getNodeText(xml,"vnf-id")
- def vfModuleId = utils.getNodeText(xml,"vf-module-id")
- execution.setVariable("DAAIVfMod_vnfId", vnfId)
- execution.setVariable("DAAIVfMod_vfModuleId", vfModuleId)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
-
- execution.setVariable("DAAIVfMod_genericVnfEndpoint", "${aai_uri}/" + vnfId)
- execution.setVariable("DAAIVfMod_vfModuleEndpoint", "${aai_uri}/" + vnfId +
- "/vf-modules/vf-module/" + vfModuleId)
- }
-
- // send a GET request to AA&I to retrieve the Generic Vnf/Vf Module information based on a Vnf Id
- // expect a 200 response with the information in the response body or a 404 if the Generic Vnf does not exist
- public void queryAAIForGenericVnf(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def delModuleId = execution.getVariable("DAAIVfMod_vfModuleId")
- def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_genericVnfEndpoint")
- utils.logAudit("DeleteAAIVfModule endPoint: " + endPoint)
- def aaiRequestId = UUID.randomUUID().toString()
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(endPoint);
- utils.log("DEBUG","queryAAIForGenericVnf() endpoint-" + endPoint, isDebugEnabled)
- def responseData = ""
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
- addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- utils.log("DEBUG", "invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugEnabled)
- APIResponse response = client.httpGet()
- utils.logAudit("DeleteAAIVfModule - invoking httpGet to AAI")
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode", response.getStatusCode())
- execution.setVariable("DAAIVfMod_queryGenericVnfResponse", responseData)
- utils.logAudit("AAI Response: " + responseData)
- utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
- utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- utils.log("DEBUG", "Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugEnabled)
- execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode", 500)
- execution.setVariable("DAAIVfMod_queryGenericVnfResponse", "AAI GET Failed:" + ex.getMessage())
- }
- }
-
- // construct and send a DELETE request to A&AI to delete a Generic Vnf
- // note: to get here, all the modules associated with the Generic Vnf must already be deleted
- public void deleteGenericVnf(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def aaiRequestId = UUID.randomUUID().toString()
- def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_genericVnfEndpoint") +
- "/?resource-version=" + execution.getVariable("DAAIVfMod_genVnfRsrcVer")
- utils.logAudit("AAI endPoint: " + endPoint)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(endPoint);
- utils.log("DEBUG","deleteGenericVnf() endpoint-" + endPoint, isDebugEnabled)
- def responseData = ""
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
- addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.httpDelete()
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode", response.getStatusCode())
- execution.setVariable("DAAIVfMod_deleteGenericVnfResponse", responseData)
- utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
- utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- utils.log("DEBUG", "Exception occurred while executing AAI DELETE:" + ex.getMessage(),isDebugEnabled)
- execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode", 500)
- execution.setVariable("DAAIVfMod_deleteGenericVnfResponse", "AAI DELETE Failed:" + ex.getMessage())
- }
- }
-
- // construct and send a DELETE request to A&AI to delete the Base or Add-on Vf Module
- public void deleteVfModule(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_vfModuleEndpoint") +
- "/?resource-version=" + execution.getVariable("DAAIVfMod_vfModRsrcVer")
- def aaiRequestId = UUID.randomUUID().toString()
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(endPoint);
- utils.log("DEBUG","deleteVfModule() endpoint-" + endPoint, isDebugEnabled)
- def responseData = ""
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
- addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.httpDelete()
- utils.logAudit("DeleteAAIVfModule - invoking httpDelete to AAI")
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode", response.getStatusCode())
- execution.setVariable("DAAIVfMod_deleteVfModuleResponse", responseData)
- utils.logAudit("DeleteAAIVfModule - AAI Response" + responseData)
- utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
- utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
-
- } catch (Exception ex) {
- ex.printStackTrace()
- utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
- execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode", 500)
- execution.setVariable("DAAIVfMod_deleteVfModuleResponse", "AAI PUT Failed:" + ex.getMessage())
- }
- }
-
- // parses the output from the result from queryAAIForGenericVnf() to determine if the Vf Module
- // to be deleted exists for the specified Generic Vnf and if it is the Base Module,
- // there are no Add-on Modules present
- public void parseForVfModule(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DAAIVfMod_queryGenericVnfResponse")
- utils.logAudit("DeleteAAIVfModule - queryGenericVnfResponse" + xml)
-
- def delModuleId = execution.getVariable("DAAIVfMod_vfModuleId")
- utils.log("DEBUG", "Vf Module to be deleted: " + delModuleId, isDebugEnabled)
- List <String> qryModuleIdList = utils.getMultNodes(xml, "vf-module-id")
- List <String> qryBaseModuleList = utils.getMultNodes(xml, "is-base-vf-module")
- List <String> qryResourceVerList = utils.getMultNodes(xml, "resource-version")
- execution.setVariable("DAAIVfMod_moduleExists", false)
- execution.setVariable("DAAIVfMod_isBaseModule", false)
- execution.setVariable("DAAIVfMod_isLastModule", false)
- //
- def isBaseVfModule = "false"
- // loop through the Vf Module Ids looking for a match
- if (qryModuleIdList != null && !qryModuleIdList.empty) {
- utils.log("DEBUG", "Existing Vf Module Id List: " + qryModuleIdList, isDebugEnabled)
- utils.log("DEBUG", "Existing Vf Module Resource Version List: " + qryResourceVerList, isDebugEnabled)
- def moduleCntr = 0
- // the Generic Vnf resource-version in the 1st entry in the query response
- execution.setVariable("DAAIVfMod_genVnfRsrcVer", qryResourceVerList[moduleCntr])
- for (String qryModuleId : qryModuleIdList) {
- if (delModuleId.equals(qryModuleId)) {
- // a Vf Module with the requested Id exists
- execution.setVariable("DAAIVfMod_moduleExists", true)
- // find the corresponding value for the is-base-vf-module field
- isBaseVfModule = qryBaseModuleList[moduleCntr]
- // find the corresponding value for the resource-version field
- // note: the Generic Vnf entry also has a resource-version field, so
- // add 1 to the index to get the corresponding Vf Module value
- execution.setVariable("DAAIVfMod_vfModRsrcVer", qryResourceVerList[moduleCntr+1])
- utils.log("DEBUG", "Match found for Vf Module Id " + qryModuleId + " for Generic Vnf Id " +
- execution.getVariable("DAAIVfMod_vnfId") + ", Base Module is " + isBaseVfModule +
- ", Resource Version is " + execution.getVariable("vfModRsrcVer"), isDebugEnabled)
- break
- }
- moduleCntr++
- }
- }
-
- // determine if the module to be deleted is a Base Module and/or the Last Module
- if (execution.getVariable("DAAIVfMod_moduleExists") == true) {
- if (isBaseVfModule.equals("true") && qryModuleIdList.size() != 1) {
- execution.setVariable("DAAIVfMod_parseModuleResponse",
- "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
- execution.getVariable("DAAIVfMod_vnfId") + ": is Base Module, not Last Module")
- execution.setVariable("DAAIVfMod_isBaseModule", true)
- } else {
- if (isBaseVfModule.equals("true") && qryModuleIdList.size() == 1) {
- execution.setVariable("DAAIVfMod_parseModuleResponse",
- "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
- execution.getVariable("DAAIVfMod_vnfId") + ": is Base Module and Last Module")
- execution.setVariable("DAAIVfMod_isBaseModule", true)
- execution.setVariable("DAAIVfMod_isLastModule", true)
- } else {
- if (qryModuleIdList.size() == 1) {
- execution.setVariable("DAAIVfMod_parseModuleResponse",
- "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
- execution.getVariable("DAAIVfMod_vnfId") + ": is Not Base Module, is Last Module")
- execution.setVariable("DAAIVfMod_isLastModule", true)
- } else {
- execution.setVariable("DAAIVfMod_parseModuleResponse",
- "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
- execution.getVariable("DAAIVfMod_vnfId") + ": is Not Base Module and Not Last Module")
- }
- }
- }
- utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
- } else { // (execution.getVariable("DAAIVfMod_moduleExists") == false)
- utils.log("DEBUG", "Vf Module Id " + delModuleId + " does not exist for Generic Vnf Id " +
- execution.getVariable("DAAIVfMod_vnfId"), isDebugEnabled)
- execution.setVariable("DAAIVfMod_parseModuleResponse",
- "Vf Module Id " + delModuleId + " does not exist for Generic Vnf Id " +
- execution.getVariable("DAAIVfMod_vnfName"))
- }
- }
-
- // parses the output from the result from queryAAIForGenericVnf() to determine if the Vf Module
- // to be deleted exists for the specified Generic Vnf and if it is the Base Module,
- // there are no Add-on Modules present
- public void parseForResourceVersion(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DAAIVfMod_queryGenericVnfResponse")
- utils.logAudit("DeleteAAIVfModule - queryGenericVnfResponse" + xml)
- String resourceVer = utils.getNodeText1(xml, "resource-version")
- execution.setVariable("DAAIVfMod_genVnfRsrcVer", resourceVer)
- utils.log("DEBUG", "Latest Generic VNF Resource Version: " + resourceVer)
- }
-
-
- // generates a WorkflowException if the A&AI query returns a response code other than 200
- public void handleAAIQueryFailure(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- utils.log("ERROR", "Error occurred attempting to query AAI, Response Code " +
- execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " +
- execution.getVariable("DAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
- def errorCode = 5000
- // set the errorCode to distinguish between a A&AI failure
- // and the Generic Vnf Id not found
- if (execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") == 404) {
- errorCode = 1002
- }
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, errorCode,
- execution.getVariable("DAAIVfMod_queryGenericVnfResponse"))
- execution.setVariable("WorkflowException", exception)
- }
-
- // generates a WorkflowException if
- // - the A&AI Vf Module DELETE returns a response code other than 200
- // - the Vf Module is a Base Module that is not the last Vf Module
- // - the Vf Module does not exist for the Generic Vnf
- public void handleDeleteVfModuleFailure(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- def errorCode = 2000
- def errorResponse = ""
- if (execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") != null &&
- execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") != 200) {
- utils.log("DEBUG", "AAI failure deleting a Vf Module: " +
- execution.getVariable("DAAIVfMod_deleteVfModuleResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("DAAIVfMod_deleteVfModuleResponse")
- utils.logAudit("DeleteAAIVfModule - deleteVfModuleResponse" + errorResponse)
- errorCode = 5000
- } else {
- if (execution.getVariable("DAAIVfMod_isBaseModule", true) == true &&
- execution.getVariable("DAAIVfMod_isLastModule") == false) {
- // attempt to delete a Base Module that is not the last Vf Module
- utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("DAAIVfMod_parseModuleResponse")
- utils.logAudit("DeleteAAIVfModule - parseModuleResponse" + errorResponse)
- errorCode = 1002
- } else {
- // attempt to delete a non-existant Vf Module
- if (execution.getVariable("DAAIVfMod_moduleExists") == false) {
- utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
- errorResponse = execution.getVariable("DAAIVfMod_parseModuleResponse")
- utils.logAudit("DeleteAAIVfModule - parseModuleResponse" + errorResponse)
- errorCode = 1002
- } else {
- // if the responses get populated corerctly, we should never get here
- errorResponse = "Unknown error occurred during DeleteAAIVfModule flow"
- }
- }
- }
-
- utils.log("ERROR", "Error occurred during DeleteAAIVfModule flow: " + errorResponse, isDebugEnabled)
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorResponse)
- execution.setVariable("WorkflowException", exception)
- }
-
- // generates a WorkflowException if
- // - the A&AI Generic Vnf DELETE returns a response code other than 200
- public void handleDeleteGenericVnfFailure(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
- + execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"), isDebugEnabled)
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"))
- execution.setVariable("WorkflowException", exception)
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient;
+import org.openecomp.mso.rest.RESTConfig;
+
+
+public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
+
+ def Prefix="DAAIVfMod_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable("prefix",Prefix)
+ execution.setVariable("DAAIVfMod_vnfId",null)
+ execution.setVariable("DAAIVfMod_vnfName",null)
+ execution.setVariable("DAAIVfMod_genVnfRsrcVer",null)
+ execution.setVariable("DAAIVfMod_vfModuleId",null)
+ execution.setVariable("DAAIVfMod_vfModRsrcVer",null)
+ execution.setVariable("DAAIVfMod_genericVnfEndpoint",null)
+ execution.setVariable("DAAIVfMod_vfModuleEndpoint",null)
+ execution.setVariable("DAAIVfMod_moduleExists",false)
+ execution.setVariable("DAAIVfMod_isBaseModule", false)
+ execution.setVariable("DAAIVfMod_isLastModule", false)
+
+ // DeleteAAIVfModule workflow response variable placeholders
+ execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode",null)
+ execution.setVariable("DAAIVfMod_queryGenericVnfResponse","")
+ execution.setVariable("DAAIVfMod_parseModuleResponse","")
+ execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode",null)
+ execution.setVariable("DAAIVfMod_deleteGenericVnfResponse","")
+ execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode",null)
+ execution.setVariable("DAAIVfMod_deleteVfModuleResponse","")
+
+ }
+
+ // parse the incoming DELETE_VF_MODULE request and store the Generic Vnf
+ // and Vf Module Ids in the flow Execution
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def xml = execution.getVariable("DeleteAAIVfModuleRequest")
+ utils.logAudit("DeleteAAIVfModule Request: " + xml)
+ utils.log("DEBUG", "input request xml:" + xml, isDebugEnabled)
+ initProcessVariables(execution)
+ def vnfId = utils.getNodeText(xml,"vnf-id")
+ def vfModuleId = utils.getNodeText(xml,"vf-module-id")
+ execution.setVariable("DAAIVfMod_vnfId", vnfId)
+ execution.setVariable("DAAIVfMod_vfModuleId", vfModuleId)
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+
+ execution.setVariable("DAAIVfMod_genericVnfEndpoint", "${aai_uri}/" + vnfId)
+ execution.setVariable("DAAIVfMod_vfModuleEndpoint", "${aai_uri}/" + vnfId +
+ "/vf-modules/vf-module/" + vfModuleId)
+ }
+
+ // send a GET request to AA&I to retrieve the Generic Vnf/Vf Module information based on a Vnf Id
+ // expect a 200 response with the information in the response body or a 404 if the Generic Vnf does not exist
+ public void queryAAIForGenericVnf(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def delModuleId = execution.getVariable("DAAIVfMod_vfModuleId")
+ def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_genericVnfEndpoint") + "?depth=1"
+ utils.logAudit("DeleteAAIVfModule endPoint: " + endPoint)
+ def aaiRequestId = UUID.randomUUID().toString()
+
+ RESTConfig config = new RESTConfig(endPoint);
+ utils.log("DEBUG","queryAAIForGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+ def responseData = ""
+ try {
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
+ addHeader("Accept","application/xml");
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ utils.log("DEBUG", "invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugEnabled)
+ APIResponse response = client.httpGet()
+ utils.logAudit("DeleteAAIVfModule - invoking httpGet to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode", response.getStatusCode())
+ execution.setVariable("DAAIVfMod_queryGenericVnfResponse", responseData)
+ utils.logAudit("AAI Response: " + responseData)
+ utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+ utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugEnabled)
+ execution.setVariable("DAAIVfMod_queryGenericVnfResponse", "AAI GET Failed:" + ex.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured during queryAAIForGenericVnf")
+
+ }
+ }
+
+ // construct and send a DELETE request to A&AI to delete a Generic Vnf
+ // note: to get here, all the modules associated with the Generic Vnf must already be deleted
+ public void deleteGenericVnf(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def aaiRequestId = UUID.randomUUID().toString()
+ def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_genericVnfEndpoint") +
+ "/?resource-version=" + execution.getVariable("DAAIVfMod_genVnfRsrcVer")
+ utils.logAudit("AAI endPoint: " + endPoint)
+ RESTConfig config = new RESTConfig(endPoint);
+ utils.log("DEBUG","deleteGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+ def responseData = ""
+ try {
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
+ addHeader("Accept","application/xml");
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ APIResponse response = client.httpDelete()
+
+ responseData = response.getResponseBodyAsString()
+ execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode", response.getStatusCode())
+ execution.setVariable("DAAIVfMod_deleteGenericVnfResponse", responseData)
+ utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+ utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ utils.log("DEBUG", "Exception occurred while executing AAI DELETE:" + ex.getMessage(),isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured during deleteGenericVnf")
+ }
+ }
+
+ // construct and send a DELETE request to A&AI to delete the Base or Add-on Vf Module
+ public void deleteVfModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_vfModuleEndpoint") +
+ "/?resource-version=" + execution.getVariable("DAAIVfMod_vfModRsrcVer")
+ def aaiRequestId = UUID.randomUUID().toString()
+
+ RESTConfig config = new RESTConfig(endPoint);
+ utils.log("DEBUG","deleteVfModule() endpoint-" + endPoint, isDebugEnabled)
+ def responseData = ""
+ try {
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
+ addHeader("Accept","application/xml");
+
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ APIResponse response = client.httpDelete()
+
+ utils.logAudit("DeleteAAIVfModule - invoking httpDelete to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode", response.getStatusCode())
+ execution.setVariable("DAAIVfMod_deleteVfModuleResponse", responseData)
+ utils.logAudit("DeleteAAIVfModule - AAI Response" + responseData)
+ utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+ utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured during deleteVfModule")
+ }
+ }
+
+ // parses the output from the result from queryAAIForGenericVnf() to determine if the Vf Module
+ // to be deleted exists for the specified Generic Vnf and if it is the Base Module,
+ // there are no Add-on Modules present
+ public void parseForVfModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def xml = execution.getVariable("DAAIVfMod_queryGenericVnfResponse")
+ utils.logAudit("DeleteAAIVfModule - queryGenericVnfResponse" + xml)
+
+ def delModuleId = execution.getVariable("DAAIVfMod_vfModuleId")
+ utils.log("DEBUG", "Vf Module to be deleted: " + delModuleId, isDebugEnabled)
+ List <String> qryModuleIdList = utils.getMultNodes(xml, "vf-module-id")
+ List <String> qryBaseModuleList = utils.getMultNodes(xml, "is-base-vf-module")
+ List <String> qryResourceVerList = utils.getMultNodes(xml, "resource-version")
+ execution.setVariable("DAAIVfMod_moduleExists", false)
+ execution.setVariable("DAAIVfMod_isBaseModule", false)
+ execution.setVariable("DAAIVfMod_isLastModule", false)
+ //
+ def isBaseVfModule = "false"
+ // loop through the Vf Module Ids looking for a match
+ if (qryModuleIdList != null && !qryModuleIdList.empty) {
+ utils.log("DEBUG", "Existing Vf Module Id List: " + qryModuleIdList, isDebugEnabled)
+ utils.log("DEBUG", "Existing Vf Module Resource Version List: " + qryResourceVerList, isDebugEnabled)
+ def moduleCntr = 0
+ // the Generic Vnf resource-version in the 1st entry in the query response
+ execution.setVariable("DAAIVfMod_genVnfRsrcVer", qryResourceVerList[moduleCntr])
+ for (String qryModuleId : qryModuleIdList) {
+ if (delModuleId.equals(qryModuleId)) {
+ // a Vf Module with the requested Id exists
+ execution.setVariable("DAAIVfMod_moduleExists", true)
+ // find the corresponding value for the is-base-vf-module field
+ isBaseVfModule = qryBaseModuleList[moduleCntr]
+ // find the corresponding value for the resource-version field
+ // note: the Generic Vnf entry also has a resource-version field, so
+ // add 1 to the index to get the corresponding Vf Module value
+ execution.setVariable("DAAIVfMod_vfModRsrcVer", qryResourceVerList[moduleCntr+1])
+ utils.log("DEBUG", "Match found for Vf Module Id " + qryModuleId + " for Generic Vnf Id " +
+ execution.getVariable("DAAIVfMod_vnfId") + ", Base Module is " + isBaseVfModule +
+ ", Resource Version is " + execution.getVariable("vfModRsrcVer"), isDebugEnabled)
+ break
+ }
+ moduleCntr++
+ }
+ }
+
+ // determine if the module to be deleted is a Base Module and/or the Last Module
+ if (execution.getVariable("DAAIVfMod_moduleExists") == true) {
+ if (isBaseVfModule.equals("true") && qryModuleIdList.size() != 1) {
+ execution.setVariable("DAAIVfMod_parseModuleResponse",
+ "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+ execution.getVariable("DAAIVfMod_vnfId") + ": is Base Module, not Last Module")
+ execution.setVariable("DAAIVfMod_isBaseModule", true)
+ } else {
+ if (isBaseVfModule.equals("true") && qryModuleIdList.size() == 1) {
+ execution.setVariable("DAAIVfMod_parseModuleResponse",
+ "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+ execution.getVariable("DAAIVfMod_vnfId") + ": is Base Module and Last Module")
+ execution.setVariable("DAAIVfMod_isBaseModule", true)
+ execution.setVariable("DAAIVfMod_isLastModule", true)
+ } else {
+ if (qryModuleIdList.size() == 1) {
+ execution.setVariable("DAAIVfMod_parseModuleResponse",
+ "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+ execution.getVariable("DAAIVfMod_vnfId") + ": is Not Base Module, is Last Module")
+ execution.setVariable("DAAIVfMod_isLastModule", true)
+ } else {
+ execution.setVariable("DAAIVfMod_parseModuleResponse",
+ "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+ execution.getVariable("DAAIVfMod_vnfId") + ": is Not Base Module and Not Last Module")
+ }
+ }
+ }
+ utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
+ } else { // (execution.getVariable("DAAIVfMod_moduleExists") == false)
+ utils.log("DEBUG", "Vf Module Id " + delModuleId + " does not exist for Generic Vnf Id " +
+ execution.getVariable("DAAIVfMod_vnfId"), isDebugEnabled)
+ execution.setVariable("DAAIVfMod_parseModuleResponse",
+ "Vf Module Id " + delModuleId + " does not exist for Generic Vnf Id " +
+ execution.getVariable("DAAIVfMod_vnfName"))
+ }
+ }
+
+ // parses the output from the result from queryAAIForGenericVnf() to determine if the Vf Module
+ // to be deleted exists for the specified Generic Vnf and if it is the Base Module,
+ // there are no Add-on Modules present
+ public void parseForResourceVersion(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def xml = execution.getVariable("DAAIVfMod_queryGenericVnfResponse")
+ utils.logAudit("DeleteAAIVfModule - queryGenericVnfResponse" + xml)
+ String resourceVer = utils.getNodeText1(xml, "resource-version")
+ execution.setVariable("DAAIVfMod_genVnfRsrcVer", resourceVer)
+ utils.log("DEBUG", "Latest Generic VNF Resource Version: " + resourceVer)
+ }
+
+
+ // generates a WorkflowException if the A&AI query returns a response code other than 200
+ public void handleAAIQueryFailure(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("ERROR", "Error occurred attempting to query AAI, Response Code " +
+ execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " +
+ execution.getVariable("DAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+ def errorCode = 5000
+ // set the errorCode to distinguish between a A&AI failure
+ // and the Generic Vnf Id not found
+ if (execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") == 404) {
+ errorCode = 1002
+ }
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode, execution.getVariable("DAAIVfMod_queryGenericVnfResponse"))
+ }
+
+ // generates a WorkflowException if
+ // - the A&AI Vf Module DELETE returns a response code other than 200
+ // - the Vf Module is a Base Module that is not the last Vf Module
+ // - the Vf Module does not exist for the Generic Vnf
+ public void handleDeleteVfModuleFailure(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ def errorCode = 2000
+ def errorResponse = ""
+ if (execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") != null &&
+ execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") != 200) {
+ utils.log("DEBUG", "AAI failure deleting a Vf Module: " +
+ execution.getVariable("DAAIVfMod_deleteVfModuleResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("DAAIVfMod_deleteVfModuleResponse")
+ utils.logAudit("DeleteAAIVfModule - deleteVfModuleResponse" + errorResponse)
+ errorCode = 5000
+ } else {
+ if (execution.getVariable("DAAIVfMod_isBaseModule", true) == true &&
+ execution.getVariable("DAAIVfMod_isLastModule") == false) {
+ // attempt to delete a Base Module that is not the last Vf Module
+ utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("DAAIVfMod_parseModuleResponse")
+ utils.logAudit("DeleteAAIVfModule - parseModuleResponse" + errorResponse)
+ errorCode = 1002
+ } else {
+ // attempt to delete a non-existant Vf Module
+ if (execution.getVariable("DAAIVfMod_moduleExists") == false) {
+ utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
+ errorResponse = execution.getVariable("DAAIVfMod_parseModuleResponse")
+ utils.logAudit("DeleteAAIVfModule - parseModuleResponse" + errorResponse)
+ errorCode = 1002
+ } else {
+ // if the responses get populated corerctly, we should never get here
+ errorResponse = "Unknown error occurred during DeleteAAIVfModule flow"
+ }
+ }
+ }
+
+ utils.log("ERROR", "Error occurred during DeleteAAIVfModule flow: " + errorResponse, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, errorCode, errorResponse)
+
+ }
+
+ // generates a WorkflowException if
+ // - the A&AI Generic Vnf DELETE returns a response code other than 200
+ public void handleDeleteGenericVnfFailure(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
+ + execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"))
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
index 2f32367e5d..4cc4da49b3 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
@@ -1,509 +1,398 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-
-import static org.apache.commons.lang3.StringUtils.*;
-
-/**
- * @version 1.0
- */
-class ExceptionUtil extends AbstractServiceTaskProcessor {
-
- /**
- *
- * @Deprecated
- *
- * Instead use <method>MapAAIExceptionToWorkflowException</method>
- *
- * To Be Removed Once Refactoring Main Flow Error Handling Is Complete
- *
- *
- */
- @Deprecated
- String MapAAIExceptionToWorkflowExceptionOld(String response, Execution execution)
- {
- def utils=new MsoUtils()
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix=execution.getVariable("prefix")
- def errorMsg = execution.getVariable(prefix+"ErrorResponse")
- utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
- String text = null
- def variables
- String errorCode = '5000'
- utils.log("DEBUG","response: " + response, isDebugEnabled)
- try {
- //String msg = utils.getNodeXml(response, "Fault")
- variables = utils.getMultNodes(response, "variable")
- text = utils.getNodeText1(response, "text")
- } catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
- }
-
- if(text != null) {
- if(variables.size()>=4){
- text = text.replaceFirst("%1", variables[0])
- text = text.replaceFirst("%2", variables[1])
- text = text.replaceFirst("%3", variables[2])
- text = text.replaceFirst("%4", variables[3])
- }
- String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
- utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
- // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
- String message = """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>$modifiedErrorMessage</aetgt:ErrorMessage>
- <aetgt:ErrorCode>$errorCode</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
- execution.setVariable(prefix+"ErrorResponse",message)
- utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
- return message
- } else {
- try {
- errorCode = MapErrorCode(errorMsg)
- String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
-
- String message = """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>$mappedErrorMessage</aetgt:ErrorMessage>
- <aetgt:ErrorCode>$errorCode</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
- utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
- execution.setVariable(prefix+"ErrorResponse",message)
- utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
- return message
- } catch(Exception ex) {
- utils.log("DEBUG","error mapping error, return null: " + ex,isDebugEnabled)
- return null
-
- }
- }
- }
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method formats the exception from AAI into the WorkflowException's
- * errorMessage that CCD expects.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
- {
- def utils=new MsoUtils()
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix=execution.getVariable("prefix")
- def errorMsg = execution.getVariable(prefix+"ErrorResponse")
- utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
- String text = null
- def variables
- String errorCode = '5000'
- WorkflowException wfex
- utils.log("DEBUG","response: " + response, isDebugEnabled)
- try {
- //String msg = utils.getNodeXml(response, "Fault")
- variables = utils.getMultNodes(response, "variable")
- text = utils.getNodeText1(response, "text")
- } catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
- }
-
- if(text != null) {
- if(variables.size()>=4){
- text = text.replaceFirst("%1", variables[0])
- text = text.replaceFirst("%2", variables[1])
- text = text.replaceFirst("%3", variables[2])
- text = text.replaceFirst("%4", variables[3])
- }
- String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
- utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
- // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
- buildWorkflowException(execution, 5000, modifiedErrorMessage)
-
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex)
- return wfex
- } else {
- try {
- errorCode = MapErrorCode(errorMsg)
- String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
-
- int errorCodeInt = Integer.parseInt(errorCode)
- buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
-
- utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
- return wfex
- } catch(Exception ex) {
- utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
- return null
-
- }
- }
- }
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method takes the exact exception inside the <Fault> tags from AAI Response
- * and puts it into the WorkflowException's errorMessage.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
- def utils=new MsoUtils()
- def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
-
- WorkflowException wfex
- try {
- if(utils.nodeExists(response, "Fault")){
- String fault = utils.getNodeXml(response, "Fault")
- fault = utils.removeXmlPreamble(fault)
- fault = fault.replace("<Fault>", "").replace("</Fault>", "")
- fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
- buildWorkflowException(execution, resCode, fault)
- }else if(utils.nodeExists(response, "RESTFault")){
- String rFault = utils.getNodeXml(response, "RESTFault")
- buildWorkflowException(execution, resCode, rFault)
- }else{
- buildWorkflowException(execution, resCode, "Received a bad response from AAI")
- }
- } catch (Exception ex) {
- utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
- buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
-
- }
- utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
- utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
- }
-
- /**
- *
- *This method build a WorkflowException using the adapters response.
- *
- *@param String response
- *@param String adapter
- *
- *@return WorkflowException wfex
- */
- WorkflowException MapAdapterExecptionToWorkflowException(String response, Execution execution, String adapter){
- def utils=new MsoUtils()
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix=execution.getVariable("prefix")
- utils.log("DEBUG","=========== Start MapAdapterExecptionToWorkflowException Process ===========",isDebugEnabled)
-
- String errorCode
- def errorMessage
- WorkflowException wfex
- try {
- errorCode = MapCategoryToErrorCode(utils.getNodeText(response, "category"))
- errorMessage = MapAdapterErrorMessage(utils.getNodeText(response, "message"), errorCode, adapter)
-
- int errorCodeInt = Integer.parseInt(errorCode)
- buildWorkflowException(execution, errorCodeInt, errorMessage)
- }catch (Exception ex) {
- utils.log("DEBUG", "Exception Occured during MapAdapterExecptionToWorkflowException: " + ex, isDebugEnabled)
- buildWorkflowException(execution, 2500, "Internal Error - Occured in MapAdapterExecptionToWorkflowException")
- }
- wfex = execution.getVariable("WorkflowException")
- return wfex
- utils.log("DEBUG","=========== Completed MapAdapterExecptionToWorkflowException Process ===========",isDebugEnabled)
- }
-
-
- /**
- *
- * @Deprecated
- *
- * Instead use <method>buildWorkflowException(Execution execution, int errorCode, String errorMessage)</method> method below
- *
- * To Be Removed Once Refactoring Of Main Flow Error Handling Is Complete
- *
- */
- @Deprecated
- String buildWorkflowExceptionXml(String errorCode, String errorMessage) {
- return """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
- }
-
- /**
- * This method takes a WorkflowException Object and builds
- * WorkflowException Xml. This method should only be used
- * for the purpose of sending an error response.
- *
- *@param - WorkflowException Object
- *
- *@return - String WorkflowException Xml
- *
- *
- */
- String buildErrorResponseXml(WorkflowException wfex) {
- String xml
- if(wfex != null){
- String mes = wfex.getErrorMessage()
- int code = wfex.getErrorCode()
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- }else{
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
- <aetgt:ErrorCode>2500</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
- }
- return xml
- }
-
- /*
- 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
- 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established.
- 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
- */
- String MapErrorCode(String errorMessage)
- {
- if(errorMessage==null){
- return '5000'
- }
- errorMessage = errorMessage.toLowerCase();
- if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
- return '5020'
- else if (errorMessage.contains('connection'))
- return '5010'
- else
- return '5000'
- }
-
- String MapErrorMessage(String errorMessage, String errorCode)
- {
- if(errorMessage == null){
- errorMessage=""
- }
- if( errorCode.equals('5010'))
- return 'Could not communicate with A&amp;AI'
- else if (errorCode.equals('5020'))
- return 'No response from A&amp;AI'
- else
- return 'Received error from A&amp;AI (' +errorMessage +')'
- }
-
- String MapCategoryToErrorCode(String errorCategory)
- {
- if(errorCategory.equals('OPENSTACK'))
- return '5100'
- else if (errorCategory.equals('IO'))
- return '5110'
- else if (errorCategory.equals('INTERNAL'))
- return '7020'
- else if (errorCategory.equals('USERDATA'))
- return '7020'
- else
- return '7020'
- }
-
-
- String MapAdapterErrorMessage(String errorMessage, String errorCode, String adapter)
- {
- if(errorCode.equals('5100'))
- return 'Received error from Platform Orchestrator: ' + errorMessage
- else if(errorCode.equals('5110'))
- return 'Could not communicate with Platform Orchestrator'
- else
- return 'Received error from ' + adapter + ': ' + errorMessage
- }
-
- String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
- {
- if (sdncResponseCode == '500') {
- return '5310'
- } else if ( sdncResponseCode == '408') {
- return '5320'
- } else if ( sdncResponseCode == '60010') {
- return '5350'
- } else {
- return '5300'
- }
- }
-
- /**
- * This error handling method builds a WorkflowException Object. It sets it on
- * the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
- MsoUtils utils = new MsoUtils()
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- }
-
- /**
- * This error handling method builds a WorkflowException Object and throws a
- * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after
- * setting the WorkflowException Object on the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * subflow (during subflows "Error Handling Sub Process").
- * It ensures the WorkflowException variable is populated before ending the
- * subflow and also logs the subflows outgoing WorkflowException Variable.
- *
- * @param - execution
- *
- */
- public void processSubflowsBPMNException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null){
- buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
- }
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
- }
- utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * Mainflow. It builds and returns a FalloutHandler Request. It also
- * verifies the WorkflowException variable is populated.
- *
- * @param - execution
- * @param - requestInfo
- *
- * @return - falloutHandlerRequest
- *
- */
- public String processMainflowsBPMNException(Execution execution, String requestInfo){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
- buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
- }
- requestInfo = utils.removeXmlPreamble(requestInfo)
- WorkflowException wfex = execution.getVariable("WorkflowException")
- String errorMessage = wfex.getErrorMessage()
- int errorCode = wfex.getErrorCode()
-
- String falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- ${requestInfo}
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- utils.log("DEBUG", processKey + " Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
-
- return falloutHandlerRequest
-
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
- return null
- }
- utils.log("DEBUG", "Completed ProcessMainflowBPMNException Method", isDebugEnabled)
- }
-
- /**
- * This method is executed after an Java Exception is caught.
- * It sets the WorkflowException variable and throws an MSOWorkflowException.
- *
- * @param - execution
- *
- */
- public void processSubflowsJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- buildAndThrowWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
-
- }catch(BpmnError b){
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- buildAndThrowWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-
- public void preProcessRequest(Execution execution) {
- // TODO Auto-generated method stub
-
- }
-
-
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+/**
+ * @version 1.0
+ */
+class ExceptionUtil extends AbstractServiceTaskProcessor {
+
+
+ /**
+ * This error handling method maps an AAI Exception response to a
+ * WorkflowException Object. It then sets the WorkflowException Object
+ * on the execution as "WorkflowException".
+ *
+ * This method formats the exception from AAI into the WorkflowException's
+ * errorMessage that CCD expects.
+ *
+ * @param execution the execution
+ * @param response the aai exception
+ */
+ WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
+ {
+ def utils=new MsoUtils()
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def prefix=execution.getVariable("prefix")
+ def errorMsg = execution.getVariable(prefix+"ErrorResponse")
+ utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
+ String text = null
+ def variables
+ String errorCode = '5000'
+ WorkflowException wfex
+ utils.log("DEBUG","response: " + response, isDebugEnabled)
+ try{
+ try {
+ //String msg = utils.getNodeXml(response, "Fault")
+ variables = utils.getMultNodes(response, "variable")
+ text = utils.getNodeText1(response, "text")
+ } catch (Exception ex) {
+ //Ignore the exception - cases include non xml payload
+ utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
+ }
+
+ if(text != null) {
+ if(variables.size()>=4){
+ text = text.replaceFirst("%1", variables[0])
+ text = text.replaceFirst("%2", variables[1])
+ text = text.replaceFirst("%3", variables[2])
+ text = text.replaceFirst("%4", variables[3])
+ }
+ String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
+ utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
+ // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
+ buildWorkflowException(execution, 5000, modifiedErrorMessage)
+
+ wfex = execution.getVariable("WorkflowException")
+ utils.log("ERROR","Fault:"+ wfex)
+ return wfex
+ } else {
+ try {
+ errorCode = MapErrorCode(errorMsg)
+ String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
+
+ int errorCodeInt = Integer.parseInt(errorCode)
+ buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
+
+ utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
+ wfex = execution.getVariable("WorkflowException")
+ utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
+ return wfex
+ } catch(Exception ex) {
+ utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
+ return null
+
+ }
+ }
+ }catch(Exception e){
+ utils.log("DEBUG", "Exception occured during MapAAIExceptionToWorkflowException: " + e, isDebugEnabled)
+ buildWorkflowException(execution, 5000, "Error mapping AAI Response to WorkflowException")
+ }
+ }
+
+ /**
+ * This error handling method maps an AAI Exception response to a
+ * WorkflowException Object. It then sets the WorkflowException Object
+ * on the execution as "WorkflowException".
+ *
+ * This method takes the exact exception inside the <Fault> tags from AAI Response
+ * and puts it into the WorkflowException's errorMessage.
+ *
+ * @param execution the execution
+ * @param response the aai exception
+ */
+ WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
+ def utils=new MsoUtils()
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+
+ WorkflowException wfex
+ try {
+ if(utils.nodeExists(response, "Fault")){
+ String fault = utils.getNodeXml(response, "Fault")
+ fault = utils.removeXmlPreamble(fault)
+ fault = fault.replace("<Fault>", "").replace("</Fault>", "")
+ fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
+ buildWorkflowException(execution, resCode, fault)
+ }else if(utils.nodeExists(response, "RESTFault")){
+ String rFault = utils.getNodeXml(response, "RESTFault")
+ buildWorkflowException(execution, resCode, rFault)
+ }else{
+ buildWorkflowException(execution, resCode, "Received a bad response from AAI")
+ }
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
+ buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
+
+ }
+ utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
+ utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+ }
+
+ /**
+ * This method takes a WorkflowException Object and builds
+ * WorkflowException Xml. This method should only be used
+ * for the purpose of sending a sync error response or for
+ * creating a FalloutHandler request.
+ *
+ *@param - WorkflowException Object
+ *
+ *@return - String WorkflowException Xml
+ *
+ *
+ */
+ String buildErrorResponseXml(WorkflowException wfex) {
+ String xml
+ if(wfex != null){
+ String mes = wfex.getErrorMessage()
+ int code = wfex.getErrorCode()
+ xml =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ }else{
+ xml =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+ }
+ return xml
+ }
+
+ /*
+ 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
+ 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established.
+ 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
+ */
+ /**
+ *
+ * Utility Method for MapAAIExceptionToWorkflowException
+ *
+ *@param - String ErrorMessage
+ *
+ *@return - String ErrorCode
+ *
+ */
+ private String MapErrorCode(String errorMessage)
+ {
+ if(errorMessage==null){
+ return '5000'
+ }
+ errorMessage = errorMessage.toLowerCase();
+ if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
+ return '5020'
+ else if (errorMessage.contains('connection'))
+ return '5010'
+ else
+ return '5000'
+ }
+
+ /**
+ *
+ * Utility Method for MapAAIExceptionToWorkflowException
+ *
+ *@param - String ErrorMessage
+ *@param - String ErrorCode
+ *
+ *@return - String ErrorMessage
+ *
+ */
+ private String MapErrorMessage(String errorMessage, String errorCode)
+ {
+ if(errorMessage == null){
+ errorMessage=""
+ }
+ if( errorCode.equals('5010')){
+ return 'Could not communicate with A&amp;AI'
+ }else if (errorCode.equals('5020')){
+ return 'No response from A&amp;AI'
+ }else{
+ errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ return 'Received error from A&amp;AI (' +errorMessage +')'
+ }
+ }
+
+ /**
+ *
+ * Utility Method for Mapping SDNC
+ * Adapter Response Codes
+ *
+ *@param - String sdncResponseCode
+ *
+ *@return - String code
+ *
+ */
+ String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
+ {
+ if (sdncResponseCode == '500') {
+ return '5310'
+ } else if ( sdncResponseCode == '408') {
+ return '5320'
+ } else if ( sdncResponseCode == '60010') {
+ return '5350'
+ } else {
+ return '5300'
+ }
+ }
+
+ /**
+ * This error handling method builds a WorkflowException Object. It sets it on
+ * the execution as "WorkflowException".
+ *
+ * @param execution the execution
+ * @param errorCode the error code
+ * @param errorMessage the error message
+ */
+ public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
+ MsoUtils utils = new MsoUtils()
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String processKey = getProcessKey(execution);
+ utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
+
+ WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+ utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+ }
+
+ /**
+ * This error handling method builds a WorkflowException Object and throws a
+ * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after
+ * setting the WorkflowException Object on the execution as "WorkflowException".
+ *
+ * @param execution the execution
+ * @param errorCode the error code
+ * @param errorMessage the error message
+ */
+ public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String processKey = getProcessKey(execution);
+ utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
+
+ WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+ utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+ utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ /**
+ * This method is executed after an MSOWorkflowException is caught by a
+ * subflow (during subflows "Error Handling Sub Process").
+ * It ensures the WorkflowException variable is populated before ending the
+ * subflow and also logs the subflows outgoing WorkflowException Variable.
+ *
+ * @param - execution
+ *
+ */
+ public void processSubflowsBPMNException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
+ if(execution.getVariable("WorkflowException") == null){
+ buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
+ }
+
+ utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
+ }
+ utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
+ }
+
+ /**
+ * This method is executed after an MSOWorkflowException is caught by a
+ * Mainflow. It builds and returns a FalloutHandler Request. It also
+ * verifies the WorkflowException variable is populated.
+ *
+ * @param - execution
+ * @param - requestInfo
+ *
+ * @return - falloutHandlerRequest
+ *
+ */
+ public String processMainflowsBPMNException(Execution execution, String requestInfo){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
+ if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
+ buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
+ }
+ requestInfo = utils.removeXmlPreamble(requestInfo)
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String errorMessage = wfex.getErrorMessage()
+ int errorCode = wfex.getErrorCode()
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ ${requestInfo}
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+ utils.log("DEBUG", processKey + " Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
+
+ return falloutHandlerRequest
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
+ return null
+ }
+ utils.log("DEBUG", "Completed ProcessMainflowBPMNException Method", isDebugEnabled)
+ }
+
+ /**
+ *
+ * This method is executed after an Java Exception is caught
+ * It sets the WorkflowException variable. The method can be used in either mainflow or subflows.
+ *
+ * @param - execution
+ *
+ */
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ buildWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+
+ public void preProcessRequest(Execution execution) {
+ // TODO Auto-generated method stub
+
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/FalloutHandler.groovy
index eefcf47e1b..282cbb3c69 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/FalloutHandler.groovy
@@ -1,402 +1,390 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import java.text.SimpleDateFormat
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.runtime.Execution
-
-public class FalloutHandler extends AbstractServiceTaskProcessor {
-
- String Prefix="FH_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- public initializeProcessVariables(Execution execution){
- def method = getClass().getSimpleName() + '.initializeProcessVariables(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- execution.setVariable("prefix",Prefix)
-
- //These variables are form the input Message to the BPMN
- execution.setVariable("FH_request_id","")
- execution.setVariable("FH_request_action","")
- execution.setVariable("FH_notification-url","")
- execution.setVariable("FH_mso-bpel-name","")
- execution.setVariable("FH_ErrorCode", "")
- execution.setVariable("FH_ErrorMessage", "")
-
- execution.setVariable("FH_notification-url-Ok", false)
- execution.setVariable("FH_request_id-Ok", false)
-
- //These variables are for Get Mso Aai Password Adapter
- execution.setVariable("FH_deliveryStatus", true)
-
- //Notify CSI Adapter variables
- execution.setVariable("FH_notifyCSIPayload", "")
- execution.setVariable("FH_notifyCSIResponseCode", null)
- execution.setVariable("FH_notifyCSIResponse", "")
-
- //update Response Status to pending ...Adapter variables
- execution.setVariable("FH_updateResponseStatusPayload", null)
- execution.setVariable("FH_updateResponseStatusResponse", null)
-
- //update Request Gamma ...Adapter variables
- execution.setVariable("FH_updateRequestGammaPayload", "")
- execution.setVariable("FH_updateRequestGammaResponse", null)
- execution.setVariable("FH_updateRequestGammaResponseCode", null)
-
- //update Request Infra ...Adapter variables
- execution.setVariable("FH_updateRequestInfraPayload", "")
- execution.setVariable("FH_updateRequestInfraResponse", null)
- execution.setVariable("FH_updateRequestInfraResponseCode", null)
-
- //assign True to success variable
- execution.setVariable("FH_success", true)
-
- //Set notify status to Failed variable
- execution.setVariable("FH_NOTIFY_STATUS", "SUCCESS")
-
- //Set DB update variable
- execution.setVariable("FH_updateRequestPayload", "")
- execution.setVariable("FH_updateRequestResponse", null)
- execution.setVariable("FH_updateRequestResponseCode", null)
-
- //Auth variables
- execution.setVariable("BasicAuthHeaderValue","")
-
- //Parameter list
- execution.setVariable("FH_parameterList", "")
-
- //Response variables
- execution.setVariable("FalloutHandlerResponse","")
- execution.setVariable("FH_ErrorResponse", null)
- execution.setVariable("FH_ResponseCode", "")
-
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public void preProcessRequest (Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- // Initialize flow variables
- initializeProcessVariables(execution)
- setSuccessIndicator(execution, false)
-
- try {
- def xml = execution.getVariable("FalloutHandlerRequest")
- utils.log("DEBUG", " XML --> " + xml, isDebugLogEnabled)
- utils.logAudit("FalloutHandler request: " + xml)
-
- //Check the incoming request type
- //Incoming request can be ACTIVE_REQUESTS (request-information node) or INFRA_ACTIVE_REQUESTS (request-info node)
- if (utils.nodeExists(xml, "request-information")) {
- execution.setVariable("FH_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
- }
-
- //Check notification-url for the incoming request type
- //ACTIVE_REQUESTS may have notificationurl node
- //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
- def notificationurl = ""
- if (utils.nodeExists(xml, "notification-url")) {
- notificationurl = utils.getNodeText(xml,"notification-url")
- if(notificationurl != null && !notificationurl.isEmpty()) {
- execution.setVariable("FH_notification-url-Ok", true)
- execution.setVariable("FH_notification-url",notificationurl)
- }
- }
-
- //Check request_id for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
- //For ACTIVE_REQUESTS payload request-id is NOT optional
- def request_id = ""
- if (utils.nodeExists(xml, "request-id")) {
- execution.setVariable("FH_request_id",utils.getNodeText(xml,"request-id"))
- }
- utils.logAudit("FH_request_id: " + execution.getVariable("FH_request_id"))
-
- // INFRA_ACTIVE_REQUESTS have "action" element ... mandatory
- // ACTIVE_REQUEST have "request-action" ... mandatory
- if (utils.nodeExists(xml, "request-action")) {
- execution.setVariable("FH_request_action",utils.getNodeText(xml,"request-action"))
- } else if (utils.nodeExists(xml, "action")) {
- execution.setVariable("FH_request_action",utils.getNodeText(xml,"action"))
- }
-
-
- //Check source for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload source IS optional
- //For ACTIVE_REQUESTS payload source is NOT optional
- def source = ""
- if (utils.nodeExists(xml, "source")) {
- execution.setVariable("FH_source",utils.getNodeText(xml,"source"))
- }
-
- //Check if ErrorCode node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
- def errorCode = ""
- if (utils.nodeExists(xml, "ErrorCode")) {
- errorCode = utils.getNodeText(xml,"ErrorCode")
- if(errorCode != null && !errorCode.isEmpty()) {
- execution.setVariable("FH_ErrorCode", errorCode)
- }
- }
- utils.logAudit("FH_ErrorCode: " + errorCode)
-
- //Check if ErrorMessage node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
- def errorMessage = ""
- if (utils.nodeExists(xml, "ErrorMessage")) {
- errorCode = utils.getNodeText(xml,"ErrorMessage")
- if(errorCode != null && !errorCode.isEmpty()) {
- errorCode = errorCode.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
- execution.setVariable("FH_ErrorMessage", errorCode)
- }
- }
-
- //Check for Parameter List
- if (utils.nodeExists(xml, "parameter-list")) {
- def parameterList = utils.getNodeXml(xml, "parameter-list", false)
- execution.setVariable("FH_parameterList", parameterList)
- }
-
- utils.log("DEBUG","FH_notification-url-Ok --> " + execution.getVariable("FH_notification-url-Ok"),isDebugLogEnabled)
- utils.log("DEBUG","FH_request_id-OK --> " + execution.getVariable("FH_request_id-Ok"),isDebugLogEnabled)
-
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
- utils.log("DEBUG","OUTOF --> Initialize Variables Fallout Handler #########",isDebugLogEnabled);
- }
-
- public String updateRequestPayload (Execution execution){
- def method = getClass().getSimpleName() + '.updateRequestPayload(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>${execution.getVariable("FH_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <finalErrorMessage>${execution.getVariable("FH_ErrorMessage")}</finalErrorMessage>
- <finalErrorCode>${execution.getVariable("FH_ErrorCode")}</finalErrorCode>
- <status>FAILED</status>
- <responseStatus>${execution.getVariable("FH_NOTIFY_STATUS")}</responseStatus>
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- utils.logAudit("updateRequestPayload: " + payload)
- execution.setVariable("FH_updateRequestPayload", payload)
- return execution.getVariable("FH_updateRequestPayload")
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public String updateRequestInfraPayload (Execution execution){
- def method = getClass().getSimpleName() + '.updateRequestInfraPayload(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>${execution.getVariable("FH_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <statusMessage>${execution.getVariable("FH_ErrorMessage")}</statusMessage>
- <requestStatus>FAILED</requestStatus>
- <progress>100</progress>
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- execution.setVariable("FH_updateRequestInfraPayload", payload)
- utils.logAudit("updateRequestInfraPayload: " + payload)
- return execution.getVariable("FH_updateRequestInfraPayload")
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public String updateRequestGammaPayload (Execution execution){
- def method = getClass().getSimpleName() + '.updateRequestGammaPayload(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>${execution.getVariable("FH_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <finalErrorMessage>${execution.getVariable("FH_ErrorMessage")}</finalErrorMessage>
- <finalErrorCode>${execution.getVariable("FH_ErrorCode")}</finalErrorCode>
- <status>FAILED</status>
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- execution.setVariable("FH_updateRequestGammaPayload", payload)
- utils.logAudit("updateRequestGammaPayload: " + payload)
- return execution.getVariable("FH_updateRequestGammaPayload")
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public String updateResponseStatusPayload (Execution execution){
- def method = getClass().getSimpleName() + '.updateResponseStatusPayload(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateResponseStatus>
- <requestId>${execution.getVariable("FH_request_id")}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
- </req:updateResponseStatus>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- execution.setVariable("FH_updateResponseStatusPayload", payload)
- utils.logAudit("updateResponseStatusPayload: " + payload)
- return execution.getVariable("FH_updateResponseStatusPayload")
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public String notifyCSIPayload (Execution execution) {
- return "";
- }
-
- public String notifyCCDFailurePayload (Execution execution) {
- def method = getClass().getSimpleName() + '.notifyCCDFailurePayload(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def parameterList = execution.getVariable('FH_parameterList')
- String payload ="""
- <ns:status-notification xmlns:ns="http://ecomp.att.com/mso/statusnotification/schema/v1" xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1">
- <msoservtypes:request-id>${execution.getVariable("FH_request_id")}</msoservtypes:request-id>
- <msoservtypes:request-action>${execution.getVariable("FH_request_action")}</msoservtypes:request-action>
- <msoservtypes:source>${execution.getVariable("FH_source")}</msoservtypes:source>
- <msoservtypes:error-code>${execution.getVariable("FH_ErrorCode")}</msoservtypes:error-code>
- <msoservtypes:error-message>${execution.getVariable("FH_ErrorMessage")}</msoservtypes:error-message>
- <msoservtypes:ack-final-indicator>Y</msoservtypes:ack-final-indicator>
- ${parameterList}
- </ns:status-notification>
- """
-
- payload = utils.formatXml(payload)
- utils.logAudit("notifyCCDFailurePayload: " + payload)
-
- execution.setVariable("FH_notifyCCDFailurePayload", payload)
- utils.log("DEBUG", "FH_notifyCCDFailurePayload --> " + "\n" + execution.getVariable("FH_notifyCCDFailurePayload"), isDebugLogEnabled)
- return execution.getVariable("FH_notifyCCDFailurePayload")
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public void buildDBWorkflowException(Execution execution, String responseCodeVariable) {
- def method = getClass().getSimpleName() + '.buildDBWorkflowException(' +
- 'execution=' + execution.getId() +
- ', responseCodeVariable=' + responseCodeVariable + ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def responseCode = execution.getVariable(responseCodeVariable)
- // If the HTTP response code was null, it means a connection fault occurred (a java exception)
- def errorMessage = responseCode == null ? "Could not connect to DB Adapter" : "DB Adapter returned ${responseCode} response"
- def errorCode = responseCode == null ? 7000 : 7020
- exceptionUtil.buildWorkflowException(execution, errorCode, errorMessage)
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- /**
- * Used to create a workflow response in success and failure cases.
- */
- public void postProcessResponse (Execution execution) {
- def method = getClass().getSimpleName() + '.postProcessResponse(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- Boolean success = (Boolean) execution.getVariable("FH_success")
- String out = success ? "Fallout Handler Succeeded" : "Fallout Handler Failed";
-
- def falloutHandlerResponse = """
- <workflow:FalloutHandlerResponse xmlns:workflow="http://ecomp.att.com/mso/workflow/schema/v1">
- <workflow:out>${out}</workflow:out>
- </workflow:FalloutHandlerResponse>
- """
-
- falloutHandlerResponse = utils.formatXml(falloutHandlerResponse)
- utils.logAudit("FalloutHandler Response: " + falloutHandlerResponse);
-
- execution.setVariable("FalloutHandlerResponse", falloutHandlerResponse)
- execution.setVariable("WorkflowResponse", falloutHandlerResponse)
- execution.setVariable("FH_ResponseCode", success ? "200" : "500")
- setSuccessIndicator(execution, success)
-
- logDebug("FalloutHandlerResponse =\n" + falloutHandlerResponse, isDebugLogEnabled)
- } catch (Exception e) {
- // Do NOT throw WorkflowException!
- logError('Caught exception in ' + method, e)
- }
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import java.text.SimpleDateFormat
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.runtime.Execution
+
+public class FalloutHandler extends AbstractServiceTaskProcessor {
+ String Prefix="FH_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public initializeProcessVariables(Execution execution){
+ def method = getClass().getSimpleName() + '.initializeProcessVariables(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ execution.setVariable("prefix",Prefix)
+
+ //These variables are form the input Message to the BPMN
+ execution.setVariable("FH_request_id","")
+ execution.setVariable("FH_request_action","")
+ execution.setVariable("FH_notification-url","")
+ execution.setVariable("FH_mso-bpel-name","")
+ execution.setVariable("FH_ErrorCode", "")
+ execution.setVariable("FH_ErrorMessage", "")
+
+ execution.setVariable("FH_notification-url-Ok", false)
+ execution.setVariable("FH_request_id-Ok", false)
+
+ //These variables are for Get Mso Aai Password Adapter
+ execution.setVariable("FH_deliveryStatus", true)
+
+ //update Response Status to pending ...Adapter variables
+ execution.setVariable("FH_updateResponseStatusPayload", null)
+ execution.setVariable("FH_updateResponseStatusResponse", null)
+
+ //update Request Gamma ...Adapter variables
+ execution.setVariable("FH_updateRequestGammaPayload", "")
+ execution.setVariable("FH_updateRequestGammaResponse", null)
+ execution.setVariable("FH_updateRequestGammaResponseCode", null)
+
+ //update Request Infra ...Adapter variables
+ execution.setVariable("FH_updateRequestInfraPayload", "")
+ execution.setVariable("FH_updateRequestInfraResponse", null)
+ execution.setVariable("FH_updateRequestInfraResponseCode", null)
+
+ //assign True to success variable
+ execution.setVariable("FH_success", true)
+
+ //Set notify status to Failed variable
+ execution.setVariable("FH_NOTIFY_STATUS", "SUCCESS")
+
+ //Set DB update variable
+ execution.setVariable("FH_updateRequestPayload", "")
+ execution.setVariable("FH_updateRequestResponse", null)
+ execution.setVariable("FH_updateRequestResponseCode", null)
+
+ //Auth variables
+ execution.setVariable("BasicAuthHeaderValue","")
+
+ //Parameter list
+ execution.setVariable("FH_parameterList", "")
+
+ //Response variables
+ execution.setVariable("FalloutHandlerResponse","")
+ execution.setVariable("FH_ErrorResponse", null)
+ execution.setVariable("FH_ResponseCode", "")
+
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+ }
+ }
+
+ public void preProcessRequest (Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ // Initialize flow variables
+ initializeProcessVariables(execution)
+ setSuccessIndicator(execution, false)
+
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
+ def xml = execution.getVariable("FalloutHandlerRequest")
+ utils.log("DEBUG", " XML --> " + xml, isDebugLogEnabled)
+ utils.logAudit("FalloutHandler request: " + xml)
+
+ //Check the incoming request type
+ //Incoming request can be ACTIVE_REQUESTS (request-information node) or INFRA_ACTIVE_REQUESTS (request-info node)
+ if (utils.nodeExists(xml, "request-information")) {
+ execution.setVariable("FH_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
+ }
+
+ //Check notification-url for the incoming request type
+ //ACTIVE_REQUESTS may have notificationurl node
+ //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
+ def notificationurl = ""
+ if (utils.nodeExists(xml, "notification-url")) {
+ notificationurl = utils.getNodeText(xml,"notification-url")
+ if(notificationurl != null && !notificationurl.isEmpty()) {
+ utils.log("DEBUG", "********** Incoming notification Url is: " + notificationurl,isDebugLogEnabled);
+ execution.setVariable("FH_notification-url-Ok", true)
+ execution.setVariable("FH_notification-url",notificationurl)
+ }
+ }
+
+ //Check request_id for the incoming request type
+ //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
+ //For ACTIVE_REQUESTS payload request-id is NOT optional
+ def request_id = ""
+ if (utils.nodeExists(xml, "request-id")) {
+ execution.setVariable("FH_request_id",utils.getNodeText(xml,"request-id"))
+ }
+ utils.logAudit("FH_request_id: " + execution.getVariable("FH_request_id"))
+
+ // INFRA_ACTIVE_REQUESTS have "action" element ... mandatory
+ // ACTIVE_REQUEST have "request-action" ... mandatory
+ if (utils.nodeExists(xml, "request-action")) {
+ execution.setVariable("FH_request_action",utils.getNodeText(xml,"request-action"))
+ } else if (utils.nodeExists(xml, "action")) {
+ execution.setVariable("FH_request_action",utils.getNodeText(xml,"action"))
+ }
+
+
+ //Check source for the incoming request type
+ //For INFRA_ACTIVE_REQUESTS payload source IS optional
+ //For ACTIVE_REQUESTS payload source is NOT optional
+ def source = ""
+ if (utils.nodeExists(xml, "source")) {
+ execution.setVariable("FH_source",utils.getNodeText(xml,"source"))
+ }
+
+ //Check if ErrorCode node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
+ def errorCode = ""
+ if (utils.nodeExists(xml, "ErrorCode")) {
+ errorCode = utils.getNodeText(xml,"ErrorCode")
+ if(errorCode != null && !errorCode.isEmpty()) {
+ execution.setVariable("FH_ErrorCode", errorCode)
+ }
+ }
+ utils.logAudit("FH_ErrorCode: " + errorCode)
+
+ //Check if ErrorMessage node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
+ def errorMessage = ""
+ if (utils.nodeExists(xml, "ErrorMessage")) {
+ errorCode = utils.getNodeText(xml,"ErrorMessage")
+ if(errorCode != null && !errorCode.isEmpty()) {
+ errorCode = errorCode.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ execution.setVariable("FH_ErrorMessage", errorCode)
+ }
+ }
+
+ //Check for Parameter List
+ if (utils.nodeExists(xml, "parameter-list")) {
+ def parameterList = utils.getNodeXml(xml, "parameter-list", false)
+ execution.setVariable("FH_parameterList", parameterList)
+ }
+
+ utils.log("DEBUG","FH_notification-url-Ok --> " + execution.getVariable("FH_notification-url-Ok"),isDebugLogEnabled)
+ utils.log("DEBUG","FH_request_id-OK --> " + execution.getVariable("FH_request_id-Ok"),isDebugLogEnabled)
+
+ // set the DHV/Service Instantiation values if specified in the request
+ execution.setVariable("FH_is_srv_inst_req", String.valueOf("true".equals(utils.getNodeText1(xml, "is-srv-inst-req"))))
+ utils.log("DEBUG", "FH_is_srv_inst_req --> " + execution.getVariable("FH_is_srv_inst_req"), isDebugLogEnabled)
+ execution.setVariable("FH_is_json_content", String.valueOf("JSON".equals(utils.getNodeText1(xml, "resp-content-type"))))
+ utils.log("DEBUG", "FH_is_json_content --> " + execution.getVariable("FH_is_json_content"), isDebugLogEnabled)
+ execution.setVariable("FH_service_inst_id", utils.getNodeText1(xml, "service-instance-id"))
+ utils.log("DEBUG", "FH_service_inst_id --> " + execution.getVariable("FH_service_inst_id"), isDebugLogEnabled)
+ execution.setVariable("FH_start_time", utils.getNodeText1(xml, "start-time"))
+ utils.log("DEBUG", "FH_start_time --> " + execution.getVariable("FH_start_time"), isDebugLogEnabled)
+ // this variable is used by the camunda flow to set the Content-Type for the async response
+ if (execution.getVariable("FH_is_srv_inst_req").equals("true") &&
+ execution.getVariable("FH_is_json_content").equals("true")) {
+ execution.setVariable("FH_content_type", "application/json")
+ } else {
+ execution.setVariable("FH_content_type", "text/xml")
+ }
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+
+ utils.log("DEBUG","OUTOF --> Initialize Variables Fallout Handler #########",isDebugLogEnabled);
+ }
+
+ public String updateRequestPayload (Execution execution){
+ def method = getClass().getSimpleName() + '.updateRequestPayload(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateRequest>
+ <requestId>${execution.getVariable("FH_request_id")}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <finalErrorMessage>${execution.getVariable("FH_ErrorMessage")}</finalErrorMessage>
+ <finalErrorCode>${execution.getVariable("FH_ErrorCode")}</finalErrorCode>
+ <status>FAILED</status>
+ <responseStatus>${execution.getVariable("FH_NOTIFY_STATUS")}</responseStatus>
+ </req:updateRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ utils.logAudit("updateRequestPayload: " + payload)
+ execution.setVariable("FH_updateRequestPayload", payload)
+ return execution.getVariable("FH_updateRequestPayload")
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+ }
+ }
+
+ public String updateRequestInfraPayload (Execution execution){
+ def method = getClass().getSimpleName() + '.updateRequestInfraPayload(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${execution.getVariable("FH_request_id")}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <statusMessage>${execution.getVariable("FH_ErrorMessage")}</statusMessage>
+ <requestStatus>FAILED</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ execution.setVariable("FH_updateRequestInfraPayload", payload)
+ utils.logAudit("updateRequestInfraPayload: " + payload)
+ return execution.getVariable("FH_updateRequestInfraPayload")
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+ }
+ }
+
+ public String updateRequestGammaPayload (Execution execution){
+ def method = getClass().getSimpleName() + '.updateRequestGammaPayload(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateRequest>
+ <requestId>${execution.getVariable("FH_request_id")}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <finalErrorMessage>${execution.getVariable("FH_ErrorMessage")}</finalErrorMessage>
+ <finalErrorCode>${execution.getVariable("FH_ErrorCode")}</finalErrorCode>
+ <status>FAILED</status>
+ </req:updateRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ execution.setVariable("FH_updateRequestGammaPayload", payload)
+ utils.logAudit("updateRequestGammaPayload: " + payload)
+ return execution.getVariable("FH_updateRequestGammaPayload")
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+ }
+ }
+
+ public String updateResponseStatusPayload (Execution execution){
+ def method = getClass().getSimpleName() + '.updateResponseStatusPayload(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateResponseStatus>
+ <requestId>${execution.getVariable("FH_request_id")}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
+ </req:updateResponseStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ execution.setVariable("FH_updateResponseStatusPayload", payload)
+ utils.logAudit("updateResponseStatusPayload: " + payload)
+ return execution.getVariable("FH_updateResponseStatusPayload")
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+ }
+ }
+
+ public void buildDBWorkflowException(Execution execution, String responseCodeVariable) {
+ def method = getClass().getSimpleName() + '.buildDBWorkflowException(' +
+ 'execution=' + execution.getId() +
+ ', responseCodeVariable=' + responseCodeVariable + ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def responseCode = execution.getVariable(responseCodeVariable)
+ // If the HTTP response code was null, it means a connection fault occurred (a java exception)
+ def errorMessage = responseCode == null ? "Could not connect to DB Adapter" : "DB Adapter returned ${responseCode} response"
+ def errorCode = responseCode == null ? 7000 : 7020
+ // exceptionUtil.buildWorkflowException(execution, errorCode, errorMessage)
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+ }
+ }
+
+ /**
+ * Used to create a workflow response in success and failure cases.
+ */
+ public void postProcessResponse (Execution execution) {
+ def method = getClass().getSimpleName() + '.postProcessResponse(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ Boolean success = (Boolean) execution.getVariable("FH_success")
+ String out = success ? "Fallout Handler Succeeded" : "Fallout Handler Failed";
+
+ def falloutHandlerResponse = """
+ <workflow:FalloutHandlerResponse xmlns:workflow="http://org.openecomp/mso/workflow/schema/v1">
+ <workflow:out>${out}</workflow:out>
+ </workflow:FalloutHandlerResponse>
+ """
+
+ falloutHandlerResponse = utils.formatXml(falloutHandlerResponse)
+ utils.logAudit("FalloutHandler Response: " + falloutHandlerResponse);
+
+ execution.setVariable("FalloutHandlerResponse", falloutHandlerResponse)
+ execution.setVariable("WorkflowResponse", falloutHandlerResponse)
+ execution.setVariable("FH_ResponseCode", success ? "200" : "500")
+ setSuccessIndicator(execution, success)
+
+ logDebug("FalloutHandlerResponse =\n" + falloutHandlerResponse, isDebugLogEnabled)
+ } catch (Exception e) {
+ // Do NOT throw WorkflowException!
+ logError('Caught exception in ' + method, e)
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenerateVfModuleName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenerateVfModuleName.groovy
new file mode 100644
index 0000000000..fba5cbe1b0
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenerateVfModuleName.groovy
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.common.scripts
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+public class GenerateVfModuleName extends AbstractServiceTaskProcessor{
+
+ def Prefix="GVFMN_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+
+
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ def vnfId = execution.getVariable("vnfId")
+ utils.log("DEBUG", "vnfId is " + vnfId, isDebugEnabled)
+ def vnfName = execution.getVariable("vnfName")
+ utils.log("DEBUG", "vnfName is " + vnfName, isDebugEnabled)
+ def vfModuleLabel = execution.getVariable("vfModuleLabel")
+ utils.log("DEBUG", "vfModuleLabel is " + vfModuleLabel, isDebugEnabled)
+ def personaModelId = execution.getVariable("personaModelId")
+ utils.log("DEBUG", "personaModelId is " + personaModelId, isDebugEnabled)
+ execution.setVariable("GVFMN_vfModuleXml", "")
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in initVariables method!")
+ }
+ }
+
+
+ public void queryAAI(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def method = getClass().getSimpleName() + '.queryAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('vnfId')
+ def personaModelId = execution.getVariable('personaModelId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ utils.logAudit("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');
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = client.httpGet()
+ utils.logAudit("GenerateVfModuleName - invoking httpGet() to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+ }
+
+ utils.logAudit("GenerateVfModuleName - queryAAIVfModule Response: " + responseData)
+ utils.logAudit("GenerateVfModuleName - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('GVFMN_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('GVFMN_queryAAIVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ if (response.getStatusCode() == 200) {
+ // Set the VfModuleXML
+ if (responseData != null) {
+ String vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ if (vfModulesText == null || vfModulesText.isEmpty()) {
+ logDebug("There are no VF modules in this VNF yet", isDebugLogEnabled)
+ execution.setVariable("GVFMN_vfModuleXml", null)
+ }
+ else {
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ int vfModulesSize = 0
+ if (vfModules != null) {
+ vfModulesSize = vfModules.size()
+ }
+ String matchingVfModules = "<vfModules>"
+ for (i in 0..vfModulesSize-1) {
+ def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+ def personaModelIdFromAAI = utils.getNodeText(vfModuleXml, "persona-model-id")
+ if (personaModelIdFromAAI != null && personaModelIdFromAAI.equals(personaModelId)) {
+ matchingVfModules = matchingVfModules + utils.removeXmlPreamble(vfModuleXml)
+ }
+ }
+ matchingVfModules = matchingVfModules + "</vfModules>"
+ logDebug("Matching VF Modules: " + matchingVfModules, isDebugLogEnabled)
+ execution.setVariable("GVFMN_vfModuleXml", matchingVfModules)
+ }
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAI(): ' + e.getMessage())
+ }
+
+ }
+
+ public void generateName (Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def method = getClass().getSimpleName() + '.generateName() ' +
+ 'execution=' + execution.getId() +
+ ')'
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String vfModuleXml = execution.getVariable("GVFMN_vfModuleXml")
+
+ String moduleIndex = utils.getLowestUnusedIndex(vfModuleXml)
+ logDebug("moduleIndex is: " + moduleIndex, isDebugLogEnabled)
+ def vnfName = execution.getVariable("vnfName")
+ def vfModuleLabel = execution.getVariable("vfModuleLabel")
+ def vfModuleName = vnfName + "_" + vfModuleLabel + "_" + moduleIndex
+ logDebug("vfModuleName is: " + vfModuleName, isDebugLogEnabled)
+ execution.setVariable("vfModuleName", vfModuleName)
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericDeleteService.groovy
index 53cd254b73..3784ae2249 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericDeleteService.groovy
@@ -1,303 +1,308 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import static org.apache.commons.lang3.StringUtils.*;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.codec.binary.Base64
-import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import org.springframework.web.util.UriUtils
-
-
-/**
- * This class supports the GenericDeleteService Sub Flow.
- * This Generic sub flow can be used by any flow for the
- * goal of deleting a Service-Instance or Service-Subscription.
- * The calling flow must set the GENDS_type variable as "service-instance"
- * or "service-subscription".
- *
- * If the resource-version is not provided by the calling flow
- * then this sub flow will query the service-instance or
- * service-subscription, prior to deleting it, in order to
- * obtain this resource version. Upon successful completion of
- * this sub flow the GENDS_SuccessIndicator will be true. A
- * MSOWorkflowException will be thrown if an error occurs within this flow.
- *
- * Please map variables to the corresponding variable names
- * below.
- *
- * Note - if this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * response.
- *
- * Incoming Variables (Service-Instance):
- * @param - GENDS_serviceInstanceId
- * @param - GENDS_serviceType
- * @param - GENDS_globalCustomerId
- * @param - GENDS_type
- * @param (Optional) - GENDS_resourceVersion
- *
- * Incoming Variables (Service-Subscription):
- * @param - GENDS_serviceType
- * @param - GENDS_globalCustomerId
- * @param - GENDS_type
- * @param (Optional) - GENDS_resourceVersion
- *
- *
- * Outgoing Variables:
- * @param - GENDS_SuccessIndicator
- * @param - GENDS_FoundIndicator
- * @param - WorkflowException
- */
-class GenericDeleteService extends AbstractServiceTaskProcessor{
-
- String Prefix = "GENDS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines if the resource version was provided
- *
- * @param - execution
- */
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericDeleteService PreProcessRequest Process*** ", isDebugEnabled)
-
- execution.setVariable("GENDS_resourceVersionProvidedFlag", true)
- execution.setVariable("GENDS_SuccessIndicator", false)
- execution.setVariable("GENDS_FoundIndicator", false)
-
- try{
- // Get Variables
- String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
- String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
- String serviceType = execution.getVariable("GENDS_serviceType")
- String type = execution.getVariable("GENDS_type")
-
- if(type != null){
- utils.log("DEBUG", "Incoming GENDS_type is: " + type, isDebugEnabled)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- utils.log("DEBUG", "Incoming Required Variable is null!", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
- }else{
- utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
- utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
- if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId)){
- utils.log("DEBUG", "Incoming Required Variable is null!", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
- }else{
- utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
- utils.log("DEBUG", "Preparing Delete Service-Instance Process", isDebugEnabled)
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- utils.log("DEBUG", "Preparing Delete Service-Subscription Process", isDebugEnabled)
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }
-
- String resourceVersion = execution.getVariable('GENDS_resourceVersion')
- if(isBlank(resourceVersion)){
- utils.log("DEBUG", "Service Instance Resource Version is NOT Provided", isDebugEnabled)
- execution.setVariable("GENDS_resourceVersionProvidedFlag", false)
- }else{
- utils.log("DEBUG", "Incoming SI Resource Version is: " + resourceVersion, isDebugEnabled)
- }
-
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENDS_type is null. Variable is Required.")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericDeleteService PreProcessRequest method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericDeleteService PreProcessRequest")
-
- }
- utils.log("DEBUG", "*** COMPLETED GenericDeleteService PreProcessRequest Process ***", isDebugEnabled)
- }
-
- /**
- * This method executes a GET call to AAI for the service instance
- * or service-subscription so that the objects's resource-version
- * can be obtained.
- *
- * @param - execution
- */
- public void getServiceResourceVersion(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericDeleteService GetServiceResourceVersion Process*** ", isDebugEnabled)
- try {
- String serviceType = execution.getVariable("GENDS_serviceType")
- utils.log("DEBUG", " Incoming GENDS_serviceType is: " + serviceType, isDebugEnabled)
- String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
- utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
- String type = execution.getVariable("GENDS_type")
- String serviceEndpoint = ""
-
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
- utils.log("DEBUG", " Incoming GENDS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
- serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
-
- }else if(type.equalsIgnoreCase("service-subscription")){
- serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
-
- String serviceAaiPath = "${aai_endpoint}${aai_uri}/" + serviceEndpoint
-
- execution.setVariable("GENDS_serviceAaiPath", serviceAaiPath)
- utils.log("DEBUG", "GET Service Instance AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceAaiPath)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENDS_getServiceResponseCode", responseCode)
- utils.log("DEBUG", " GET Service Instance response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENDS_getServiceResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- utils.log("DEBUG", "GET Service Received a Good Response: \n" + aaiResponse, isDebugEnabled)
- execution.setVariable("GENDS_SuccessIndicator", true)
- execution.setVariable("GENDS_FoundIndicator", true)
- String resourceVersion = utils.getNodeText1(aaiResponse, "resource-version")
- execution.setVariable("GENDS_resourceVersion", resourceVersion)
- utils.log("DEBUG", type + " Resource Version is: " + resourceVersion, isDebugEnabled)
-
- }else if(responseCode == 404){
- utils.log("DEBUG", "GET Service Received a Not Found (404) Response", isDebugEnabled)
- execution.setVariable("GENDS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") // for junits
- }
- else{
- utils.log("DEBUG", " GET Service Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", " Error encountered within GenericDeleteService GetServiceResourceVersion method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetServiceResourceVersion")
- }
- utils.log("DEBUG", " *** COMPLETED GenericDeleteService GetServiceResourceVersion Process*** ", isDebugEnabled)
- }
-
- /**
- * This method executes a DELETE call to AAI for the provided
- * service-instance or service-subscription.
- *
- * @param - execution
- */
- public void deleteServiceObject(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericDeleteService DeleteServiceObject Process*** ", isDebugEnabled)
- try {
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String type = execution.getVariable("GENDS_type")
- String serviceAaiPath = execution.getVariable("GENDS_serviceAaiPath")
- String serviceEndpoint = ""
-
- if(isEmpty(serviceAaiPath)){
- String serviceType = execution.getVariable("GENDS_serviceType")
- utils.log("DEBUG", " Incoming GENDS_serviceType is: " + serviceType, isDebugEnabled)
- String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
- utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
- utils.log("DEBUG", " Incoming GENDS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
- serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
-
- }else if(type.equalsIgnoreCase("service-subscription")){
- serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
-
- serviceAaiPath = "${aai_endpoint}${aai_uri}/" + serviceEndpoint
- }
-
- String resourceVersion = execution.getVariable("GENDS_resourceVersion")
- utils.log("DEBUG", "Incoming Resource Version is: " + resourceVersion, isDebugEnabled)
- if(resourceVersion !=null){
- serviceAaiPath = serviceAaiPath +'?resource-version=' + UriUtils.encode(resourceVersion,"UTF-8")
- }
-
- execution.setVariable("GENDS_deleteServiceAaiPath", serviceAaiPath)
- utils.log("DEBUG", "DELETE Service AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
-
- APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, serviceAaiPath)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENDS_deleteServiceResponseCode", responseCode)
- utils.log("DEBUG", " DELETE Service response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENDS_deleteServiceResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200 || responseCode == 204){
- utils.log("DEBUG", " DELETE Service Received a Good Response", isDebugEnabled)
- execution.setVariable("GENDS_FoundIndicator", true)
- }else if(responseCode == 404){
- utils.log("DEBUG", " DELETE Service Received a Not Found (404) Response", isDebugEnabled)
- execution.setVariable("GENDS_FoundIndicator", false)
- }else{
- utils.log("DEBUG", "DELETE Service Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", " Error encountered within GenericDeleteService DeleteServiceObject method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During Delete Service Object")
- }
- utils.log("DEBUG", " *** COMPLETED GenericDeleteService DeleteServiceObject Process*** ", isDebugEnabled)
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * This class supports the GenericDeleteService Sub Flow.
+ * This Generic sub flow can be used by any flow for the
+ * goal of deleting a Service-Instance or Service-Subscription.
+ * The calling flow must set the GENDS_type variable as "service-instance"
+ * or "service-subscription".
+ *
+ * If the resource-version is not provided by the calling flow
+ * then this sub flow will query the service-instance or
+ * service-subscription, prior to deleting it, in order to
+ * obtain this resource version. Upon successful completion of
+ * this sub flow the GENDS_SuccessIndicator will be true. A
+ * MSOWorkflowException will be thrown if an error occurs within this flow.
+ *
+ * Please map variables to the corresponding variable names
+ * below.
+ *
+ * Note - if this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * response.
+ *
+ *
+ * Variable Mapping Below
+ *
+ * In Mapping Variables:
+ * For Service-Instance:
+ * @param - GENDS_serviceInstanceId
+ * @param - GENDS_serviceType
+ * @param - GENDS_globalCustomerId
+ * @param - GENDS_type
+ * @param (Optional) - GENDS_resourceVersion
+ *
+ * For Service-Subscription:
+ * @param - GENDS_serviceType
+ * @param - GENDS_globalCustomerId
+ * @param - GENDS_type
+ * @param (Optional) - GENDS_resourceVersion
+ *
+ *
+ * Out Mapping Variables:
+ * @param - GENDS_FoundIndicator
+ * @param - WorkflowException
+ *
+ *
+ */
+class GenericDeleteService extends AbstractServiceTaskProcessor{
+
+ String Prefix = "GENDS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * This method validates the incoming variables and
+ * determines if the resource version was provided
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericDeleteService PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("GENDS_resourceVersionProvidedFlag", true)
+ execution.setVariable("GENDS_SuccessIndicator", false)
+ execution.setVariable("GENDS_FoundIndicator", false)
+
+ try{
+ // Get Variables
+ String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
+ String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
+ String serviceType = execution.getVariable("GENDS_serviceType")
+ String type = execution.getVariable("GENDS_type")
+
+ if(type != null){
+ utils.log("DEBUG", "Incoming GENDS_type is: " + type, isDebugEnabled)
+ if(isBlank(globalCustomerId) || isBlank(serviceType)){
+ utils.log("DEBUG", "Incoming Required Variable is null!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+ }else{
+ utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ if(type.equalsIgnoreCase("service-instance")){
+ if(isBlank(serviceInstanceId)){
+ utils.log("DEBUG", "Incoming Required Variable is null!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+ }else{
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+ utils.log("DEBUG", "Preparing Delete Service-Instance Process", isDebugEnabled)
+ }
+ }else if(type.equalsIgnoreCase("service-subscription")){
+ utils.log("DEBUG", "Preparing Delete Service-Subscription Process", isDebugEnabled)
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
+ }
+ }
+
+ String resourceVersion = execution.getVariable('GENDS_resourceVersion')
+ if(isBlank(resourceVersion)){
+ utils.log("DEBUG", "Service Instance Resource Version is NOT Provided", isDebugEnabled)
+ execution.setVariable("GENDS_resourceVersionProvidedFlag", false)
+ }else{
+ utils.log("DEBUG", "Incoming SI Resource Version is: " + resourceVersion, isDebugEnabled)
+ }
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENDS_type is null. Variable is Required.")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericDeleteService PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericDeleteService PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED GenericDeleteService PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+ /**
+ * This method executes a GET call to AAI for the service instance
+ * or service-subscription so that the objects's resource-version
+ * can be obtained.
+ *
+ * @param - execution
+ */
+ public void getServiceResourceVersion(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericDeleteService GetServiceResourceVersion Process*** ", isDebugEnabled)
+ try {
+ String serviceType = execution.getVariable("GENDS_serviceType")
+ utils.log("DEBUG", " Incoming GENDS_serviceType is: " + serviceType, isDebugEnabled)
+ String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
+ utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+ String type = execution.getVariable("GENDS_type")
+ String serviceEndpoint = ""
+
+ if(type.equalsIgnoreCase("service-instance")){
+ String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
+ utils.log("DEBUG", " Incoming GENDS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+ serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
+
+ }else if(type.equalsIgnoreCase("service-subscription")){
+ serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
+ }
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+
+ String serviceAaiPath = "${aai_endpoint}${aai_uri}/" + serviceEndpoint
+
+ execution.setVariable("GENDS_serviceAaiPath", serviceAaiPath)
+ utils.log("DEBUG", "GET Service Instance AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
+ utils.logAudit("GenericDeleteService GET AAI Path: " + serviceAaiPath)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceAaiPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENDS_getServiceResponseCode", responseCode)
+ utils.log("DEBUG", " GET Service Instance response code is: " + responseCode, isDebugEnabled)
+ utils.logAudit("GET Service Instance response code: " + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENDS_getServiceResponse", aaiResponse)
+
+ utils.logAudit("GET Service Instance response : " + aaiResponse)
+ //Process Response
+ if(responseCode == 200 || responseCode == 202){
+ utils.log("DEBUG", "GET Service Received a Good Response: \n" + aaiResponse, isDebugEnabled)
+ execution.setVariable("GENDS_SuccessIndicator", true)
+ execution.setVariable("GENDS_FoundIndicator", true)
+ String resourceVersion = utils.getNodeText1(aaiResponse, "resource-version")
+ execution.setVariable("GENDS_resourceVersion", resourceVersion)
+ utils.log("DEBUG", type + " Resource Version is: " + resourceVersion, isDebugEnabled)
+
+ }else if(responseCode == 404){
+ utils.log("DEBUG", "GET Service Received a Not Found (404) Response", isDebugEnabled)
+ execution.setVariable("GENDS_SuccessIndicator", true)
+ execution.setVariable("WorkflowResponse", " ") // for junits
+ }
+ else{
+ utils.log("DEBUG", " GET Service Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error encountered within GenericDeleteService GetServiceResourceVersion method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetServiceResourceVersion")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericDeleteService GetServiceResourceVersion Process*** ", isDebugEnabled)
+ }
+
+ /**
+ * This method executes a DELETE call to AAI for the provided
+ * service-instance or service-subscription.
+ *
+ * @param - execution
+ */
+ public void deleteServiceObject(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericDeleteService DeleteServiceObject Process*** ", isDebugEnabled)
+ try {
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String type = execution.getVariable("GENDS_type")
+ String serviceAaiPath = execution.getVariable("GENDS_serviceAaiPath")
+ String serviceEndpoint = ""
+
+ if(isEmpty(serviceAaiPath)){
+ String serviceType = execution.getVariable("GENDS_serviceType")
+ utils.log("DEBUG", " Incoming GENDS_serviceType is: " + serviceType, isDebugEnabled)
+ String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
+ utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+ if(type.equalsIgnoreCase("service-instance")){
+ String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
+ utils.log("DEBUG", " Incoming GENDS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+ serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
+
+ }else if(type.equalsIgnoreCase("service-subscription")){
+ serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
+ }
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+
+ serviceAaiPath = "${aai_endpoint}${aai_uri}/" + serviceEndpoint
+ }
+
+ String resourceVersion = execution.getVariable("GENDS_resourceVersion")
+ utils.log("DEBUG", "Incoming Resource Version is: " + resourceVersion, isDebugEnabled)
+ if(resourceVersion !=null){
+ serviceAaiPath = serviceAaiPath +'?resource-version=' + UriUtils.encode(resourceVersion,"UTF-8")
+ }
+
+ execution.setVariable("GENDS_deleteServiceAaiPath", serviceAaiPath)
+ utils.log("DEBUG", "DELETE Service AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
+ utils.logAudit("DELETE Service AAI Path: " + serviceAaiPath)
+
+ APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, serviceAaiPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENDS_deleteServiceResponseCode", responseCode)
+ utils.log("DEBUG", " DELETE Service response code is: " + responseCode, isDebugEnabled)
+ utils.logAudit("DELETE Service Response Code: " + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENDS_deleteServiceResponse", aaiResponse)
+ utils.logAudit("DELETE Service Response: " + aaiResponse)
+
+ //Process Response
+ if(responseCode == 200 || responseCode == 204){
+ utils.log("DEBUG", " DELETE Service Received a Good Response", isDebugEnabled)
+ execution.setVariable("GENDS_FoundIndicator", true)
+ }else if(responseCode == 404){
+ utils.log("DEBUG", " DELETE Service Received a Not Found (404) Response", isDebugEnabled)
+ execution.setVariable("GENDS_FoundIndicator", false)
+ }else{
+ utils.log("DEBUG", "DELETE Service Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error encountered within GenericDeleteService DeleteServiceObject method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During Delete Service Object")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericDeleteService DeleteServiceObject Process*** ", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericDeleteVnf.groovy
index c68ea47505..1bd4383b74 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericDeleteVnf.groovy
@@ -1,276 +1,278 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import static org.apache.commons.lang3.StringUtils.*;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.codec.binary.Base64
-import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import org.springframework.web.util.UriUtils
-
-
-/**
- * TODO: Support getting vnf type = vpe
- *
- * This class supports the GenericGetVnf Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Vnf Object (from AAI). The flow currently
- * supports the querying of 2 types of Vnfs, generic-vnf and vce. The
- * type must be provided by the calling flow and the type should
- * be mapped to the variable GENDV_type. The type should either be
- * "generic-vnf" or "vce". If the Vnf Id is not provided by the calling
- * flow then this sub flow will execute the query to get the
- * Vnf using the Vnf Name. Therefore, the calling flow must provide
- * either the Vnf Id or Vnf Name.
- *
- * Upon successful completion of this sub flow the
- * GENDV_SuccessIndicator will be true and the query response payload
- * will be set to GENDV_vnf. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - if this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENDV_FoundIndicator
- * set to false. This will allow the calling flow to distinguish
- * between the two success scenarios, "Success where Vnf is found"
- * and "Success where Vnf is NOT found".
- *
- *
- * Incoming Variables:
- * @param - GENDV_vnfId
- * @param - GENDV_type
- * @param (Optional) - GENDV_resourceVersion
- *
- *
- * Outgoing Variables:
- * @param - GENDV_vnf
- * @param - GENDV_SuccessIndicator
- * @param - GENDV_FoundIndicator
- * @param - WorkflowException
- */
-class GenericDeleteVnf extends AbstractServiceTaskProcessor{
-
- String Prefix = "GENDV_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines if the resource version was provided
- *
- * @param - execution
- */
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericDeleteVnf PreProcessRequest Process*** ", isDebugEnabled)
-
- execution.setVariable("GENDV_resourceVersionProvided", true)
- execution.setVariable("GENDV_SuccessIndicator", false)
- execution.setVariable("GENDV_FoundIndicator", false)
-
- try{
- // Get Variables
- String vnfId = execution.getVariable("GENDV_vnfId")
- String type = execution.getVariable("GENDV_type")
-
- if(isBlank(type) || isBlank(vnfId)){
- utils.log("ERROR", "Incoming Required Variable is null!", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
- }else{
- utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
-
- String resourceVersion = execution.getVariable("GENDV_resourceVersion")
- if(isBlank(resourceVersion)){
- utils.log("DEBUG", "Vnf Resource Version is NOT Provided", isDebugEnabled)
- execution.setVariable("GENDV_resourceVersionProvided", false)
- }else{
- utils.log("DEBUG", "Incoming Vnf Resource Version is: " + resourceVersion, isDebugEnabled)
- }
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericDeleteVnf PreProcessRequest method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericDeleteVnf PreProcessRequest")
-
- }
- utils.log("DEBUG", "*** COMPLETED GenericDeleteVnf PreProcessRequest Process ***", isDebugEnabled)
- }
-
- /**
- * This method executes a GET call to AAI for the Vnf
- * so that the Vnf's resource-version can be
- * obtained.
- *
- * @param - execution
- */
- public void getVnfResourceVersion(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericDeleteVnf GetVnfResourceVersion Process*** ", isDebugEnabled)
- try {
- String vnfId = execution.getVariable("GENDV_vnfId")
- String type = execution.getVariable("GENDV_type")
- utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
-
- //Determine Type of Vnf Querying For
- def aai_uri = ""
- if(type.equals("generic-vnf")){
- aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- }else if(type.equals("vce")){
- aai_uri = aaiUriUtil.getNetworkVceUri(execution)
- }else{
- utils.log("DEBUG", "Invalid Incoming GENDV_type", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENDV_type")
- }
-
- String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
-
- execution.setVariable("GENDV_getVnfPath", getVnfPath)
- utils.logAudit("Get Vnf Resource Version Url is: " + getVnfPath)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENDV_getVnfResponseCode", responseCode)
- utils.log("DEBUG", " GET Vnf response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENDV_getVnfResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- utils.log("DEBUG", "GET Vnf Received a Good Response: \n" + aaiResponse, isDebugEnabled)
- execution.setVariable("GENDV_FoundIndicator", true)
- if(utils.nodeExists(aaiResponse, "resource-version")){
- String resourceVersion = utils.getNodeText1(aaiResponse, "resource-version")
- execution.setVariable("GENDV_resourceVersion", resourceVersion)
- utils.log("DEBUG", "SI Resource Version is: " + resourceVersion, isDebugEnabled)
- }else{
- utils.log("DEBUG", "GET Vnf for Resource Version Response Does NOT Contain a resource-version", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Unable to obtain Vnf resource-version. GET Vnf Response Does NOT Contain a resource-version")
- }
-
- }else if(responseCode == 404){
- utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
- execution.setVariable("GENDV_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") // for junits
- }
- else{
- utils.log("DEBUG", " GET Vnf Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", " Error encountered within GenericDeleteVnf GetVnfResourceVersion method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfResourceVersion")
- }
- utils.log("DEBUG", " *** COMPLETED GenericDeleteVnf GetVnfResourceVersion Process*** ", isDebugEnabled)
- }
-
- /**
- * This method executes a DELETE call to AAI for the provided
- * Vnf.
- *
- * @param - execution
- */
- public void deleteVnf(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericDeleteVnf DeleteVnf Process*** ", isDebugEnabled)
- try {
- String vnfId = execution.getVariable("GENDV_vnfId")
- String type = execution.getVariable("GENDV_type")
- utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
- String resourceVersion = execution.getVariable("GENDV_resourceVersion")
- utils.log("DEBUG", "Incoming Vnf Resource Version is: " + resourceVersion, isDebugEnabled)
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
-
- //Determine Type of Vnf Querying For
- def aai_uri = ""
- if(type.equals("generic-vnf")){
- aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- }else if(type.equals("vce")){
- aai_uri = aaiUriUtil.getNetworkVceUri(execution)
- }else{
- utils.log("DEBUG", "Invalid Incoming GENDV_type", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENDV_type")
- }
-
- String deleteVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") +'?resource-version=' + UriUtils.encode(resourceVersion,"UTF-8")
-
- execution.setVariable("GENDV_deleteVnfPath", deleteVnfPath)
- utils.logAudit("Delete Vnf Url is: " + deleteVnfPath)
-
- APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, deleteVnfPath)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENDV_deleteVnfResponseCode", responseCode)
- utils.log("DEBUG", " DELETE Vnf response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENDV_deleteVnfResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 204){
- utils.log("DEBUG", " DELETE Vnf Received a Good Response", isDebugEnabled)
- execution.setVariable("GENDV_FoundIndicator", true)
- }else if(responseCode == 404){
- utils.log("DEBUG", " DELETE Vnf Received a Not Found (404) Response", isDebugEnabled)
- }else if(responseCode == 412){
- utils.log("DEBUG", "DELETE Vnf Received a Resource Version Mismatch Error: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 412, "Delete Vnf Received a resource-version Mismatch Error Response from AAI")
- }else{
- utils.log("DEBUG", "DELETE Vnf Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", " Error encountered within GenericDeleteVnf DeleteVnf method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During Delete Vnf")
- }
- utils.log("DEBUG", " *** COMPLETED GenericDeleteVnf DeleteVnf Process*** ", isDebugEnabled)
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * TODO: Support getting vnf type = vpe
+ *
+ * This class supports the GenericGetVnf Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of getting a Vnf Object (from AAI). The flow currently
+ * supports the querying of 2 types of Vnfs, generic-vnf and vce. The
+ * type must be provided by the calling flow and the type should
+ * be mapped to the variable GENDV_type. The type should either be
+ * "generic-vnf" or "vce". If the Vnf Id is not provided by the calling
+ * flow then this sub flow will execute the query to get the
+ * Vnf using the Vnf Name. Therefore, the calling flow must provide
+ * either the Vnf Id or Vnf Name.
+ *
+ * Upon successful completion of this sub flow the
+ * GENDV_SuccessIndicator will be true and the query response payload
+ * will be set to GENDV_vnf. An MSOWorkflowException will
+ * be thrown upon unsuccessful completion or if an error occurs
+ * at any time during this sub flow. Please map variables
+ * to the corresponding variable names below.
+ *
+ * Note - if this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * successful response however the GENDV_FoundIndicator
+ * set to false. This will allow the calling flow to distinguish
+ * between the two success scenarios, "Success where Vnf is found"
+ * and "Success where Vnf is NOT found".
+ *
+ *
+ * Variable Mapping Below
+ *
+ * In Mapping Variables:
+ * @param - GENDV_vnfId
+ * @param - GENDV_type
+ * @param (Optional) - GENDV_resourceVersion
+ *
+ *
+ * Out Mapping Variables:
+ * @param - GENDV_vnf
+ * @param - GENDV_SuccessIndicator
+ * @param - GENDV_FoundIndicator
+ * @param - WorkflowException
+ *
+ *
+ */
+class GenericDeleteVnf extends AbstractServiceTaskProcessor{
+
+ String Prefix = "GENDV_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * This method validates the incoming variables and
+ * determines if the resource version was provided
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericDeleteVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("GENDV_resourceVersionProvided", true)
+ execution.setVariable("GENDV_SuccessIndicator", false)
+ execution.setVariable("GENDV_FoundIndicator", false)
+
+ try{
+ // Get Variables
+ String vnfId = execution.getVariable("GENDV_vnfId")
+ String type = execution.getVariable("GENDV_type")
+
+ if(isBlank(type) || isBlank(vnfId)){
+ utils.log("ERROR", "Incoming Required Variable is null!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+ }else{
+ utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+
+ String resourceVersion = execution.getVariable("GENDV_resourceVersion")
+ if(isBlank(resourceVersion)){
+ utils.log("DEBUG", "Vnf Resource Version is NOT Provided", isDebugEnabled)
+ execution.setVariable("GENDV_resourceVersionProvided", false)
+ }else{
+ utils.log("DEBUG", "Incoming Vnf Resource Version is: " + resourceVersion, isDebugEnabled)
+ }
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericDeleteVnf PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericDeleteVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED GenericDeleteVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+ /**
+ * This method executes a GET call to AAI for the Vnf
+ * so that the Vnf's resource-version can be
+ * obtained.
+ *
+ * @param - execution
+ */
+ public void getVnfResourceVersion(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericDeleteVnf GetVnfResourceVersion Process*** ", isDebugEnabled)
+ try {
+ String vnfId = execution.getVariable("GENDV_vnfId")
+ String type = execution.getVariable("GENDV_type")
+ utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ //Determine Type of Vnf Querying For
+ def aai_uri = ""
+ if(type.equals("generic-vnf")){
+ aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ }else if(type.equals("vce")){
+ aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+ }else{
+ utils.log("DEBUG", "Invalid Incoming GENDV_type", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENDV_type")
+ }
+
+ String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+
+ execution.setVariable("GENDV_getVnfPath", getVnfPath)
+ utils.logAudit("Get Vnf Resource Version Url is: " + getVnfPath)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENDV_getVnfResponseCode", responseCode)
+ utils.log("DEBUG", " GET Vnf response code is: " + responseCode, isDebugEnabled)
+
+ utils.logAudit("GenericDeleteVnf Get VNF Response Code: " + responseCode)
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENDV_getVnfResponse", aaiResponse)
+
+ utils.logAudit("GenericDeleteVnf Get VNF Response: " + aaiResponse)
+ //Process Response
+ if(responseCode == 200 || responseCode == 202){
+ utils.log("DEBUG", "GET Vnf Received a Good Response: \n" + aaiResponse, isDebugEnabled)
+ execution.setVariable("GENDV_FoundIndicator", true)
+ if(utils.nodeExists(aaiResponse, "resource-version")){
+ String resourceVersion = utils.getNodeText1(aaiResponse, "resource-version")
+ execution.setVariable("GENDV_resourceVersion", resourceVersion)
+ utils.log("DEBUG", "SI Resource Version is: " + resourceVersion, isDebugEnabled)
+ }else{
+ utils.log("DEBUG", "GET Vnf for Resource Version Response Does NOT Contain a resource-version", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Unable to obtain Vnf resource-version. GET Vnf Response Does NOT Contain a resource-version")
+ }
+
+ }else if(responseCode == 404){
+ utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
+ execution.setVariable("GENDV_SuccessIndicator", true)
+ execution.setVariable("WorkflowResponse", " ") // for junits
+ }
+ else{
+ utils.log("DEBUG", " GET Vnf Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error encountered within GenericDeleteVnf GetVnfResourceVersion method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfResourceVersion")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericDeleteVnf GetVnfResourceVersion Process*** ", isDebugEnabled)
+ }
+
+ /**
+ * This method executes a DELETE call to AAI for the provided
+ * Vnf.
+ *
+ * @param - execution
+ */
+ public void deleteVnf(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericDeleteVnf DeleteVnf Process*** ", isDebugEnabled)
+ try {
+ String vnfId = execution.getVariable("GENDV_vnfId")
+ String type = execution.getVariable("GENDV_type")
+ utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+ String resourceVersion = execution.getVariable("GENDV_resourceVersion")
+ utils.log("DEBUG", "Incoming Vnf Resource Version is: " + resourceVersion, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ //Determine Type of Vnf Querying For
+ def aai_uri = ""
+ if(type.equals("generic-vnf")){
+ aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ }else if(type.equals("vce")){
+ aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+ }else{
+ utils.log("DEBUG", "Invalid Incoming GENDV_type", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENDV_type")
+ }
+
+ String deleteVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") +'?resource-version=' + UriUtils.encode(resourceVersion,"UTF-8")
+
+ execution.setVariable("GENDV_deleteVnfPath", deleteVnfPath)
+ utils.logAudit("Delete Vnf Url is: " + deleteVnfPath)
+
+ APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, deleteVnfPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENDV_deleteVnfResponseCode", responseCode)
+ utils.log("DEBUG", " DELETE Vnf response code is: " + responseCode, isDebugEnabled)
+
+ utils.logAudit("GenericDeleteVnf Delete VNF Response Code: " + responseCode)
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENDV_deleteVnfResponse", aaiResponse)
+
+ utils.logAudit("GenericDeleteVnf Delete VNF Response: " + aaiResponse)
+ //Process Response
+ if(responseCode == 204){
+ utils.log("DEBUG", " DELETE Vnf Received a Good Response", isDebugEnabled)
+ execution.setVariable("GENDV_FoundIndicator", true)
+ }else if(responseCode == 404){
+ utils.log("DEBUG", " DELETE Vnf Received a Not Found (404) Response", isDebugEnabled)
+ }else if(responseCode == 412){
+ utils.log("DEBUG", "DELETE Vnf Received a Resource Version Mismatch Error: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 412, "Delete Vnf Received a resource-version Mismatch Error Response from AAI")
+ }else{
+ utils.log("DEBUG", "DELETE Vnf Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error encountered within GenericDeleteVnf DeleteVnf method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During Delete Vnf")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericDeleteVnf DeleteVnf Process*** ", isDebugEnabled)
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericGetService.groovy
index 89728bf7b8..70ce1ba5cf 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericGetService.groovy
@@ -1,379 +1,385 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import static org.apache.commons.lang3.StringUtils.*;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.codec.binary.Base64
-import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import org.springframework.web.util.UriUtils
-
-
-/**
- * This class supports the GenericGetService Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Service-Instance or Service-Subscription (from AAI).
- * The calling flow must set the GENGS_type variable as "service-instance"
- * or "service-subscription".
- *
- * When using to Get a Service-Instance:
- * If the global-customer-id and service-type are not provided
- * this flow executes a query to get the service- Url using the
- * Service Id or Name (whichever is provided).
- *
- * When using to Get a Service-Subscription:
- * The global-customer-id and service-type must be
- * provided.
- *
- * Upon successful completion of this sub flow the
- * GENGS_SuccessIndicator will be true and the query response payload
- * will be set to GENGS_service. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - If this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGS_FoundIndicator
- * will be set to false. This variable will allow the calling flow
- * to distinguish between the two Success scenarios,
- * "Success where service- is found" and
- * "Success where service- is NOT found".
- *
- *
- * Incoming Variables (Service-Instance):
- * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * Incoming Variables (Service-Subscription):
- * @param - GENGS_type
- * @param - GENGS_serviceType
- * @param - GENGS_globalCustomerId
- *
- *
- * Outgoing Variables:
- * @param - GENGS_service
- * @param - GENGS_SuccessIndicator
- * @param - GENGS_FoundIndicator
- * @param - WorkflowException
- */
-class GenericGetService extends AbstractServiceTaskProcessor{
-
- String Prefix = "GENGS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- */
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericGetService PreProcessRequest Process*** ", isDebugEnabled)
-
- execution.setVariable("GENGS_obtainServiceInstanceUrl", false)
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
- execution.setVariable("GENGS_SuccessIndicator", false)
- execution.setVariable("GENGS_FoundIndicator", false)
- execution.setVariable("GENGS_siResourceLink", null)
-
- try{
- // Get Variables
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- String serviceType = execution.getVariable("GENGS_serviceType")
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String type = execution.getVariable("GENGS_type")
-
- if(type != null){
- utils.log("DEBUG", "Incoming GENGS_type is: " + type, isDebugEnabled)
- if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
- utils.log("DEBUG", "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- }else{
- utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
- utils.log("DEBUG", "Incoming Service Instance Name is: " + serviceInstanceName, isDebugEnabled)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- execution.setVariable("GENGS_obtainServiceInstanceUrl", true)
- if(isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
- }
- }else{
- utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
- utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
- }
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- if(isBlank(serviceType) || isBlank(globalCustomerId)){
- utils.log("DEBUG", "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- }else{
- utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
- utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
- }
-
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Internal Error encountered within GenericGetService PreProcessRequest method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
-
- }
- utils.log("DEBUG", "*** COMPLETED GenericGetService PreProcessRequest Process ***", isDebugEnabled)
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Id.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlById(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericGetService ObtainServiceInstanceUrlById Process*** ", isDebugEnabled)
- try {
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- utils.log("DEBUG", " Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId, isDebugEnabled)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- utils.log("DEBUG", " DELETE Service Instance response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- utils.log("DEBUG", " Query for Service Instance Url Received a Good Response Code", isDebugEnabled)
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- utils.log("DEBUG", "Query for Service Instance Url Response Does Contain Data" , isDebugEnabled)
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText1(aaiResponse, "resource-link")
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- utils.log("DEBUG", "Query for Service Instance Url Response Does NOT Contains Data" , isDebugEnabled)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- utils.log("DEBUG", " Query for Service Instance Received a Not Found (404) Response", isDebugEnabled)
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- utils.log("DEBUG", "Query for Service Instance Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
- }
- utils.log("DEBUG", " *** COMPLETED GenericGetService ObtainServiceInstanceUrlById Process*** ", isDebugEnabled)
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Name.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlByName(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericGetService ObtainServiceInstanceUrlByName Process*** ", isDebugEnabled)
- try {
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- utils.log("DEBUG", " Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName, isDebugEnabled)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- utils.log("DEBUG", " DELETE Service Instance response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- utils.log("DEBUG", " Query for Service Instance Url Received a Good Response Code", isDebugEnabled)
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- utils.log("DEBUG", "Query for Service Instance Url Response Does Contain Data" , isDebugEnabled)
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText1(aaiResponse, "resource-link")
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- utils.log("DEBUG", "Query for Service Instance Url Response Does NOT Contains Data" , isDebugEnabled)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- utils.log("DEBUG", " Query for Service Instance Received a Not Found (404) Response", isDebugEnabled)
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- utils.log("DEBUG", "Query for Service Instance Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
- }
- utils.log("DEBUG", " *** COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process*** ", isDebugEnabled)
- }
-
-
- /**
- * This method executes a GET call to AAI to obtain the
- * service-instance or service-subscription
- *
- * @param - execution
- */
- public void getServiceObject(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericGetService GetServiceObject Process*** ", isDebugEnabled)
- try {
- String type = execution.getVariable("GENGS_type")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- String serviceEndpoint = ""
-
- if(type.equalsIgnoreCase("service-instance")){
- String siResourceLink = execution.getVariable("GENGS_siResourceLink")
- if(isBlank(siResourceLink)){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- utils.log("DEBUG", " Incoming GENGS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
- String serviceType = execution.getVariable("GENGS_serviceType")
- utils.log("DEBUG", " Incoming GENGS_serviceType is: " + serviceType, isDebugEnabled)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
- }else{
- utils.log("DEBUG", "Incoming Service Instance Resource Link is: " + siResourceLink, isDebugEnabled)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String serviceType = execution.getVariable("GENGS_serviceType")
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String serviceUrl = "${aai_endpoint}" + serviceEndpoint
-
- execution.setVariable("GENGS_getServiceUrl", serviceUrl)
- utils.log("DEBUG", "GET Service AAI Path is: \n" + serviceUrl, isDebugEnabled)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_getServiceResponseCode", responseCode)
- utils.log("DEBUG", " GET Service response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENGS_getServiceResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- utils.log("DEBUG", "GET Service Received a Good Response Code", isDebugEnabled)
- if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
- utils.log("DEBUG", "GET Service Response Contains a service-instance" , isDebugEnabled)
- execution.setVariable("GENGS_FoundIndicator", true)
- execution.setVariable("GENGS_service", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
-
- }else{
- utils.log("DEBUG", "GET Service Response Does NOT Contain Data" , isDebugEnabled)
- }
- }else if(responseCode == 404){
- utils.log("DEBUG", "GET Service Received a Not Found (404) Response", isDebugEnabled)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- else{
- utils.log("DEBUG", " GET Service Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", " Error encountered within GenericGetService GetServiceObject method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
- }
- utils.log("DEBUG", " *** COMPLETED GenericGetService GetServiceObject Process*** ", isDebugEnabled)
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * This class supports the GenericGetService Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of getting a Service-Instance or Service-Subscription (from AAI).
+ * The calling flow must set the GENGS_type variable as "service-instance"
+ * or "service-subscription".
+ *
+ * When using to Get a Service-Instance:
+ * If the global-customer-id and service-type are not provided
+ * this flow executes a query to get the service- Url using the
+ * Service Id or Name (whichever is provided).
+ *
+ * When using to Get a Service-Subscription:
+ * The global-customer-id and service-type must be
+ * provided.
+ *
+ * Upon successful completion of this sub flow the
+ * GENGS_SuccessIndicator will be true and the query response payload
+ * will be set to GENGS_service. An MSOWorkflowException will
+ * be thrown upon unsuccessful completion or if an error occurs
+ * at any time during this sub flow. Please map variables
+ * to the corresponding variable names below.
+ *
+ * Note - If this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * successful response however the GENGS_FoundIndicator
+ * will be set to false. This variable will allow the calling flow
+ * to distinguish between the two Success scenarios,
+ * "Success where service- is found" and
+ * "Success where service- is NOT found".
+ *
+ *
+ * Variable Mapping Below:
+ *
+ * In Mapping Variables:
+ * For Service-Instance:
+ * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
+ * @param - GENGS_type
+ * @param (Optional) - GENGS_serviceType
+ * @param (Optional) - GENGS_globalCustomerId
+ *
+ * For Service-Subscription:
+ * @param - GENGS_type
+ * @param - GENGS_serviceType
+ * @param - GENGS_globalCustomerId
+ *
+ *
+ * Out Mapping Variables:
+ * @param - GENGS_service
+ * @param - GENGS_FoundIndicator
+ * @param - WorkflowException
+ *
+ *
+ */
+class GenericGetService extends AbstractServiceTaskProcessor{
+
+ String Prefix = "GENGS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * This method validates the incoming variables and
+ * determines the subsequent event based on which
+ * variables the calling flow provided.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericGetService PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("GENGS_obtainServiceInstanceUrl", false)
+ execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
+ execution.setVariable("GENGS_SuccessIndicator", false)
+ execution.setVariable("GENGS_FoundIndicator", false)
+ execution.setVariable("GENGS_siResourceLink", null)
+
+ try{
+ // Get Variables
+ String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
+ String serviceType = execution.getVariable("GENGS_serviceType")
+ String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
+ String type = execution.getVariable("GENGS_type")
+
+ if(type != null){
+ utils.log("DEBUG", "Incoming GENGS_type is: " + type, isDebugEnabled)
+ if(type.equalsIgnoreCase("service-instance")){
+ if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
+ utils.log("DEBUG", "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
+ }else{
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Instance Name is: " + serviceInstanceName, isDebugEnabled)
+ if(isBlank(globalCustomerId) || isBlank(serviceType)){
+ execution.setVariable("GENGS_obtainServiceInstanceUrl", true)
+ if(isBlank(serviceInstanceId)){
+ execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
+ }
+ }else{
+ utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ }
+ }
+ }else if(type.equalsIgnoreCase("service-subscription")){
+ if(isBlank(serviceType) || isBlank(globalCustomerId)){
+ utils.log("DEBUG", "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
+ }else{
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+ }
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
+ }
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
+ }
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Internal Error encountered within GenericGetService PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED GenericGetService PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+ /**
+ * This method obtains the Url to the provided service instance
+ * using the Service Instance Id.
+ *
+ * @param - execution
+ */
+ public void obtainServiceInstanceUrlById(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericGetService ObtainServiceInstanceUrlById Process*** ", isDebugEnabled)
+ try {
+ String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
+ utils.log("DEBUG", " Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId, isDebugEnabled)
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+
+ utils.logAudit("GenericGetService AAI Endpoint: " + aai_endpoint)
+ String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
+
+ //String url = "${aai_endpoint}${path}" host name needs to be removed from property
+ String url = "${path}"
+ execution.setVariable("GENGS_obtainSIUrlPath", url)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
+ utils.log("DEBUG", " GET Service Instance response code is: " + responseCode, isDebugEnabled)
+ utils.logAudit("GenericGetService AAI GET Response Code: " + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
+ utils.logAudit("GenericGetService AAI Response: " + aaiResponse)
+ //Process Response
+ if(responseCode == 200){
+ utils.log("DEBUG", " Query for Service Instance Url Received a Good Response Code", isDebugEnabled)
+ execution.setVariable("GENGS_SuccessIndicator", true)
+ if(utils.nodeExists(aaiResponse, "result-data")){
+ utils.log("DEBUG", "Query for Service Instance Url Response Does Contain Data" , isDebugEnabled)
+ execution.setVariable("GENGS_FoundIndicator", true)
+ String resourceLink = utils.getNodeText1(aaiResponse, "resource-link")
+ execution.setVariable("GENGS_siResourceLink", resourceLink)
+ }else{
+ utils.log("DEBUG", "Query for Service Instance Url Response Does NOT Contains Data" , isDebugEnabled)
+ execution.setVariable("WorkflowResponse", " ") //for junits
+ }
+ }else if(responseCode == 404){
+ utils.log("DEBUG", " Query for Service Instance Received a Not Found (404) Response", isDebugEnabled)
+ execution.setVariable("GENGS_SuccessIndicator", true)
+ execution.setVariable("WorkflowResponse", " ") //for junits
+ }else{
+ utils.log("DEBUG", "Query for Service Instance Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericGetService ObtainServiceInstanceUrlById Process*** ", isDebugEnabled)
+ }
+
+ /**
+ * This method obtains the Url to the provided service instance
+ * using the Service Instance Name.
+ *
+ * @param - execution
+ */
+ public void obtainServiceInstanceUrlByName(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericGetService ObtainServiceInstanceUrlByName Process*** ", isDebugEnabled)
+ try {
+ String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
+ utils.log("DEBUG", " Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName, isDebugEnabled)
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
+
+ //String url = "${aai_endpoint}${path}" host name needs to be removed from property
+ String url = "${path}"
+ execution.setVariable("GENGS_obtainSIUrlPath", url)
+
+ utils.logAudit("GenericGetService AAI Endpoint: " + aai_endpoint)
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
+ utils.log("DEBUG", " GET Service Instance response code is: " + responseCode, isDebugEnabled)
+ utils.logAudit("GenericGetService AAI Response Code: " + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
+ utils.logAudit("GenericGetService AAI Response: " + aaiResponse)
+ //Process Response
+ if(responseCode == 200){
+ utils.log("DEBUG", " Query for Service Instance Url Received a Good Response Code", isDebugEnabled)
+ execution.setVariable("GENGS_SuccessIndicator", true)
+ if(utils.nodeExists(aaiResponse, "result-data")){
+ utils.log("DEBUG", "Query for Service Instance Url Response Does Contain Data" , isDebugEnabled)
+ execution.setVariable("GENGS_FoundIndicator", true)
+ String resourceLink = utils.getNodeText1(aaiResponse, "resource-link")
+ execution.setVariable("GENGS_siResourceLink", resourceLink)
+ }else{
+ utils.log("DEBUG", "Query for Service Instance Url Response Does NOT Contains Data" , isDebugEnabled)
+ execution.setVariable("WorkflowResponse", " ") //for junits
+ }
+ }else if(responseCode == 404){
+ utils.log("DEBUG", " Query for Service Instance Received a Not Found (404) Response", isDebugEnabled)
+ execution.setVariable("GENGS_SuccessIndicator", true)
+ execution.setVariable("WorkflowResponse", " ") //for junits
+ }else{
+ utils.log("DEBUG", "Query for Service Instance Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process*** ", isDebugEnabled)
+ }
+
+
+ /**
+ * This method executes a GET call to AAI to obtain the
+ * service-instance or service-subscription
+ *
+ * @param - execution
+ */
+ public void getServiceObject(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericGetService GetServiceObject Process*** ", isDebugEnabled)
+ try {
+ String type = execution.getVariable("GENGS_type")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String serviceEndpoint = ""
+
+ utils.logAudit("GenericGetService getServiceObject AAI Endpoint: " + aai_endpoint)
+ if(type.equalsIgnoreCase("service-instance")){
+ String siResourceLink = execution.getVariable("GENGS_siResourceLink")
+ if(isBlank(siResourceLink)){
+ String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
+ utils.log("DEBUG", " Incoming GENGS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+ String serviceType = execution.getVariable("GENGS_serviceType")
+ utils.log("DEBUG", " Incoming GENGS_serviceType is: " + serviceType, isDebugEnabled)
+ String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
+ utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+ serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
+ }else{
+ utils.log("DEBUG", "Incoming Service Instance Resource Link is: " + siResourceLink, isDebugEnabled)
+ String[] split = siResourceLink.split("/aai/")
+ serviceEndpoint = "/aai/" + split[1]
+ }
+ }else if(type.equalsIgnoreCase("service-subscription")){
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
+ String serviceType = execution.getVariable("GENGS_serviceType")
+ serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
+ }
+
+ String serviceUrl = "${aai_endpoint}" + serviceEndpoint
+
+ execution.setVariable("GENGS_getServiceUrl", serviceUrl)
+ utils.log("DEBUG", "GET Service AAI Path is: \n" + serviceUrl, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENGS_getServiceResponseCode", responseCode)
+ utils.log("DEBUG", " GET Service response code is: " + responseCode, isDebugEnabled)
+ utils.logAudit("GenericGetService AAI Response Code: " + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENGS_getServiceResponse", aaiResponse)
+ utils.logAudit("GenericGetService AAI Response: " + aaiResponse)
+
+ //Process Response
+ if(responseCode == 200 || responseCode == 202){
+ utils.log("DEBUG", "GET Service Received a Good Response Code", isDebugEnabled)
+ if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
+ utils.log("DEBUG", "GET Service Response Contains a service-instance" , isDebugEnabled)
+ execution.setVariable("GENGS_FoundIndicator", true)
+ execution.setVariable("GENGS_service", aaiResponse)
+ execution.setVariable("WorkflowResponse", aaiResponse)
+
+ }else{
+ utils.log("DEBUG", "GET Service Response Does NOT Contain Data" , isDebugEnabled)
+ }
+ }else if(responseCode == 404){
+ utils.log("DEBUG", "GET Service Received a Not Found (404) Response", isDebugEnabled)
+ execution.setVariable("WorkflowResponse", " ") //for junits
+ }
+ else{
+ utils.log("DEBUG", " GET Service Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error encountered within GenericGetService GetServiceObject method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericGetService GetServiceObject Process*** ", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericGetVnf.groovy
index 81c8c01da2..df9a97c78c 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericGetVnf.groovy
@@ -1,276 +1,273 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import static org.apache.commons.lang3.StringUtils.*;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.codec.binary.Base64
-import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import org.springframework.web.util.UriUtils
-
-
-/**
- * TODO: Support getting vnf type = vpe
- *
- * This class supports the GenericGetVnf Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Vnf Object (from AAI). The flow currently
- * supports the querying of 2 types of Vnfs, generic-vnf and vce. The
- * type must be provided by the calling flow and the type should
- * be mapped to the variable GENGV_type. The type should either be
- * "generic-vnf" or "vce". If the Vnf Id is not provided by the calling
- * flow then this sub flow will execute the query to get the
- * Vnf using the Vnf Name. Therefore, the calling flow must provide
- * either the Vnf Id or Vnf Name.
- *
- * Upon successful completion of this sub flow the
- * GENGV_SuccessIndicator will be true and the query response payload
- * will be set to GENGV_vnf. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - if this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGV_FoundIndicator
- * set to false. This will allow the calling flow to distinguish
- * between the two success scenarios, "Success where Vnf is found"
- * and "Success where Vnf is NOT found".
- *
- *
- * Incoming Required Variables:
- * @param - GENGV_vnfId or @param - GENGV_vnfName
- * @param - GENGV_type
- *
- *
- * Outgoing Variables:
- * @param - GENGV_vnf
- * @param - GENGV_SuccessIndicator
- * @param - GENGV_FoundIndicator
- * @param - WorkflowException
- */
-class GenericGetVnf extends AbstractServiceTaskProcessor{
-
- String Prefix = "GENGV_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- */
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericGetVnf PreProcessRequest Process*** ", isDebugEnabled)
-
- execution.setVariable("GENGV_getVnfByName", false)
- execution.setVariable("GENGV_SuccessIndicator", false)
- execution.setVariable("GENGV_FoundIndicator", false)
-
- try{
- // Get Variables
- String vnfId = execution.getVariable("GENGV_vnfId")
- utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
- String vnfName = execution.getVariable("GENGV_vnfName")
- utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
-
- if(isBlank(vnfId) && isBlank(vnfName)){
- utils.log("DEBUG", "Incoming Vnf Name and Vnf Id are null. At least one is required!", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Vnf Name and Vnf Id are null. At least one is required.")
- }else{
- if(isBlank(vnfId)){
- execution.setVariable("GENGV_getVnfByName", true)
- }
- }
-
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", " Error encountered within GenericGetVnf PreProcessRequest method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetVnf PreProcessRequest")
-
- }
- utils.log("DEBUG", "*** COMPLETED GenericGetVnf PreProcessRequest Process ***", isDebugEnabled)
- }
-
- /**
- * This method executes a GET call to AAI to obtain the
- * Vnf using the Vnf Name
- *
- * @param - execution
- */
- public void getVnfByName(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericGetVnf GetVnfByName Process*** ", isDebugEnabled)
- try {
- String vnfName = execution.getVariable("GENGV_vnfName")
- utils.log("DEBUG", "Getting Vnf by Vnf Name: " + vnfName, isDebugEnabled)
- String type = execution.getVariable("GENGV_type")
- utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
-
- //Determine Type of Vnf Querying For.
- def aai_uri = ""
- if(type.equals("generic-vnf")){
- aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- }else if(type.equals("vce")){
- aai_uri = aaiUriUtil.getNetworkVceUri(execution)
- }else{
- utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENGV_type")
- }
-
- String getVnfPath = "${aai_endpoint}${aai_uri}?vnf-name=" + UriUtils.encode(vnfName, "UTF-8")
-
- execution.setVariable("GENGV_getVnfPath", getVnfPath)
- utils.logAudit("Get Vnf Url is: " + getVnfPath)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGV_getVnfResponseCode", responseCode)
- utils.log("DEBUG", " GET Vnf response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENGV_getVnfResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- utils.log("DEBUG", "GET Vnf Received a Good Response", isDebugEnabled)
- if(utils.nodeExists(aaiResponse, type)){
- utils.log("DEBUG", "GET Vnf Response Contains a Vnf", isDebugEnabled)
- execution.setVariable("GENGV_FoundIndicator", true)
- execution.setVariable("GENGV_vnf", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
- }else{
- utils.log("DEBUG", "GET Vnf Response Does NOT Contain a Vnf", isDebugEnabled)
- }
-
- }else if(responseCode == 404){
- utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
- }else{
- utils.log("DEBUG", "GET Vnf Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericGetVnf GetVnfByName method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfByName")
- }
- utils.log("DEBUG", " *** COMPLETED GenericGetVnf GetVnfByName Process*** ", isDebugEnabled)
- }
-
- /**
- * This method executes a GET call to AAI to obtain the
- * Vnf using the Vnf Id
- *
- * @param - execution
- */
- public void getVnfById(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericGetVnf GetVnfById Process*** ", isDebugEnabled)
- try {
- String vnfId = execution.getVariable("GENGV_vnfId")
- utils.log("DEBUG", "Getting Vnf by Vnf Id: " + vnfId, isDebugEnabled)
- String type = execution.getVariable("GENGV_type")
- utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
-
- //Determine Type of Vnf Querying For.
- def aai_uri = ""
- if(type.equals("generic-vnf")){
- aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- }else if(type.equals("vce")){
- aai_uri = aaiUriUtil.getNetworkVceUri(execution)
- }else if(type.equals("vpe")){
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "GenericGetVnf does not yet support getting type of vnf = vpe")
- }else{
- utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENGV_type")
- }
- utils.log("DEBUG", "Using AAI Uri: " + aai_uri, isDebugEnabled)
-
- String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
- utils.log("DEBUG", "GET Vnf Endpoint is: " + getVnfPath, isDebugEnabled)
-
- execution.setVariable("GENGV_getVnfPath", getVnfPath)
- utils.logAudit("Get Vnf Url is: " + getVnfPath)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGV_getVnfResponseCode", responseCode)
- utils.log("DEBUG", " GET Vnf response code is: " + responseCode, isDebugEnabled)
-
- String aaiResponse = response.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENGV_getVnfResponse", aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- utils.log("DEBUG", "GET Vnf Received a Good Response", isDebugEnabled)
- if(utils.nodeExists(aaiResponse, type)){
- utils.log("DEBUG", "GET Vnf Response Contains a Vnf", isDebugEnabled)
- execution.setVariable("GENGV_FoundIndicator", true)
- execution.setVariable("GENGV_vnf", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
- }else{
- utils.log("DEBUG", "GET Vnf Response Does NOT Contain a Vnf", isDebugEnabled)
- }
-
- }else if(responseCode == 404){
- utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
- }else{
- utils.log("DEBUG", "GET Vnf Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericGetVnf GetVnfById method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfById")
- }
- utils.log("DEBUG", " *** COMPLETED GenericGetVnf GetVnfById Process*** ", isDebugEnabled)
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * TODO: Support getting vnf type = vpe
+ *
+ * This class supports the GenericGetVnf Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of getting a Vnf Object (from AAI). The flow currently
+ * supports the querying of 2 types of Vnfs, generic-vnf and vce. The
+ * type must be provided by the calling flow and the type should
+ * be mapped to the variable GENGV_type. The type should either be
+ * "generic-vnf" or "vce". If the Vnf Id is not provided by the calling
+ * flow then this sub flow will execute the query to get the
+ * Vnf using the Vnf Name. Therefore, the calling flow must provide
+ * either the Vnf Id or Vnf Name.
+ *
+ * Upon successful completion of this sub flow the
+ * GENGV_SuccessIndicator will be true and the query response payload
+ * will be set to GENGV_vnf. An MSOWorkflowException will
+ * be thrown upon unsuccessful completion or if an error occurs
+ * at any time during this sub flow. Please map variables
+ * to the corresponding variable names below.
+ *
+ * Note - if this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * successful response however the GENGV_FoundIndicator
+ * set to false. This will allow the calling flow to distinguish
+ * between the two success scenarios, "Success where Vnf is found"
+ * and "Success where Vnf is NOT found".
+ *
+ *
+ * Variable Mapping Below
+ *
+ * In Mapping Variables:
+ * @param - GENGV_vnfId or @param - GENGV_vnfName
+ * @param - GENGV_type
+ *
+ * Out Mapping Variables:
+ * @param - GENGV_vnf
+ * @param - GENGV_SuccessIndicator
+ * @param - GENGV_FoundIndicator
+ * @param - WorkflowException
+ *
+ *
+ */
+class GenericGetVnf extends AbstractServiceTaskProcessor{
+
+ String Prefix = "GENGV_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * This method validates the incoming variables and
+ * determines the subsequent event based on which
+ * variables the calling flow provided.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericGetVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("GENGV_getVnfByName", false)
+ execution.setVariable("GENGV_SuccessIndicator", false)
+ execution.setVariable("GENGV_FoundIndicator", false)
+
+ try{
+ // Get Variables
+ String vnfId = execution.getVariable("GENGV_vnfId")
+ utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+ String vnfName = execution.getVariable("GENGV_vnfName")
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ if(isBlank(vnfId) && isBlank(vnfName)){
+ utils.log("DEBUG", "Incoming Vnf Name and Vnf Id are null. At least one is required!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Vnf Name and Vnf Id are null. At least one is required.")
+ }else{
+ if(isBlank(vnfId)){
+ execution.setVariable("GENGV_getVnfByName", true)
+ }
+ }
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error encountered within GenericGetVnf PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED GenericGetVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+ /**
+ * This method executes a GET call to AAI to obtain the
+ * Vnf using the Vnf Name
+ *
+ * @param - execution
+ */
+ public void getVnfByName(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericGetVnf GetVnfByName Process*** ", isDebugEnabled)
+ try {
+ String vnfName = execution.getVariable("GENGV_vnfName")
+ utils.log("DEBUG", "Getting Vnf by Vnf Name: " + vnfName, isDebugEnabled)
+ String type = execution.getVariable("GENGV_type")
+ utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ //Determine Type of Vnf Querying For.
+ def aai_uri = ""
+ if(type.equals("generic-vnf")){
+ aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ }else if(type.equals("vce")){
+ aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+ }else{
+ utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENGV_type")
+ }
+
+ String getVnfPath = "${aai_endpoint}${aai_uri}?vnf-name=" + UriUtils.encode(vnfName, "UTF-8") + "&depth=1"
+
+ execution.setVariable("GENGV_getVnfPath", getVnfPath)
+ utils.logAudit("Get Vnf Url is: " + getVnfPath)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENGV_getVnfResponseCode", responseCode)
+ utils.log("DEBUG", " GET Vnf response code is: " + responseCode, isDebugEnabled)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENGV_getVnfResponse", aaiResponse)
+
+ //Process Response
+ if(responseCode == 200){
+ utils.log("DEBUG", "GET Vnf Received a Good Response", isDebugEnabled)
+ if(utils.nodeExists(aaiResponse, type)){
+ utils.log("DEBUG", "GET Vnf Response Contains a Vnf", isDebugEnabled)
+ execution.setVariable("GENGV_FoundIndicator", true)
+ execution.setVariable("GENGV_vnf", aaiResponse)
+ execution.setVariable("WorkflowResponse", aaiResponse)
+ }else{
+ utils.log("DEBUG", "GET Vnf Response Does NOT Contain a Vnf", isDebugEnabled)
+ }
+
+ }else if(responseCode == 404){
+ utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
+ }else{
+ utils.log("DEBUG", "GET Vnf Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericGetVnf GetVnfByName method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfByName")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericGetVnf GetVnfByName Process*** ", isDebugEnabled)
+ }
+
+ /**
+ * This method executes a GET call to AAI to obtain the
+ * Vnf using the Vnf Id
+ *
+ * @param - execution
+ */
+ public void getVnfById(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericGetVnf GetVnfById Process*** ", isDebugEnabled)
+ try {
+ String vnfId = execution.getVariable("GENGV_vnfId")
+ utils.log("DEBUG", "Getting Vnf by Vnf Id: " + vnfId, isDebugEnabled)
+ String type = execution.getVariable("GENGV_type")
+ utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ //Determine Type of Vnf Querying For.
+ def aai_uri = ""
+ if(type.equals("generic-vnf")){
+ aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ }else if(type.equals("vce")){
+ aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+ }else if(type.equals("vpe")){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "GenericGetVnf does not yet support getting type of vnf = vpe")
+ }else{
+ utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENGV_type")
+ }
+ utils.log("DEBUG", "Using AAI Uri: " + aai_uri, isDebugEnabled)
+
+ String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ utils.log("DEBUG", "GET Vnf Endpoint is: " + getVnfPath, isDebugEnabled)
+
+ execution.setVariable("GENGV_getVnfPath", getVnfPath)
+ utils.logAudit("Get Vnf Url is: " + getVnfPath)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENGV_getVnfResponseCode", responseCode)
+ utils.log("DEBUG", " GET Vnf response code is: " + responseCode, isDebugEnabled)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENGV_getVnfResponse", aaiResponse)
+
+ //Process Response
+ if(responseCode == 200){
+ utils.log("DEBUG", "GET Vnf Received a Good Response", isDebugEnabled)
+ if(utils.nodeExists(aaiResponse, type)){
+ utils.log("DEBUG", "GET Vnf Response Contains a Vnf", isDebugEnabled)
+ execution.setVariable("GENGV_FoundIndicator", true)
+ execution.setVariable("GENGV_vnf", aaiResponse)
+ execution.setVariable("WorkflowResponse", aaiResponse)
+ }else{
+ utils.log("DEBUG", "GET Vnf Response Does NOT Contain a Vnf", isDebugEnabled)
+ }
+
+ }else if(responseCode == 404){
+ utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
+ }else{
+ utils.log("DEBUG", "GET Vnf Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericGetVnf GetVnfById method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfById")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericGetVnf GetVnfById Process*** ", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericNotificationService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericNotificationService.groovy
new file mode 100644
index 0000000000..62d476d294
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericNotificationService.groovy
@@ -0,0 +1,21 @@
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import java.text.SimpleDateFormat
+
+public class GenericNotificationService extends AbstractServiceTaskProcessor {
+
+
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest (Execution execution) {
+
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericPutService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericPutService.groovy
new file mode 100644
index 0000000000..9609103228
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericPutService.groovy
@@ -0,0 +1,280 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.net.URLEncoder;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This class supports the GenericPutService Sub Flow.
+ * This Generic sub flow can be used by any flow for the
+ * goal of creating a Service Instance or Service-Subscription in AAI. Upon successful completion of
+ * this sub flow the GENPS_SuccessIndicator will be true.
+ * The calling flow must set the GENPS_type variable as "service-instance"
+ * or "service-subscription".
+ * A MSOWorkflowException will be thrown Upon unsuccessful
+ * completion or if an error occurs within this flow.
+ * Please map variables to the corresponding variable names
+ * below.
+ *
+ *
+ * Incoming Required Variables:
+ * @param - GENPS_type - Required field. This will be required field populated as service-instance or service-subscription
+ * @param - GENPS_globalSubscriberId - Required field
+ * @param - GENPS_serviceType - Required Field
+ * @param - GENPS_payload - Required Field This will be the payload that needs to be sent.
+ *
+ * @param - GENPS_serviceInstanceId - Conditional Field. Required for service-instance.
+ * @param - GENPS_allottedResourceId - Conditional Field. Required for allotted-resource.
+ * @param - GENPS_tunnelXconnectId - Conditional Field. Required for tunnel-xconnect.
+ *
+ * @param - GENPS_requestId to trace the request id
+ * @param - GENPS_serviceResourceVersion optional needs to be provided only in case of update for both service-instance and service subscription. The calling flows
+ * should check if a service-instance or servic-subscription exists by calling the subflow GenericGetService. if it exists then resourceversion should be
+ * obtained from aai and sent as an input parameter.
+ *
+ * Outgoing Variables:
+ * @param - GENPS_SuccessIndicator
+ * @param - WorkflowException
+ *
+ *
+ */
+
+
+class GenericPutService extends AbstractServiceTaskProcessor{
+
+ String Prefix = "GENPS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericPutService PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("GENPS_SuccessIndicator", false)
+
+ try{
+ // Get Variables
+ String requestId = execution.getVariable("GENPS_requestId")
+ utils.log("DEBUG", "Incoming GENPS_requestId is: " + requestId, isDebugEnabled)
+
+ String globalSubscriberId = execution.getVariable("GENPS_globalSubscriberId")
+ String serviceInstanceId = execution.getVariable("GENPS_serviceInstanceId")
+ String serviceType = execution.getVariable("GENPS_serviceType")
+ String allottedResourceId = execution.getVariable("GENPS_allottedResourceId")
+ String tunnelXconnectId = execution.getVariable("GENPS_tunnelXconnectId")
+ String type = execution.getVariable("GENPS_type")
+
+ if(type != null){
+ utils.log("DEBUG", "Incoming GENPS_type is: " + type, isDebugEnabled)
+ if(type.equalsIgnoreCase("service-instance")){
+ if(isBlank(globalSubscriberId) || isBlank(serviceType) || isBlank(serviceInstanceId)){
+ utils.log("DEBUG", "Incoming Required Variable is missing or null!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+ }else{
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ }
+ }else if(type.equalsIgnoreCase("service-subscription")){
+ if(isBlank(serviceType) || isBlank(globalSubscriberId)){
+ utils.log("DEBUG", "Incoming ServiceType or GlobalSubscriberId is null. These variables are required to create a service-subscription.", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
+ }else{
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+ }
+ }else if(type.equalsIgnoreCase("allotted-resource")){
+ if(isBlank(globalSubscriberId) || isBlank(serviceType) || isBlank(serviceInstanceId) || isBlank(allottedResourceId)){
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Allotted Resource Id is: " + allottedResourceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Required Variable is missing or null!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+ }else{
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Allotted Resource Id is: " + allottedResourceId, isDebugEnabled)
+ }
+ }else if(type.equalsIgnoreCase("tunnel-xconnect")){
+ if(isBlank(globalSubscriberId) || isBlank(serviceType) || isBlank(serviceInstanceId) || isBlank(allottedResourceId) || isBlank(tunnelXconnectId)){
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Allotted Resource Id is: " + allottedResourceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Tunnel Xconnect Id is: " + tunnelXconnectId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Required Variable is missing or null!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+ }else{
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Allotted Resource Id is: " + allottedResourceId, isDebugEnabled)
+ utils.log("DEBUG", "Incoming Tunnel Xconnect Id is: " + tunnelXconnectId, isDebugEnabled)
+ }
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
+ }
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENPS_type is null. Variable is Required.")
+ }
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericPutService PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericPutService PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED GenericPutService PreProcessRequest Process ***", isDebugEnabled)
+
+ }
+
+
+
+ /**
+ * This method executes a Put call to AAI for the provided
+ * service instance.
+ *
+ * @param - execution
+ *
+ */
+ public void putServiceInstance(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericPutService PutServiceInstance method*** ", isDebugEnabled)
+ try {
+ String type = execution.getVariable("GENPS_type")
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+ String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ logDebug('AAI namespace is: ' + namespace, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String serviceAaiPath = ""
+ String payload = execution.getVariable("GENPS_payload")
+ execution.setVariable("GENPS_payload", payload)
+ utils.log("DEBUG", "Incoming GENPS_payload is: " + payload, isDebugEnabled)
+ utils.logAudit(payload)
+
+ String serviceType = execution.getVariable("GENPS_serviceType")
+ utils.log("DEBUG", " Incoming GENPS_serviceType is: " + serviceType, isDebugEnabled)
+ String globalSubscriberId = execution.getVariable("GENPS_globalSubscriberId")
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+
+ // This IF clause is if we need to create a new Service Instance
+ if(type.equalsIgnoreCase("service-instance")){
+
+ String serviceInstanceId = execution.getVariable("GENPS_serviceInstanceId")
+ utils.log("DEBUG", " Incoming GENPS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+
+ // serviceAaiPath = "${aai_endpoint}${aai_uri}/" + URLEncoder.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + URLEncoder.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + URLEncoder.encode(serviceInstanceId,"UTF-8")
+ serviceAaiPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
+
+ }else if(type.equalsIgnoreCase("service-subscription")){
+
+ // serviceAaiPath = "${aai_endpoint}${aai_uri}/" + URLEncoder.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + URLEncoder.encode(serviceType,"UTF-8")
+ serviceAaiPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
+ }else if(type.equalsIgnoreCase("allotted-resource")){
+
+ String serviceInstanceId = execution.getVariable("GENPS_serviceInstanceId")
+ utils.log("DEBUG", " Incoming GENPS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+ String allottedResourceId = execution.getVariable("GENPS_allottedResourceId")
+ utils.log("DEBUG", " Incoming GENPS_allottedResourceId is: " + allottedResourceId, isDebugEnabled)
+
+ // serviceAaiPath = "${aai_endpoint}${aai_uri}/" + URLEncoder.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + URLEncoder.encode(serviceType,"UTF-8")
+ serviceAaiPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
+ }else if(type.equalsIgnoreCase("tunnel-xconnect")){
+
+ String serviceInstanceId = execution.getVariable("GENPS_serviceInstanceId")
+ utils.log("DEBUG", " Incoming GENPS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+ String allottedResourceId = execution.getVariable("GENPS_allottedResourceId")
+ utils.log("DEBUG", " Incoming GENPS_allottedResourceId is: " + allottedResourceId, isDebugEnabled)
+ String tunnelXconnectId = execution.getVariable("GENPS_tunnelXconnectId")
+ utils.log("DEBUG", " Incoming GENPS_tunnelXconnectId is: " + tunnelXconnectId, isDebugEnabled)
+
+ // serviceAaiPath = "${aai_endpoint}${aai_uri}/" + URLEncoder.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + URLEncoder.encode(serviceType,"UTF-8")
+ serviceAaiPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(globalSubscriberId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8") + "/tunnel-xconnects/tunnel-xconnect/" + UriUtils.encode(tunnelXconnectId,"UTF-8")
+ }
+
+ String resourceVersion = execution.getVariable("GENPS_serviceResourceVersion")
+ utils.log("DEBUG", "Incoming Resource Version is: " + resourceVersion, isDebugEnabled)
+ if(resourceVersion !=null){
+ serviceAaiPath = serviceAaiPath +'?resource-version=' + UriUtils.encode(resourceVersion,"UTF-8")
+ }
+
+ execution.setVariable("GENPS_putServiceInstanceAaiPath", serviceAaiPath)
+ utils.log("DEBUG", "PUT Service Instance AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIPutCall(execution, serviceAaiPath, payload)
+ int responseCode = response.getStatusCode()
+ execution.setVariable("GENPS_putServiceInstanceResponseCode", responseCode)
+ utils.log("DEBUG", " Put Service Instance response code is: " + responseCode, isDebugEnabled)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENPS_putServiceInstanceResponse", aaiResponse)
+
+
+ //Process Response
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ //200 OK 201 CREATED 202 ACCEPTED
+ {
+ utils.log("DEBUG", "PUT Service Instance Received a Good Response", isDebugEnabled)
+ execution.setVariable("GENPS_SuccessIndicator", true)
+ }
+
+ else{
+ utils.log("DEBUG", "Put Generic Service Instance Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericPutService PutServiceInstance method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During Put Service Instance")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericPutService PutServiceInstance Process*** ", isDebugEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericPutVnf.groovy
index 40948dc34b..207830aea0 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/GenericPutVnf.groovy
@@ -1,178 +1,172 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import static org.apache.commons.lang3.StringUtils.*;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.codec.binary.Base64
-import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import org.springframework.web.util.UriUtils
-
-/**
- * TODO: Support Putting vnf type = vpe and vce
- *
- * This class supports the GenericPutVnf Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of Creating/Updating(PUT) a Vnf Object (in AAI). The flow
- * supports the Creating/Updating of 3 types of Vnfs (generic-vnf, vce, and vpe).
- * The "type" must be provided by the calling flow and this type should
- * be mapped to the variable GENPV_type. The type should either be
- * "generic-vnf", "vce", or "vpe". In addition, the Vnf Id and
- * payload should be provided.
- *
- * Upon successful completion of this sub flow the
- * GENPV_SuccessIndicator. An MSOWorkflowException will
- * be thrown if an error occurs at any time during this
- * sub flow. Please map input variables to the corresponding
- * variable names below.
- *
- *
- * Incoming Required Variables:
- * @param - GENPV_vnfId
- * @param - GENPV_vnfPayload
- * @param - GENPV_type
- *
- *
- * Outgoing Variables:
- * @param - GENPV_SuccessIndicator
- * @param - WorkflowException
- */
-class GenericPutVnf extends AbstractServiceTaskProcessor{
-
- String Prefix = "GENPV_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * generates a Vnf Id if one is not provided.
- *
- * @param - execution
- */
- public void preProcessRequest(Execution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericPutVnf PreProcessRequest Process*** ", isDebugEnabled)
-
- execution.setVariable("GENPV_SuccessIndicator", false)
- execution.setVariable("GENPV_FoundIndicator", false)
-
- try{
- // Get Variables
- String payload = execution.getVariable("GENPV_vnfPayload")
- utils.log("DEBUG", "Incoming Vnf Payload is: " + payload, isDebugEnabled)
- String type = execution.getVariable("GENPV_type")
- utils.log("DEBUG", "Incoming Type of Vnf is: " + type, isDebugEnabled)
-
- if(isBlank(payload) || isBlank(type)){
- utils.log("ERROR", "Incoming Vnf Payload and/or Type is null. These Variables are required!", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Vnf Payload and/or Type is null. These Variables are required!")
- }else{
- String vnfId = execution.getVariable("GENPV_vnfId")
- if(isBlank(vnfId)){
- vnfId = UUID.randomUUID().toString()
- utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
- execution.setVariable("GENPV_vnfId", vnfId)
- }else{
- utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
- }
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericPutVnf PreProcessRequest method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericPutVnf PreProcessRequest")
-
- }
- utils.log("DEBUG", "*** COMPLETED GenericPutVnf PreProcessRequest Process ***", isDebugEnabled)
- }
-
- /**
- * This method executes a Put call to AAI to create
- * or update a Vnf Object using the provided payload
- *
- * @param - execution
- */
- public void putVnf(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED GenericPutVnf PutVnf Process*** ", isDebugEnabled)
- try {
- String vnfId = execution.getVariable("GENPV_vnfId")
- String payload = execution.getVariable("GENPV_vnfPayload")
- String type = execution.getVariable("GENPV_type")
-
- AaiUtil aaiUtil = new AaiUtil(this)
- def aai_uri = ""
- if(type.equals("generic-vnf")){
- aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
- }else if(type.equals("vce")){
- aai_uri = aaiUtil.getNetworkVceUri(execution)
- }else if(type.equals("vpe")){
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "GenericPutVnf does not yet support getting type of vnf = vpe")
- }else{
- utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENPV_type")
- }
- utils.log("DEBUG", "Using AAI Uri: " + aai_uri, isDebugEnabled)
-
- String path = "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
- utils.log("DEBUG", "PUT Vnf Endpoint is: " + path, isDebugEnabled)
-
- String putVnfAAIPath = execution.getVariable("URN_aai_endpoint") + path
- execution.setVariable("GENPV_putVnfAAIPath", putVnfAAIPath)
- utils.logAudit("PUT Vnf Url is: " + putVnfAAIPath)
-
- APIResponse apiResponse = aaiUtil.executeAAIPutCall(execution, putVnfAAIPath, payload)
- int responseCode = apiResponse.getStatusCode()
- execution.setVariable("GENPV_putVnfResponseCode", responseCode)
- utils.logAudit("AAI Response Code: " + responseCode)
- String aaiResponse = apiResponse.getResponseBodyAsString()
- aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable("GENPV_putVnfResponse", aaiResponse)
- utils.logAudit("AAI Response: " + aaiResponse)
-
- if(responseCode == 200 || responseCode == 201){
- utils.log("DEBUG", "PUT Vnf Received a Good Response Code.", isDebugEnabled)
- }else{
- utils.log("DEBUG", "PUT Vnf Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("ERROR", " Error encountered within GenericPutVnf PutVnf method!" + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During PutVnf")
- }
- utils.log("DEBUG", " *** COMPLETED GenericPutVnf PutVnf Process*** ", isDebugEnabled)
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+/**
+ * TODO: Support Putting vnf type = vpe and vce
+ *
+ * This class supports the GenericPutVnf Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of Creating/Updating(PUT) a Vnf Object (in AAI). The flow
+ * supports the Creating/Updating of 3 types of Vnfs (generic-vnf, vce, and vpe).
+ * The "type" must be provided by the calling flow and this type should
+ * be mapped to the variable GENPV_type. The type should either be
+ * "generic-vnf", "vce", or "vpe". In addition, the Vnf Id and
+ * payload should be provided.
+ *
+ * Upon successful completion of this sub flow the
+ * GENPV_SuccessIndicator. An MSOWorkflowException will
+ * be thrown if an error occurs at any time during this
+ * sub flow. Please map input variables to the corresponding
+ * variable names below.
+ *
+ *
+ * Incoming Required Variables:
+ * @param - GENPV_vnfId
+ * @param - GENPV_vnfPayload
+ * @param - GENPV_type
+ *
+ *
+ * Outgoing Variables:
+ * @param - GENPV_SuccessIndicator
+ * @param - WorkflowException
+ */
+class GenericPutVnf extends AbstractServiceTaskProcessor{
+
+ String Prefix = "GENPV_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * This method validates the incoming variables and
+ * generates a Vnf Id if one is not provided.
+ *
+ * @param - execution
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericPutVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("GENPV_SuccessIndicator", false)
+ execution.setVariable("GENPV_FoundIndicator", false)
+
+ try{
+ // Get Variables
+ String payload = execution.getVariable("GENPV_vnfPayload")
+ utils.log("DEBUG", "Incoming Vnf Payload is: " + payload, isDebugEnabled)
+ String type = execution.getVariable("GENPV_type")
+ utils.log("DEBUG", "Incoming Type of Vnf is: " + type, isDebugEnabled)
+
+ if(isBlank(payload) || isBlank(type)){
+ utils.log("ERROR", "Incoming Vnf Payload and/or Type is null. These Variables are required!", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Vnf Payload and/or Type is null. These Variables are required!")
+ }else{
+ String vnfId = execution.getVariable("GENPV_vnfId")
+ if(isBlank(vnfId)){
+ vnfId = UUID.randomUUID().toString()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ execution.setVariable("GENPV_vnfId", vnfId)
+ }else{
+ utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericPutVnf PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericPutVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED GenericPutVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+ /**
+ * This method executes a Put call to AAI to create
+ * or update a Vnf Object using the provided payload
+ *
+ * @param - execution
+ */
+ public void putVnf(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED GenericPutVnf PutVnf Process*** ", isDebugEnabled)
+ try {
+ String vnfId = execution.getVariable("GENPV_vnfId")
+ String payload = execution.getVariable("GENPV_vnfPayload")
+ String type = execution.getVariable("GENPV_type")
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ def aai_uri = ""
+ if(type.equals("generic-vnf")){
+ aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+ }else if(type.equals("vce")){
+ aai_uri = aaiUtil.getNetworkVceUri(execution)
+ }else if(type.equals("vpe")){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "GenericPutVnf does not yet support getting type of vnf = vpe")
+ }else{
+ utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENPV_type")
+ }
+ utils.log("DEBUG", "Using AAI Uri: " + aai_uri, isDebugEnabled)
+
+ String path = "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+ utils.log("DEBUG", "PUT Vnf Endpoint is: " + path, isDebugEnabled)
+
+ String putVnfAAIPath = execution.getVariable("URN_aai_endpoint") + path
+ execution.setVariable("GENPV_putVnfAAIPath", putVnfAAIPath)
+ utils.logAudit("PUT Vnf Url is: " + putVnfAAIPath)
+
+ APIResponse apiResponse = aaiUtil.executeAAIPutCall(execution, putVnfAAIPath, payload)
+ int responseCode = apiResponse.getStatusCode()
+ execution.setVariable("GENPV_putVnfResponseCode", responseCode)
+ utils.logAudit("AAI Response Code: " + responseCode)
+ String aaiResponse = apiResponse.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable("GENPV_putVnfResponse", aaiResponse)
+ utils.logAudit("AAI Response: " + aaiResponse)
+
+ if(responseCode == 200 || responseCode == 201){
+ utils.log("DEBUG", "PUT Vnf Received a Good Response Code.", isDebugEnabled)
+ }else{
+ utils.log("DEBUG", "PUT Vnf Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("ERROR", " Error encountered within GenericPutVnf PutVnf method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During PutVnf")
+ }
+ utils.log("DEBUG", " *** COMPLETED GenericPutVnf PutVnf Process*** ", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy
index 2721a20cf3..a0256d33e9 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy
@@ -1,864 +1,951 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.util.Node;
-import groovy.xml.XmlUtil
-
-import java.text.SimpleDateFormat
-
-import org.apache.commons.codec.binary.Base64
-
-
-
-import org.apache.commons.codec.binary.Base64
-import org.camunda.bpm.engine.runtime.Execution;
-import org.slf4j.MDC;
-import org.w3c.dom.Element
-//import org.w3c.dom.NodeList
-
-import org.openecomp.mso.bpmn.core.BPMNLogger
-import org.openecomp.mso.logger.MessageEnum
-import org.openecomp.mso.logger.MsoLogger
-import org.openecomp.mso.utils.CryptoUtils
-import org.openecomp.mso.bpmn.core.xml.XmlTool
-
-class MsoUtils {
- def initializeEndPoints(execution){
- // use this placeholder to initialize end points, if called independently, this need to be set
- execution.setVariable("AAIEndPoint","http://localhost:8080/SoapUIMocks")
- }
- def getNodeText(xmlInput,element){
- def rtn=null
- if(xmlInput!=null){
- def xml= new XmlSlurper().parseText(xmlInput)
- rtn= xml.'**'.find{node->node.name()==element}.text()
- }
- return rtn
- }
- def getMultNodes(xmlInput, element){
- def nodes=null
- if(xmlInput!=null){
- def xml= new XmlSlurper().parseText(xmlInput)
- nodes = xml.'**'.findAll{ node-> node.name() == element }*.text()
- }
- return nodes
- }
- def getNodeText1(xmlInput,element){
- def rtn=null
- if(xmlInput!=null){
- def xml= new XmlSlurper().parseText(xmlInput)
- rtn= xml.'**'.find{node->node.name()==element}
- if (rtn != null){
- rtn=rtn.text()
- }
- }
- return rtn
- }
- def getNodeXml(xmlInput,element){
- return getNodeXml(xmlInput, element, true)
- }
- def getNodeXml(xmlInput,element,incPreamble){
- def fxml= new XmlSlurper().parseText(xmlInput)
- def nodeToSerialize = fxml.'**'.find {it.name() == element}
- if(nodeToSerialize==null){
- return ""
- }
- def nodeAsText = XmlUtil.serialize(nodeToSerialize)
- if (!incPreamble) {
- nodeAsText = removeXmlPreamble(nodeAsText)
- }
- return nodeAsText
- }
- def nodeExists(xmlInput,element){
- try {
- def fxml= new XmlSlurper().parseText(xmlInput)
- def nodeToSerialize = fxml.'**'.find {it.name() == element}
- return nodeToSerialize!=null
- } catch(Exception e) {
- return false
- }
- }
-
-
- /***** Utilities when using XmlParser *****/
-
- /**
- * Convert a Node into a String by deserializing it and formatting it.
- *
- * @param node Node to be converted.
- * @return the Node as a String.
- */
- def String nodeToString(Node node) {
- def String nodeAsString = groovy.xml.XmlUtil.serialize(node)
- nodeAsString = removeXmlPreamble(nodeAsString)
- return formatXml(nodeAsString)
- }
-
- /**
- * Get the specified child Node of the specified parent. If there are
- * multiple children of the same name, only the first one is returned.
- * If there are no children with the specified name, 'null' is returned.
- *
- * @param parent Parent Node in which to find a child.
- * @param childNodeName Name of the child Node to get.
- * @return the (first) child Node with the specified name or 'null'
- * if a child Node with the specified name does not exist.
- */
- def Node getChildNode(Node parent, String childNodeName) {
- def NodeList nodeList = getIdenticalChildren(parent, childNodeName)
- if (nodeList.size() == 0) {
- return null
- } else {
- return nodeList.get(0)
- }
- }
-
- /**
- * Get the textual value of the specified child Node of the specified parent.
- * If there are no children with the specified name, 'null' is returned.
- *
- * @param parent Parent Node in which to find a child.
- * @param childNodeName Name of the child Node whose value to get.
- * @return the textual value of child Node with the specified name or 'null'
- * if a child Node with the specified name does not exist.
- */
- def String getChildNodeText(Node parent, String childNodeName) {
- def Node childNode = getChildNode(parent, childNodeName)
- if (childNode == null) {
- return null
- } else {
- return childNode.text()
- }
- }
-
- /**
- * Get all of the child nodes from the specified parent that have the
- * specified name. The returned NodeList could be empty.
- *
- * @param parent Parent Node in which to find children.
- * @param childNodeName Name of the children to get.
- * @return a NodeList of all the children from the parent with the specified
- * name. The list could be empty.
- */
- def NodeList getIdenticalChildren(Node parent, String childNodeName) {
- return (NodeList) parent.get(childNodeName)
- }
-
- /***** End of Utilities when using XmlParser *****/
-
-
- /** these are covered under the common function above**/
- def getSubscriberName(xmlInput,element){
- def rtn=null
- if(xmlInput!=null){
- def xml= new XmlSlurper().parseText(xmlInput)
- rtn= xml.'**'.find{node->node.name()==element}.text()
- }
- return rtn
- }
- def getTenantInformation(xmlInput,element){
- def xml= new XmlSlurper().parseText(xmlInput)
- def nodeToSerialize = xml.'**'.find {it.name() == 'service-information'}
- def nodeAsText = XmlUtil.serialize(nodeToSerialize)
- return nodeAsText
- }
- def getServiceInstanceId(xmlInput,element){
- def xml= new XmlSlurper().parseText(xmlInput)
- return ( xml.'**'.find{node->node.name()==element}.text() )
- }
- //for aai tenant url
- def searchResourceLink(xmlInput, resourceType){
- def fxml= new XmlSlurper().parseText(xmlInput)
- def element = fxml.'**'.find {it.'resource-type' == resourceType}
- return (element == null) ? null : element.'resource-link'.text()
- }
-
- def searchMetaData(xmlInput, searchName, searchValue){
- def fxml= new XmlSlurper().parseText(xmlInput)
- def ret = fxml.'**'.find {it.metaname.text() == searchName && it.metaval.text() == searchValue}
- if(ret != null){
- return ret.parent().parent()
- }
- return ret
- }
-
- def searchMetaDataNode(fxml, searchName, searchValue){
- def ret = fxml.'**'.find {it.metaname.text() == searchName && it.metaval.text() == searchValue}
- if(ret != null){
- return ret.parent().parent()
- }
- return ret
- }
-
- // for Trinity L3 delete bonding
- def getPBGFList(isDebugLogEnabled, xmlInput){
- xmlInput = xmlInput.replaceAll("&amp;", "&")
- xmlInput = xmlInput.replaceAll("&lt;", "<")
- xmlInput = xmlInput.replaceAll("&gt;", ">")
- log("DEBUG", "getPBGFList: xmlInput " + xmlInput,isDebugLogEnabled)
- ArrayList myNodes = new ArrayList()
- if(nodeExists(xmlInput,"nbnc-response-information")){
- def respInfo=getNodeXml(xmlInput,"nbnc-response-information", false)
- if(respInfo!=null){
- def fxml= new XmlSlurper().parseText(respInfo)
- def myNode
- fxml.'virtual-datacenter-list'.each { vdc ->
- //we only want to add one BFG per VDC
- log("DEBUG", "vdc " + vdc.text(),isDebugLogEnabled)
- myNode = vdc.'**'.find {it.'border-element-tangibility'.text() =~ /PHYSICAL/}
- log("DEBUG", "myNode " + myNode.text(),isDebugLogEnabled)
- myNodes.add(XmlUtil.serialize(myNode))
- }
- }
-
- return myNodes
- }else{
- return null
- }
- }
-
- def getPBGFList(xmlInput){
- getPBGFList("false", xmlInput)
- }
-
- def String decodeXML(xml) {
- def String decodedXml = xml.replaceAll("&amp;", "&")
- decodedXml = decodedXml.replaceAll("&lt;", "<")
- decodedXml = decodedXml.replaceAll("&gt;", ">")
- }
-
- def getMetaVal(node, name){
- try{
- return node.'**'.find {it.metaname.text() == name}.metaval.text()
- }catch(Exception e){
- return null
- }
- }
- def getRelationshipVal(node, name){
- try{
- return node.'**'.find {it.'relationship-key'.text() == name}.'relationship-value'.text()
- }catch(Exception e){
- return null
- }
- }
-
-
- def log(logmode,logtxt,isDebugLogEnabled="false"){
- MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- if ("INFO"==logmode) {
- msoLogger.info(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, logtxt);
- } else if ("WARN"==logmode) {
- msoLogger.warn (MessageEnum.BPMN_GENERAL_WARNING, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logtxt);
- } else if ("ERROR"==logmode) {
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logtxt);
-
- } else {
- BPMNLogger.debug(isDebugLogEnabled, logtxt);
- }
- }
-
- def logContext(requestId, serviceInstanceId){
- MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- msoLogger.setLogContext(requestId, serviceInstanceId);
- }
-
- def logMetrics(elapsedTime, logtxt){
- MsoLogger metricsLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
-
- metricsLogger.recordMetricEvent (elapsedTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- logtxt, "BPMN", MsoLogger.getServiceName(), null);
- }
-
- def logAudit(logtxt){
- MsoLogger auditLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- long startTime = System.currentTimeMillis();
-
- auditLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logtxt);
- }
-
- // headers: header - name-value
- def getHeaderNameValue(xmlInput, nameAttribute){
- def rtn=null
- if(xmlInput!=null){
- def xml= new XmlSlurper().parseText(xmlInput)
- rtn= xml.'**'.find {header->header.'@name'.text() == nameAttribute}.'@value'
- }
- return rtn
- }
-
- /**
- * Gets the children of the specified element.
- */
- public String getChildNodes(xmlInput, element) {
- def xml= new XmlSlurper().parseText(xmlInput)
- def thisElement = xml.'**'.find {it.name() == element}
- StringBuilder out = new StringBuilder()
- if (thisElement != null) {
- thisElement.children().each() {
- String nodeAsText = removeXmlPreamble(XmlUtil.serialize(it))
- if (out.length() > 0) {
- out.append(System.lineSeparator())
- }
- out.append(nodeAsText)
- }
- }
- return out.toString();
- }
-
- /**
- * Encodes a value so it can be used inside an XML text element.
- * @param s the string to encode
- * @return the encoded string
- */
- public String xmlEncode(Object value) {
- return XmlTool.encode(value)
- }
-
- /**
- * Encodes a value so it can be used inside an XML attribute.
- * @param s the string to encode
- * @return the encoded string
- */
- public String xmlEncodeAttr(Object value) {
- return XmlTool.encodeAttr(value)
- }
-
- /**
- * Decodes XML entities in a string value
- * @param value a value with embedded XML entities
- * @return the decoded string
- */
- public String xmlDecode(Object value) {
- return XmlTool.decode(value)
- }
-
- /**
- * Removes the preamble, if present, from an XML document.
- * Also, for historical reasons, this also trims leading and trailing
- * whitespace from the resulting document. TODO: remove the trimming
- * and fix unit tests that depend on EXACT xml format.
- * @param xml the XML document
- * @return a possibly modified document
- */
- public String removeXmlPreamble(def xml) {
- if (xml == null) {
- return null
- }
-
- return XmlTool.removePreamble(xml).trim()
- }
-
- /**
- * Removes namespaces and namespace declarations from an XML document.
- * @param xml the XML document
- * @return a possibly modified document
- */
- public String removeXmlNamespaces(def xml) {
- return XmlTool.removeNamespaces(xml);
- }
-
- /**
- * Use formatXml instead. Note: this method inserts an XML preamble.
- */
- @Deprecated
- def formatXML(xmlInput) {
- def parseXml = null
- def formatXml = null
- if (xmlInput !=null) {
- parseXml = new XmlParser().parseText(xmlInput)
- formatXml = XmlUtil.serialize(parseXml)
- }
- }
-
- /**
- * Reformats an XML document. The result will not contain an XML preamble
- * or a trailing newline.
- * @param xml the XML document
- * @return a reformatted document
- */
- public String formatXml(def xml) {
- return XmlTool.normalize(xml);
- }
-
- // build single elements
- def buildElements(xmlInput, elementList, parentName) {
- String var = ""
- def xmlBuild = ""
- if (parentName != "") {
- xmlBuild += "<tns2:"+parentName+">"
- }
- if (xmlInput != null) {
- for (element in elementList) {
- def xml= new XmlSlurper().parseText(xmlInput)
- var = xml.'**'.find {it.name() == element}
- if (var != null) {
- xmlBuild += "<tns2:"+element+">"+var.toString()+"</tns2:"+element+">"
- }
- }
- }
- if (parentName != "") {
- xmlBuild += "</tns2:"+parentName+">"
- }
- return xmlBuild
- }
-
- // build the Unbounded elements
- def buildElementsUnbounded(xmlInput, elementList, parentName) {
- def varParents = ""
- def var = ""
- def xmlBuildUnbounded = ""
- if (xmlInput != null) {
- def xml= new XmlSlurper().parseText(xmlInput)
- varParents = xml.'**'.findAll {it.name() == parentName}
- //println " Unbounded ${parentName} - varParent.Size() - " + varParents.size()
- for (i in 0..varParents.size()-1) {
- if (parentName != "") {
- xmlBuildUnbounded += "<tns2:"+parentName+">"
- }
- for (element in elementList) {
- var = varParents[i].'*'.find {it.name() == element}
- if (var != null) {
- xmlBuildUnbounded += "<tns2:"+element+">"+var.toString()+"</tns2:"+element+">"
- //println " i = " + i + ", element: " + element + " = " + var.toString()
- }
- }
- if (parentName != "") {
- xmlBuildUnbounded += "</tns2:"+parentName+">"
- }
- }
- }
- return xmlBuildUnbounded
- }
-
- // Build internet-evc-access-information
- def buildInternetEvcAccessInformation(xmlInput) {
- def elementsInternetEvcAccessInformationList = ["internet-evc-speed-value", "internet-evc-speed-units", "ip-version"]
- def rebuildInternetEvcAccess = ''
- if (xmlInput != null) {
- rebuildInternetEvcAccess = buildElements(xmlInput, elementsInternetEvcAccessInformationList, "internet-evc-access-information")
- }
- return rebuildInternetEvcAccess
- }
-
- // Build internet-service-change-details
- def buildInternetServiceChangeDetails(xmlInput) {
- def rebuildInternetServiceChangeDetails = ""
- if (xmlInput != null) {
- try { // optional
- def internetServiceChangeDetails = getNodeXml(xmlInput, "internet-service-change-details").drop(38).trim()
- rebuildInternetServiceChangeDetails = "<tns:internet-service-change-details>"
- rebuildInternetServiceChangeDetails += buildElements(internetServiceChangeDetails, ["internet-evc-speed-value"], "")
- rebuildInternetServiceChangeDetails += buildElements(internetServiceChangeDetails, ["internet-evc-speed-units"], "")
- def tProvidedV4LanPublicPrefixesChangesList = ["request-index", "v4-next-hop-address", "v4-lan-public-prefix", "v4-lan-public-prefix-length"]
- rebuildInternetServiceChangeDetails += buildElementsUnbounded(internetServiceChangeDetails, tProvidedV4LanPublicPrefixesChangesList, "t-provided-v4-lan-public-prefixes")
- try { // optional
- def tProvidedV6LanPublicPrefixesChangesList = ["request-index", "v6-next-hop-address", "v6-lan-public-prefix", "v6-lan-public-prefix-length"]
- rebuildInternetServiceChangeDetails += buildElementsUnbounded(internetServiceChangeDetails, tProvidedV6LanPublicPrefixesChangesList, "t-provided-v6-lan-public-prefixes")
- } catch (Exception e) {
- log("ERROR"," Optional - Exception INTERNET-SERVICE-CHANGE-DETAILS 't-provided-v6-lan-public-prefixes ")
- }
- rebuildInternetServiceChangeDetails += "</tns:internet-service-change-details>"
- } catch (Exception e) {
- log("ERROR", " Optional - Exception INTERNET-SERVICE-CHANGE-DETAILS 'internet-service-change-details' ")
- }
- }
- return rebuildInternetServiceChangeDetails
- }
-
- // Build vr-lan
- def buildVrLan(xmlInput) {
-
- def rebuildVrLan = ''
- if (xmlInput != null) {
-
- rebuildVrLan = "<tns2:vr-lan>"
- def vrLan = getNodeXml(xmlInput, "vr-lan").drop(38).trim()
- rebuildVrLan += buildElements(vrLan, ["routing-protocol"], "")
-
- // vr-lan-interface
- def rebuildVrLanInterface = "<tns2:vr-lan-interface>"
- def vrLanInterface = getNodeXml(vrLan, "vr-lan-interface").drop(38).trim()
- rebuildVrLanInterface += buildVrLanInterfacePartial(vrLanInterface)
-
- // dhcp
- def dhcp = getNodeXml(vrLan, "dhcp").drop(38).trim()
- def rebuildDhcp = buildDhcp(dhcp)
- rebuildVrLanInterface += rebuildDhcp
-
- // pat
- def pat = getNodeXml(vrLan, "pat").drop(38).trim()
- def rebuildPat = buildPat(pat)
- rebuildVrLanInterface += rebuildPat
-
- // nat
- def rebuildNat = ""
- try { // optional
- def nat = getNodeXml(vrLan, "nat").drop(38).trim()
- rebuildNat = buildNat(nat)
- } catch (Exception e) {
- log("ERROR", " Optional - Exception 'nat' ")
- }
- rebuildVrLanInterface += rebuildNat
-
- // firewall-lite
- def firewallLite = getNodeXml(vrLan, "firewall-lite").drop(38).trim()
- def rebuildFirewallLite = buildFirewallLite(firewallLite)
- rebuildVrLanInterface += rebuildFirewallLite
-
- // static-routes
- def rebuildStaticRoutes = ""
- try { // optional
- def staticRoutes = getNodeXml(vrLan, "static-routes").drop(38).trim()
- rebuildStaticRoutes = buildStaticRoutes(staticRoutes)
- } catch (Exception e) {
- log("ERROR", " Optional - Exception 'static-routes' ")
- }
- rebuildVrLanInterface += rebuildStaticRoutes
-
- rebuildVrLan += rebuildVrLanInterface
- rebuildVrLan += "</tns2:vr-lan-interface>"
- rebuildVrLan += "</tns2:vr-lan>"
-
- }
- log("DEBUG", " rebuildVrLan - " + rebuildVrLan)
- return rebuildVrLan
- }
-
- // Build vr-lan-interface
- def buildVrLanInterfacePartial(xmlInput) {
- def rebuildingVrLanInterface = ''
- if (xmlInput != null) {
- def vrLanInterfaceList = ["vr-designation", "v4-vr-lan-prefix", "v4-vr-lan-address", "v4-vr-lan-prefix-length", "v6-vr-lan-prefix", "v6-vr-lan-address", "v6-vr-lan-prefix-length", "v4-vce-loopback-address", "v6-vce-wan-address"]
- rebuildingVrLanInterface += buildElements(xmlInput, vrLanInterfaceList, "")
- rebuildingVrLanInterface += "<tns2:v4-public-lan-prefixes>"
- try { // optional
- def tProvidedV4LanPublicPrefixes = getNodeXml(xmlInput, "v4-public-lan-prefixes").drop(38).trim()
- def tProvidedV4LanPublicPrefixesList = ["request-index", "v4-next-hop-address", "v4-lan-public-prefix", "v4-lan-public-prefix-length" ]
- rebuildingVrLanInterface += buildElementsUnbounded(xmlInput, tProvidedV4LanPublicPrefixesList, "t-provided-v4-lan-public-prefixes")
- } catch (Exception ex) {
- log("ERROR", " Optional - Exception VR-LAN INTERFACE 'v4-public-lan-prefixes' ")
- }
- rebuildingVrLanInterface += "</tns2:v4-public-lan-prefixes>"
- rebuildingVrLanInterface += "<tns2:v6-public-lan-prefixes>"
- try { // optional
- def tProvidedV6LanPublicPrefixes = getNodeXml(xmlInput, "v6-public-lan-prefixes").drop(38).trim()
- def tProvidedV6LanPublicPrefixesList = ["request-index", "v6-next-hop-address", "v6-lan-public-prefix", "v6-lan-public-prefix-length" ]
- rebuildingVrLanInterface += buildElementsUnbounded(xmlInput, tProvidedV6LanPublicPrefixesList, "t-provided-v6-lan-public-prefixes")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception VR-LAN INTERFACE 'v6-public-lan-prefixes' ")
- }
- rebuildingVrLanInterface += "</tns2:v6-public-lan-prefixes>"
- }
- log("DEBUG", " rebuildingVrLanInterface - " + rebuildingVrLanInterface)
- return rebuildingVrLanInterface
- }
-
- // Build dhcp
- def buildDhcp(xmlInput) {
- def rebuildingDhcp = ''
- if (xmlInput != null) {
- def dhcpData = new XmlSlurper().parseText(xmlInput)
- rebuildingDhcp = "<tns2:dhcp>"
- def dhcpList1 = ["v4-dhcp-server-enabled", "v6-dhcp-server-enabled", "use-v4-default-pool", "v4-dhcp-default-pool-prefix", "v4-dhcp-default-pool-prefix-length"]
- rebuildingDhcp += buildElements(xmlInput, dhcpList1, "")
- try { // optional
- def excludedV4DhcpAddressesFromDefaultPoolList = ["excluded-v4-address"]
- rebuildingDhcp += buildElementsUnbounded(xmlInput, excludedV4DhcpAddressesFromDefaultPoolList, "excluded-v4-dhcp-addresses-from-default-pool")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception DHCP 'excluded-v4-dhcp-addresses-from-default-pool' ")
- }
- try { // optional
- def v4DhcpPools = dhcpData.'**'.findAll {it.name() == "v4-dhcp-pools"}
- def v4DhcpPoolsSize = v4DhcpPools.size()
- // println " v4DhcpPoolsSize = " + v4DhcpPools.size()
- for (i in 0..v4DhcpPoolsSize-1) {
- def v4DhcpPool = v4DhcpPools[i]
- def v4DhcpPoolXml = XmlUtil.serialize(v4DhcpPool)
- rebuildingDhcp += "<tns2:v4-dhcp-pools>"
- def v4DhcpPoolsList1 = ["v4-dhcp-pool-prefix", "v4-dhcp-pool-prefix-length" ]
- rebuildingDhcp += buildElements(v4DhcpPoolXml, v4DhcpPoolsList1, "")
- try { // optional
- def excludedV4AddressesList = ["excluded-v4-address"]
- rebuildingDhcp += buildElementsUnbounded(v4DhcpPoolXml, excludedV4AddressesList, "excluded-v4-addresses")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception DHCP 'excluded-v4-addresses' ")
- }
- def v4DhcpPoolsList2 = ["v4-dhcp-relay-gateway-address", "v4-dhcp-relay-next-hop-address"]
- rebuildingDhcp += buildElements(v4DhcpPoolXml, v4DhcpPoolsList2, "")
- rebuildingDhcp += "</tns2:v4-dhcp-pools>"
- }
- } catch (Exception e) {
- log("ERROR"," Optional - Exception DHCP 'v4-dhcp-pools' ")
- }
- def dhcpList2 = ["use-v6-default-pool", "v6-dhcp-default-pool-prefix", "v6-dhcp-default-pool-prefix-length"]
- rebuildingDhcp += buildElements(xmlInput, dhcpList2, "")
- try { // optional
- def excludedV6DhcpAddressesFromDdefaultPoolList = ["excluded-v6-address"]
- rebuildingDhcp += buildElementsUnbounded(xmlInput, excludedV6DhcpAddressesFromDdefaultPoolList, "excluded-v6-dhcp-addresses-from-default-pool")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception DHCP 'excluded-v6-dhcp-addresses-from-default-pool' ")
- }
- try { // optional
- def v6DhcpPools = dhcpData.'**'.findAll {it.name() == "v6-dhcp-pools"}
- def v6DhcpPoolsSize = v6DhcpPools.size()
- //println " v6DhcpPoolsSize = " + v6DhcpPools.size()
- for (i in 0..v6DhcpPoolsSize-1) {
- def v6DhcpPool = v6DhcpPools[i]
- def v6DhcpPoolXml = XmlUtil.serialize(v6DhcpPool)
- rebuildingDhcp += "<tns2:v6-dhcp-pools>"
- def v6DhcpPoolsList1 = ["v6-dhcp-pool-prefix", "v6-dhcp-pool-prefix-length"]
- rebuildingDhcp += buildElements(v6DhcpPoolXml, v6DhcpPoolsList1, "")
- try { // optional
- def excludedV6AddressesList = ["excluded-v6-address"]
- rebuildingDhcp += buildElementsUnbounded(v6DhcpPoolXml, excludedV6AddressesList, "excluded-v6-addresses")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception DHCP 'excluded-v6-addresses' ")
- }
- def v6DhcpPoolsList2 = ["v6-dhcp-relay-gateway-address", "v6-dhcp-relay-next-hop-address"]
- rebuildingDhcp += buildElements(v6DhcpPoolXml, v6DhcpPoolsList2, "")
- rebuildingDhcp += "</tns2:v6-dhcp-pools>"
- }
- } catch (Exception e) {
- log("ERROR", " Optional - Exception DHCP 'v6-dhcp-pools' ")
- }
- rebuildingDhcp += "</tns2:dhcp>"
- }
- log("DEBUG", " rebuildingDhcp - " + rebuildingDhcp)
- return rebuildingDhcp
- }
-
- // Build pat
- def buildPat(xmlInput) {
- def rebuildingPat = ''
- if (xmlInput != null) {
- rebuildingPat = "<tns2:pat>"
- def patList = ["v4-pat-enabled", "use-v4-default-pool", "v4-pat-default-pool-prefix", "v4-pat-default-pool-prefix-length"]
- rebuildingPat += buildElements(xmlInput, patList, "")
- try { // optional
- def v4PatPools = getNodeXml(xmlInput, "v4-pat-pools").drop(38).trim()
- def v4PatPoolsList = ["v4-pat-pool-prefix", "v4-pat-pool-prefix-length", "v4-pat-pool-next-hop-address"]
- rebuildingPat += buildElementsUnbounded(xmlInput, v4PatPoolsList, "v4-pat-pools")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception 'v4-pat-pool-next-hop-address' ")
- }
- rebuildingPat += "</tns2:pat>"
- }
- log("DEBUG", " rebuildingPat - " + rebuildingPat)
- return rebuildingPat
- }
-
- // Build nat
- def buildNat(xmlInput) {
- def rebuildingNat = ''
- if (xmlInput != null) {
- rebuildingNat = "<tns2:nat>"
- rebuildingNat += buildElements(xmlInput, ["v4-nat-enabled"], "")
- try { // optional
- def v4NatMappingEntries = getNodeXml(xmlInput, "v4-nat-mapping-entries").drop(38).trim()
- def v4NatMappingEntriesList = ["v4-nat-internal", "v4-nat-next-hop-address", "v4-nat-external"]
- rebuildingNat += buildElementsUnbounded(xmlInput, v4NatMappingEntriesList, "v4-nat-mapping-entries")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception 'v4-nat-external' ")
- }
- rebuildingNat += "</tns2:nat>"
- }
- log("DEBUG", " rebuildingNat - " + rebuildingNat)
- return rebuildingNat
- }
-
- // Build firewall-lite
- def buildFirewallLite(xmlInput) {
- def rebuildingFirewallLite = ''
-
- if (xmlInput != null) {
-
- def firewallLiteData = new XmlSlurper().parseText(xmlInput)
- rebuildingFirewallLite = "<tns2:firewall-lite>"
- def firewallLiteList = ["stateful-firewall-lite-v4-enabled", "stateful-firewall-lite-v6-enabled"]
- rebuildingFirewallLite += buildElements(xmlInput, firewallLiteList, "")
-
- try { // optional
- def v4FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v4-firewall-packet-filters"}
- def v4FirewallPacketFiltersSize = v4FirewallPacketFilters.size()
- //println " v4FirewallPacketFiltersSize = " + v4FirewallPacketFilters.size()
- for (i in 0..v4FirewallPacketFiltersSize-1) {
- def v4FirewallPacketFilter = v4FirewallPacketFilters[i]
- def v4FirewallPacketFilterXml = XmlUtil.serialize(v4FirewallPacketFilter)
- rebuildingFirewallLite += "<tns2:v4-firewall-packet-filters>"
- def v4FirewallPacketFiltersList = ["v4-firewall-prefix", "v4-firewall-prefix-length", "allow-icmp-ping"]
- rebuildingFirewallLite += buildElements(v4FirewallPacketFilterXml, v4FirewallPacketFiltersList, "")
- try { // optional
- def udpPortsList = ["port-number"]
- rebuildingFirewallLite += buildElementsUnbounded(v4FirewallPacketFilterXml, udpPortsList, "udp-ports")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception FIREWALL-LITE v4 'udp-ports' ")
- }
- try { // optional
- def tcpPortsList = ["port-number"]
- rebuildingFirewallLite += buildElementsUnbounded(v4FirewallPacketFilterXml, tcpPortsList, "tcp-ports")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception FIREWALL-LITE v4 'tcp-ports' ")
- }
- rebuildingFirewallLite += "</tns2:v4-firewall-packet-filters>"
- }
- } catch (Exception e) {
- log("ERROR", " Optional - Exception FIREWALL-LITE 'v4-firewall-packet-filters' ")
- }
-
- try { // optional
- def v6FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v6-firewall-packet-filters"}
- def v6FirewallPacketFiltersSize = v6FirewallPacketFilters.size()
- //println " v6FirewallPacketFiltersSize = " + v6FirewallPacketFilters.size()
- for (i in 0..v6FirewallPacketFiltersSize-1) {
- def v6FirewallPacketFilter = v6FirewallPacketFilters[i]
- def v6FirewallPacketFilterXml = XmlUtil.serialize(v6FirewallPacketFilter)
- rebuildingFirewallLite += "<tns2:v6-firewall-packet-filters>"
- def v6FirewallPacketFiltersList = ["v6-firewall-prefix", "v6-firewall-prefix-length", "allow-icmp-ping"]
- rebuildingFirewallLite += buildElements(v6FirewallPacketFilterXml, v6FirewallPacketFiltersList, "")
- try { // optional
- def udpPortsList = ["port-number"]
- rebuildingFirewallLite += buildElementsUnbounded(v6FirewallPacketFilterXml, udpPortsList, "udp-ports")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception FIREWALL-LITE v6 'udp-ports' ")
- }
- try { // optional
- def tcpPortsList = ["port-number"]
- rebuildingFirewallLite += buildElementsUnbounded(v6FirewallPacketFilterXml, tcpPortsList, "tcp-ports")
- } catch (Exception e) {
- log("ERROR", " Optional - Exception FIREWALL-LITE v6 'tcp-ports' ")
- }
- rebuildingFirewallLite += "</tns2:v6-firewall-packet-filters>"
- }
- } catch (Exception e) {
- log("ERROR", " Optional - Exception FIREWALL-LITE 'v6-firewall-packet-filters' ")
- }
- rebuildingFirewallLite+= "</tns2:firewall-lite>"
- }
- log("DEBUG", " rebuildingFirewallLite - " + rebuildingFirewallLite)
- return rebuildingFirewallLite
- }
-
- def buildStaticRoutes(xmlInput) {
- def rebuildingStaticRoutes = ''
- if (xmlInput != null) {
- rebuildingStaticRoutes = "<tns2:static-routes>"
- def v4StaticRouteslist = ["v4-static-route-prefix","v4-static-route-prefix-length", "v4-next-hop-address"]
- rebuildingStaticRoutes += buildElementsUnbounded(xmlInput, v4StaticRouteslist, "v4-static-routes")
- def v6StaticRouteslist = ["v6-static-route-prefix","v6-static-route-prefix-length", "v6-next-hop-address"]
- rebuildingStaticRoutes += buildElementsUnbounded(xmlInput, v6StaticRouteslist, "v6-static-routes")
- rebuildingStaticRoutes += "</tns2:static-routes>"
- }
- log("DEBUG", " rebuildingStaticRoutes - " + rebuildingStaticRoutes)
- return rebuildingStaticRoutes
- }
-
- public String generateCurrentTimeInUtc(){
- final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
- final String utcTime = sdf.format(new Date());
- return utcTime;
- }
-
- public String generateCurrentTimeInGMT(){
- final SimpleDateFormat sdf = new SimpleDateFormat("E, d MMM yyyy h:m:s z");
- sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
- final String utcTime = sdf.format(new Date());
- return utcTime;
- }
-
-
- /**
- * @param encryptedAuth: encrypted credentials from urn properties
- * @param msoKey: key to use to decrypt from urn properties
- * @return base 64 encoded basic auth credentials
- */
- def getBasicAuth(encryptedAuth, msoKey){
- try {
- def auth = decrypt(encryptedAuth, msoKey)
- byte[] encoded = Base64.encodeBase64(auth.getBytes())
- String encodedString = new String(encoded)
- encodedString = "Basic " + encodedString
- return encodedString
- } catch (Exception ex) {
- log("ERROR", "Unable to encode basic auth")
- throw ex
- }
- }
-
- def encrypt(toEncrypt, msokey){
- try {
- String result = CryptoUtils.encrypt(toEncrypt, msokey);
- return result
- }
- catch (Exception e) {
- log("ERROR", "Failed to encrypt credentials")
- }
- }
-
- def decrypt(toDecrypt, msokey){
- try {
- String result = CryptoUtils.decrypt(toDecrypt, msokey);
- return result
- }
- catch (Exception e) {
- log("ERROR", "Failed to decrypt credentials")
- throw e
- }
- }
-
- /**
- * Return URL with qualified host name (if any) or urn mapping
- * @param String url from urn mapping
- * @return String url with qualified host name
- */
- public String getQualifiedHostNameForCallback(String urnCallbackUrl) {
- def callbackUrlToUse = urnCallbackUrl
- try{
- //swap host name with qualified host name from the jboss properties
- def qualifiedHostName = System.getProperty("jboss.qualified.host.name")
- if(qualifiedHostName!=null){
- log("DEBUG", "qualifiedHostName:\n" + qualifiedHostName)
- callbackUrlToUse = callbackUrlToUse.replaceAll("(http://)(.*)(:8080*)", {orig, first, torepl, last -> "${first}${qualifiedHostName}${last}"})
- }
- }catch(Exception e){
- log("DEBUG", "unable to grab qualified host name, using what's in urn properties for callbackurl. Exception was: " + e.printStackTrace())
- }
- return callbackUrlToUse
-
- }
-
- /**
- * Retrieves text context of the element if the element exists, returns empty string otherwise
- * @param com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl element to parse
- * param String tagName tagName
- * @return String text content of the element
- */
- public String getElementText(Element element, String tagName) {
- String text = ""
- org.w3c.dom.NodeList nodeList = element.getElementsByTagNameNS("*", tagName)
- if (nodeList != null && nodeList.length > 0) {
- text = nodeList.item(0).getTextContent()
- }
- return text
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import groovy.xml.XmlUtil
+
+import java.text.SimpleDateFormat
+
+import org.apache.commons.codec.binary.Base64
+import org.openecomp.mso.bpmn.core.BPMNLogger
+import org.openecomp.mso.bpmn.core.xml.XmlTool
+import org.openecomp.mso.logger.MessageEnum
+import org.openecomp.mso.logger.MsoLogger
+import org.openecomp.mso.utils.CryptoUtils
+import org.w3c.dom.Element
+
+class MsoUtils {
+ def initializeEndPoints(execution){
+ // use this placeholder to initialize end points, if called independently, this need to be set
+ execution.setVariable("AAIEndPoint","http://localhost:28080/SoapUIMocks")
+ }
+
+ /**
+ * Use getNodeText1 Instead!
+ */
+ @Deprecated
+ def getNodeText(xmlInput,element){
+ def rtn=null
+ if(xmlInput!=null){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ rtn= xml.'**'.find{node->node.name()==element}.text()
+ }
+ return rtn
+ }
+ def getMultNodes(xmlInput, element){
+ def nodes=null
+ if(xmlInput!=null){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ nodes = xml.'**'.findAll{ node-> node.name() == element }*.text()
+ }
+ return nodes
+ }
+ def getNodeText1(xmlInput,element){
+ def rtn=null
+ if(xmlInput!=null){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ rtn= xml.'**'.find{node->node.name()==element}
+ if (rtn != null){
+ rtn=rtn.text()
+ }
+ }
+ return rtn
+ }
+ def getNodeXml(xmlInput,element){
+ return getNodeXml(xmlInput, element, true)
+ }
+ def getNodeXml(xmlInput,element,incPreamble){
+ def fxml= new XmlSlurper().parseText(xmlInput)
+ def nodeToSerialize = fxml.'**'.find {it.name() == element}
+ if(nodeToSerialize==null){
+ return ""
+ }
+ def nodeAsText = XmlUtil.serialize(nodeToSerialize)
+ if (!incPreamble) {
+ nodeAsText = removeXmlPreamble(nodeAsText)
+ }
+ return nodeAsText
+ }
+ def nodeExists(xmlInput,element){
+ try {
+ def fxml= new XmlSlurper().parseText(xmlInput)
+ def nodeToSerialize = fxml.'**'.find {it.name() == element}
+ return nodeToSerialize!=null
+ } catch(Exception e) {
+ return false
+ }
+ }
+
+
+ /***** Utilities when using XmlParser *****/
+
+ /**
+ * Convert a Node into a String by deserializing it and formatting it.
+ *
+ * @param node Node to be converted.
+ * @return the Node as a String.
+ */
+ def String nodeToString(Node node) {
+ def String nodeAsString = groovy.xml.XmlUtil.serialize(node)
+ nodeAsString = removeXmlPreamble(nodeAsString)
+ return formatXml(nodeAsString)
+ }
+
+ /**
+ * Get the specified child Node of the specified parent. If there are
+ * multiple children of the same name, only the first one is returned.
+ * If there are no children with the specified name, 'null' is returned.
+ *
+ * @param parent Parent Node in which to find a child.
+ * @param childNodeName Name of the child Node to get.
+ * @return the (first) child Node with the specified name or 'null'
+ * if a child Node with the specified name does not exist.
+ */
+ def Node getChildNode(Node parent, String childNodeName) {
+ def NodeList nodeList = getIdenticalChildren(parent, childNodeName)
+ if (nodeList.size() == 0) {
+ return null
+ } else {
+ return nodeList.get(0)
+ }
+ }
+
+ /**
+ * Get the textual value of the specified child Node of the specified parent.
+ * If there are no children with the specified name, 'null' is returned.
+ *
+ * @param parent Parent Node in which to find a child.
+ * @param childNodeName Name of the child Node whose value to get.
+ * @return the textual value of child Node with the specified name or 'null'
+ * if a child Node with the specified name does not exist.
+ */
+ def String getChildNodeText(Node parent, String childNodeName) {
+ def Node childNode = getChildNode(parent, childNodeName)
+ if (childNode == null) {
+ return null
+ } else {
+ return childNode.text()
+ }
+ }
+
+ /**
+ * Get all of the child nodes from the specified parent that have the
+ * specified name. The returned NodeList could be empty.
+ *
+ * @param parent Parent Node in which to find children.
+ * @param childNodeName Name of the children to get.
+ * @return a NodeList of all the children from the parent with the specified
+ * name. The list could be empty.
+ */
+ def NodeList getIdenticalChildren(Node parent, String childNodeName) {
+ return (NodeList) parent.get(childNodeName)
+ }
+
+ /***** End of Utilities when using XmlParser *****/
+
+
+ /** these are covered under the common function above**/
+ def getSubscriberName(xmlInput,element){
+ def rtn=null
+ if(xmlInput!=null){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ rtn= xml.'**'.find{node->node.name()==element}.text()
+ }
+ return rtn
+ }
+ def getTenantInformation(xmlInput,element){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ def nodeToSerialize = xml.'**'.find {it.name() == 'service-information'}
+ def nodeAsText = XmlUtil.serialize(nodeToSerialize)
+ return nodeAsText
+ }
+ def getServiceInstanceId(xmlInput,element){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ return ( xml.'**'.find{node->node.name()==element}.text() )
+ }
+ //for aai tenant url
+ def searchResourceLink(xmlInput, resourceType){
+ def fxml= new XmlSlurper().parseText(xmlInput)
+ def element = fxml.'**'.find {it.'resource-type' == resourceType}
+ return (element == null) ? null : element.'resource-link'.text()
+ }
+
+ def searchMetaData(xmlInput, searchName, searchValue){
+ def fxml= new XmlSlurper().parseText(xmlInput)
+ def ret = fxml.'**'.find {it.metaname.text() == searchName && it.metaval.text() == searchValue}
+ if(ret != null){
+ return ret.parent().parent()
+ }
+ return ret
+ }
+
+ def searchMetaDataNode(fxml, searchName, searchValue){
+ def ret = fxml.'**'.find {it.metaname.text() == searchName && it.metaval.text() == searchValue}
+ if(ret != null){
+ return ret.parent().parent()
+ }
+ return ret
+ }
+
+ // for Trinity L3 add/delete bonding
+ def getPBGFList(isDebugLogEnabled, xmlInput){
+ xmlInput = xmlInput.replaceAll("&amp;", "&")
+ xmlInput = xmlInput.replaceAll("&lt;", "<")
+ xmlInput = xmlInput.replaceAll("&gt;", ">")
+ log("DEBUG", "getPBGFList: xmlInput " + xmlInput,isDebugLogEnabled)
+ ArrayList myNodes = new ArrayList()
+ if(nodeExists(xmlInput,"nbnc-response-information")){
+ def respInfo=getNodeXml(xmlInput,"nbnc-response-information", false)
+ if(respInfo!=null){
+ def fxml= new XmlSlurper().parseText(respInfo)
+ fxml.'virtual-datacenter-list'.each { vdc ->
+ //we only want to add two BGF per VDC, BGF1 and BGF2
+ def routerList = vdc.'router-list'.first()
+ routerList.each{ myList ->
+ def physNodes = myList.'**'.findAll {it.'border-element-tangibility'.text() =~ /PHYSICAL/}
+ def nodeToAdd
+ physNodes.each{
+ if(nodeToAdd==null){
+ nodeToAdd = it
+ }else{
+ def beid = nodeToAdd.'border-element-id'.text() +
+ " " + nodeToAdd.'border-element-type'.text() +
+ " and " +
+ it.'border-element-id'.text() +
+ " " + it.'border-element-type'.text()
+ def mytag = nodeToAdd.'border-element-id'
+ mytag[0].replaceBody(beid)
+ }
+ }
+ def mytag = nodeToAdd.'vlan-id'
+ def ind = mytag.text().indexOf('.')
+ if(ind >= 0){
+ def vlan = mytag.text().substring(0,ind)
+ mytag[0].replaceBody(vlan)
+ }
+ myNodes.add(XmlUtil.serialize(nodeToAdd))
+ }
+
+ }
+ }
+
+ return myNodes
+ }else{
+ return null
+ }
+ }
+
+ def getPBGFList(xmlInput){
+ getPBGFList("false", xmlInput)
+ }
+
+ def String decodeXML(xml) {
+ def String decodedXml = xml.replaceAll("&amp;", "&")
+ decodedXml = decodedXml.replaceAll("&lt;", "<")
+ decodedXml = decodedXml.replaceAll("&gt;", ">")
+ }
+
+ def getMetaVal(node, name){
+ try{
+ return node.'**'.find {it.metaname.text() == name}.metaval.text()
+ }catch(Exception e){
+ return null
+ }
+ }
+ def getRelationshipVal(node, name){
+ try{
+ return node.'**'.find {it.'relationship-key'.text() == name}.'relationship-value'.text()
+ }catch(Exception e){
+ return null
+ }
+ }
+
+
+ def log(logmode,logtxt,isDebugLogEnabled="false"){
+ MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ if ("INFO"==logmode) {
+ msoLogger.info(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, logtxt);
+ } else if ("WARN"==logmode) {
+ // to see the warning text displayed in the log entry, the text must also be passed as arg0 (2nd argument) to invoke the correct MsoLogger warn() method
+ msoLogger.warn (MessageEnum.BPMN_GENERAL_WARNING, logtxt, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logtxt);
+ } else if ("ERROR"==logmode) {
+ // to see the error text displayed in the log entry, the text must also be passed as arg0 (2nd argument) to invoke the correct MsoLogger error() method
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, logtxt, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logtxt);
+
+ } else {
+ BPMNLogger.debug(isDebugLogEnabled, logtxt);
+ }
+ }
+
+ def logContext(requestId, serviceInstanceId){
+ MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ msoLogger.setLogContext(requestId, serviceInstanceId);
+ }
+
+ def logMetrics(elapsedTime, logtxt){
+ MsoLogger metricsLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ metricsLogger.recordMetricEvent (elapsedTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logtxt, "BPMN", MsoLogger.getServiceName(), null);
+ }
+
+ def logAudit(logtxt){
+ MsoLogger auditLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ long startTime = System.currentTimeMillis();
+
+ auditLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logtxt);
+ }
+
+ // headers: header - name-value
+ def getHeaderNameValue(xmlInput, nameAttribute){
+ def rtn=null
+ if(xmlInput!=null){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ rtn= xml.'**'.find {header->header.'@name'.text() == nameAttribute}.'@value'
+ }
+ return rtn
+ }
+
+ /**
+ * Gets the children of the specified element.
+ */
+ public String getChildNodes(xmlInput, element) {
+ def xml= new XmlSlurper().parseText(xmlInput)
+ def thisElement = xml.'**'.find {it.name() == element}
+ StringBuilder out = new StringBuilder()
+ if (thisElement != null) {
+ thisElement.children().each() {
+ String nodeAsText = removeXmlPreamble(XmlUtil.serialize(it))
+ if (out.length() > 0) {
+ out.append(System.lineSeparator())
+ }
+ out.append(nodeAsText)
+ }
+ }
+ return out.toString();
+ }
+
+ /**
+ * Encodes a value so it can be used inside an XML text element.
+ * @param s the string to encode
+ * @return the encoded string
+ */
+ public String xmlEncode(Object value) {
+ return XmlTool.encode(value)
+ }
+
+ /**
+ * Encodes a value so it can be used inside an XML attribute.
+ * @param s the string to encode
+ * @return the encoded string
+ */
+ public String xmlEncodeAttr(Object value) {
+ return XmlTool.encodeAttr(value)
+ }
+
+ /**
+ * Decodes XML entities in a string value
+ * @param value a value with embedded XML entities
+ * @return the decoded string
+ */
+ public String xmlDecode(Object value) {
+ return XmlTool.decode(value)
+ }
+
+ /**
+ * Removes the preamble, if present, from an XML document.
+ * Also, for historical reasons, this also trims leading and trailing
+ * whitespace from the resulting document. TODO: remove the trimming
+ * and fix unit tests that depend on EXACT xml format.
+ * @param xml the XML document
+ * @return a possibly modified document
+ */
+ public String removeXmlPreamble(def xml) {
+ if (xml == null) {
+ return null
+ }
+
+ return XmlTool.removePreamble(xml).trim()
+ }
+
+ /**
+ * Removes namespaces and namespace declarations from an XML document.
+ * @param xml the XML document
+ * @return a possibly modified document
+ */
+ public String removeXmlNamespaces(def xml) {
+ return XmlTool.removeNamespaces(xml);
+ }
+
+ /**
+ * Use formatXml instead. Note: this method inserts an XML preamble.
+ */
+ @Deprecated
+ def formatXML(xmlInput) {
+ def parseXml = null
+ def formatXml = null
+ if (xmlInput !=null) {
+ parseXml = new XmlParser().parseText(xmlInput)
+ formatXml = XmlUtil.serialize(parseXml)
+ }
+ }
+
+ /**
+ * Reformats an XML document. The result will not contain an XML preamble
+ * or a trailing newline.
+ * @param xml the XML document
+ * @return a reformatted document
+ */
+ public String formatXml(def xml) {
+ return XmlTool.normalize(xml);
+ }
+
+ // build single elements
+ def buildElements(xmlInput, elementList, parentName) {
+ String var = ""
+ def xmlBuild = ""
+ if (parentName != "") {
+ xmlBuild += "<tns2:"+parentName+">"
+ }
+ if (xmlInput != null) {
+ for (element in elementList) {
+ def xml= new XmlSlurper().parseText(xmlInput)
+ var = xml.'**'.find {it.name() == element}
+ if (var != null) {
+ xmlBuild += "<tns2:"+element+">"+var.toString()+"</tns2:"+element+">"
+ }
+ }
+ }
+ if (parentName != "") {
+ xmlBuild += "</tns2:"+parentName+">"
+ }
+ return xmlBuild
+ }
+
+ // build the Unbounded elements
+ def buildElementsUnbounded(xmlInput, elementList, parentName) {
+ def varParents = ""
+ def var = ""
+ def xmlBuildUnbounded = ""
+ if (xmlInput != null) {
+ def xml= new XmlSlurper().parseText(xmlInput)
+ varParents = xml.'**'.findAll {it.name() == parentName}
+ //println " Unbounded ${parentName} - varParent.Size() - " + varParents.size()
+ for (i in 0..varParents.size()-1) {
+ if (parentName != "") {
+ xmlBuildUnbounded += "<tns2:"+parentName+">"
+ }
+ for (element in elementList) {
+ var = varParents[i].'*'.find {it.name() == element}
+ if (var != null) {
+ xmlBuildUnbounded += "<tns2:"+element+">"+var.toString()+"</tns2:"+element+">"
+ //println " i = " + i + ", element: " + element + " = " + var.toString()
+ }
+ }
+ if (parentName != "") {
+ xmlBuildUnbounded += "</tns2:"+parentName+">"
+ }
+ }
+ }
+ return xmlBuildUnbounded
+ }
+
+ // Build l2-homing-information
+ def buildL2HomingInformation(xmlInput) {
+ def elementsL2HomingList = ["evc-name", "topology", "preferred-aic-clli"]
+ def rebuildL2Home = ''
+ if (xmlInput != null) {
+ rebuildL2Home = buildElements(xmlInput, elementsL2HomingList, "l2-homing-information")
+ }
+ return rebuildL2Home
+ }
+
+ // Build internet-evc-access-information
+ def buildInternetEvcAccessInformation(xmlInput) {
+ def elementsInternetEvcAccessInformationList = ["internet-evc-speed-value", "internet-evc-speed-units", "ip-version"]
+ def rebuildInternetEvcAccess = ''
+ if (xmlInput != null) {
+ rebuildInternetEvcAccess = buildElements(xmlInput, elementsInternetEvcAccessInformationList, "internet-evc-access-information")
+ }
+ return rebuildInternetEvcAccess
+ }
+
+ // Build ucpe-vms-service-information
+ def buildUcpeVmsServiceInformation(xmlInput) {
+ def rebuildUcpeVmsServiceInformation = ''
+ if (xmlInput != null) {
+ def ucpeVmsServiceInformation = getNodeXml(xmlInput, "ucpe-vms-service-information").drop(38).trim()
+ rebuildUcpeVmsServiceInformation = "<tns2:ucpe-vms-service-information>"
+ // transport-service-information
+ rebuildUcpeVmsServiceInformation += "<tns2:transport-service-information>"
+ def transportServiceInformation = getNodeXml(ucpeVmsServiceInformation, "transport-service-information").drop(38).trim()
+ def elementsTransportServiceInformationList = ["transport-service-type"]
+ rebuildUcpeVmsServiceInformation += buildElements(transportServiceInformation, elementsTransportServiceInformationList, "")
+ try { // optional
+ def accessCircuitInfoList = ["access-circuit-id", "dual-mode"]
+ rebuildUcpeVmsServiceInformation += buildElementsUnbounded(transportServiceInformation, accessCircuitInfoList, "access-circuit-info")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception ACCESS-CIRCUIT-INFO - 'access-circuit-info' ")
+ }
+ rebuildUcpeVmsServiceInformation += "</tns2:transport-service-information>"
+ // ucpe-information
+ def elementsUcpeInformationList = ["ucpe-host-name", "ucpe-activation-code", "out-of-band-management-modem" ]
+ rebuildUcpeVmsServiceInformation += buildElements(ucpeVmsServiceInformation, elementsUcpeInformationList, "ucpe-information")
+ // vnf-list
+ rebuildUcpeVmsServiceInformation += "<tns2:vnf-list>"
+ def vnfListList = ["vnf-instance-id", "vnf-sequence-number", "vnf-type", "vnf-vendor", "vnf-model", "vnf-id", "prov-status", "operational-state", "orchestration-status", "equipment-role" ]
+ rebuildUcpeVmsServiceInformation += buildElementsUnbounded(ucpeVmsServiceInformation, vnfListList, "vnf-information")
+ rebuildUcpeVmsServiceInformation += "</tns2:vnf-list>"
+ rebuildUcpeVmsServiceInformation += "</tns2:ucpe-vms-service-information>"
+ }
+ log("DEBUG", " rebuildUcpeVmsServiceInformation - " + rebuildUcpeVmsServiceInformation)
+ return rebuildUcpeVmsServiceInformation
+ }
+
+ // Build internet-service-change-details
+ def buildInternetServiceChangeDetails(xmlInput) {
+ def rebuildInternetServiceChangeDetails = ""
+ if (xmlInput != null) {
+ try { // optional
+ def internetServiceChangeDetails = getNodeXml(xmlInput, "internet-service-change-details").drop(38).trim()
+ rebuildInternetServiceChangeDetails = "<tns:internet-service-change-details>"
+ rebuildInternetServiceChangeDetails += buildElements(internetServiceChangeDetails, ["internet-evc-speed-value"], "")
+ rebuildInternetServiceChangeDetails += buildElements(internetServiceChangeDetails, ["internet-evc-speed-units"], "")
+ try { // optional
+ def tProvidedV4LanPublicPrefixesChangesList = ["request-index", "v4-next-hop-address", "v4-lan-public-prefix", "v4-lan-public-prefix-length"]
+ rebuildInternetServiceChangeDetails += buildElementsUnbounded(internetServiceChangeDetails, tProvidedV4LanPublicPrefixesChangesList, "t-provided-v4-lan-public-prefixes")
+ } catch (Exception e) {
+ log("ERROR"," Optional - Exception in INTERNET-SERVICE-CHANGE-DETAILS 't-provided-v4-lan-public-prefixes ")
+ }
+ try { // optional
+ def tProvidedV6LanPublicPrefixesChangesList = ["request-index", "v6-next-hop-address", "v6-lan-public-prefix", "v6-lan-public-prefix-length"]
+ rebuildInternetServiceChangeDetails += buildElementsUnbounded(internetServiceChangeDetails, tProvidedV6LanPublicPrefixesChangesList, "t-provided-v6-lan-public-prefixes")
+ } catch (Exception e) {
+ log("ERROR"," Optional - Exception INTERNET-SERVICE-CHANGE-DETAILS 't-provided-v6-lan-public-prefixes ")
+ }
+ rebuildInternetServiceChangeDetails += "</tns:internet-service-change-details>"
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception INTERNET-SERVICE-CHANGE-DETAILS 'internet-service-change-details' ")
+ }
+ }
+ return rebuildInternetServiceChangeDetails
+ }
+
+ // Build vr-lan
+ def buildVrLan(xmlInput) {
+
+ def rebuildVrLan = ''
+ if (xmlInput != null) {
+
+ rebuildVrLan = "<tns2:vr-lan>"
+ def vrLan = getNodeXml(xmlInput, "vr-lan").drop(38).trim()
+ rebuildVrLan += buildElements(vrLan, ["routing-protocol"], "")
+
+ // vr-lan-interface
+ def rebuildVrLanInterface = "<tns2:vr-lan-interface>"
+ def vrLanInterface = getNodeXml(vrLan, "vr-lan-interface").drop(38).trim()
+ rebuildVrLanInterface += buildVrLanInterfacePartial(vrLanInterface)
+
+ // dhcp
+ def dhcp = getNodeXml(vrLan, "dhcp").drop(38).trim()
+ def rebuildDhcp = buildDhcp(dhcp)
+ rebuildVrLanInterface += rebuildDhcp
+
+ // pat
+ def pat = getNodeXml(vrLan, "pat").drop(38).trim()
+ def rebuildPat = buildPat(pat)
+ rebuildVrLanInterface += rebuildPat
+
+ // nat
+ def rebuildNat = ""
+ try { // optional
+ def nat = getNodeXml(vrLan, "nat").drop(38).trim()
+ rebuildNat = buildNat(nat)
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception 'nat' ")
+ }
+ rebuildVrLanInterface += rebuildNat
+
+ // firewall-lite
+ def firewallLite = getNodeXml(vrLan, "firewall-lite").drop(38).trim()
+ def rebuildFirewallLite = buildFirewallLite(firewallLite)
+ rebuildVrLanInterface += rebuildFirewallLite
+
+ // static-routes
+ def rebuildStaticRoutes = ""
+ try { // optional
+ def staticRoutes = getNodeXml(vrLan, "static-routes").drop(38).trim()
+ rebuildStaticRoutes = buildStaticRoutes(staticRoutes)
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception 'static-routes' ")
+ }
+ rebuildVrLanInterface += rebuildStaticRoutes
+
+ rebuildVrLan += rebuildVrLanInterface
+ rebuildVrLan += "</tns2:vr-lan-interface>"
+ rebuildVrLan += "</tns2:vr-lan>"
+
+ }
+ log("DEBUG", " rebuildVrLan - " + rebuildVrLan)
+ return rebuildVrLan
+ }
+
+ // Build vr-lan-interface
+ def buildVrLanInterfacePartial(xmlInput) {
+ def rebuildingVrLanInterface = ''
+ if (xmlInput != null) {
+ def vrLanInterfaceList = ["vr-designation", "v4-vr-lan-prefix", "v4-vr-lan-address", "v4-vr-lan-prefix-length", "v6-vr-lan-prefix", "v6-vr-lan-address", "v6-vr-lan-prefix-length", "v4-vce-loopback-address", "v6-vce-wan-address"]
+ rebuildingVrLanInterface += buildElements(xmlInput, vrLanInterfaceList, "")
+ rebuildingVrLanInterface += "<tns2:v4-public-lan-prefixes>"
+ try { // optional
+ def tProvidedV4LanPublicPrefixes = getNodeXml(xmlInput, "v4-public-lan-prefixes").drop(38).trim()
+ def tProvidedV4LanPublicPrefixesList = ["request-index", "v4-next-hop-address", "v4-lan-public-prefix", "v4-lan-public-prefix-length" ]
+ rebuildingVrLanInterface += buildElementsUnbounded(xmlInput, tProvidedV4LanPublicPrefixesList, "t-provided-v4-lan-public-prefixes")
+ } catch (Exception ex) {
+ log("ERROR", " Optional - Exception VR-LAN INTERFACE 'v4-public-lan-prefixes' ")
+ }
+ rebuildingVrLanInterface += "</tns2:v4-public-lan-prefixes>"
+ rebuildingVrLanInterface += "<tns2:v6-public-lan-prefixes>"
+ try { // optional
+ def tProvidedV6LanPublicPrefixes = getNodeXml(xmlInput, "v6-public-lan-prefixes").drop(38).trim()
+ def tProvidedV6LanPublicPrefixesList = ["request-index", "v6-next-hop-address", "v6-lan-public-prefix", "v6-lan-public-prefix-length" ]
+ rebuildingVrLanInterface += buildElementsUnbounded(xmlInput, tProvidedV6LanPublicPrefixesList, "t-provided-v6-lan-public-prefixes")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception VR-LAN INTERFACE 'v6-public-lan-prefixes' ")
+ }
+ rebuildingVrLanInterface += "</tns2:v6-public-lan-prefixes>"
+ }
+ log("DEBUG", " rebuildingVrLanInterface - " + rebuildingVrLanInterface)
+ return rebuildingVrLanInterface
+ }
+
+ // Build dhcp
+ def buildDhcp(xmlInput) {
+ def rebuildingDhcp = ''
+ if (xmlInput != null) {
+ def dhcpData = new XmlSlurper().parseText(xmlInput)
+ rebuildingDhcp = "<tns2:dhcp>"
+ def dhcpList1 = ["v4-dhcp-server-enabled", "v6-dhcp-server-enabled", "use-v4-default-pool", "v4-dhcp-default-pool-prefix", "v4-dhcp-default-pool-prefix-length"]
+ rebuildingDhcp += buildElements(xmlInput, dhcpList1, "")
+ try { // optional
+ def excludedV4DhcpAddressesFromDefaultPoolList = ["excluded-v4-address"]
+ rebuildingDhcp += buildElementsUnbounded(xmlInput, excludedV4DhcpAddressesFromDefaultPoolList, "excluded-v4-dhcp-addresses-from-default-pool")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception DHCP 'excluded-v4-dhcp-addresses-from-default-pool' ")
+ }
+ try { // optional
+ def v4DhcpPools = dhcpData.'**'.findAll {it.name() == "v4-dhcp-pools"}
+ def v4DhcpPoolsSize = v4DhcpPools.size()
+ // println " v4DhcpPoolsSize = " + v4DhcpPools.size()
+ for (i in 0..v4DhcpPoolsSize-1) {
+ def v4DhcpPool = v4DhcpPools[i]
+ def v4DhcpPoolXml = XmlUtil.serialize(v4DhcpPool)
+ rebuildingDhcp += "<tns2:v4-dhcp-pools>"
+ def v4DhcpPoolsList1 = ["v4-dhcp-pool-prefix", "v4-dhcp-pool-prefix-length" ]
+ rebuildingDhcp += buildElements(v4DhcpPoolXml, v4DhcpPoolsList1, "")
+ try { // optional
+ def excludedV4AddressesList = ["excluded-v4-address"]
+ rebuildingDhcp += buildElementsUnbounded(v4DhcpPoolXml, excludedV4AddressesList, "excluded-v4-addresses")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception DHCP 'excluded-v4-addresses' ")
+ }
+ def v4DhcpPoolsList2 = ["v4-dhcp-relay-gateway-address", "v4-dhcp-relay-next-hop-address"]
+ rebuildingDhcp += buildElements(v4DhcpPoolXml, v4DhcpPoolsList2, "")
+ rebuildingDhcp += "</tns2:v4-dhcp-pools>"
+ }
+ } catch (Exception e) {
+ log("ERROR"," Optional - Exception DHCP 'v4-dhcp-pools' ")
+ }
+ def dhcpList2 = ["use-v6-default-pool", "v6-dhcp-default-pool-prefix", "v6-dhcp-default-pool-prefix-length"]
+ rebuildingDhcp += buildElements(xmlInput, dhcpList2, "")
+ try { // optional
+ def excludedV6DhcpAddressesFromDdefaultPoolList = ["excluded-v6-address"]
+ rebuildingDhcp += buildElementsUnbounded(xmlInput, excludedV6DhcpAddressesFromDdefaultPoolList, "excluded-v6-dhcp-addresses-from-default-pool")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception DHCP 'excluded-v6-dhcp-addresses-from-default-pool' ")
+ }
+ try { // optional
+ def v6DhcpPools = dhcpData.'**'.findAll {it.name() == "v6-dhcp-pools"}
+ def v6DhcpPoolsSize = v6DhcpPools.size()
+ //println " v6DhcpPoolsSize = " + v6DhcpPools.size()
+ for (i in 0..v6DhcpPoolsSize-1) {
+ def v6DhcpPool = v6DhcpPools[i]
+ def v6DhcpPoolXml = XmlUtil.serialize(v6DhcpPool)
+ rebuildingDhcp += "<tns2:v6-dhcp-pools>"
+ def v6DhcpPoolsList1 = ["v6-dhcp-pool-prefix", "v6-dhcp-pool-prefix-length"]
+ rebuildingDhcp += buildElements(v6DhcpPoolXml, v6DhcpPoolsList1, "")
+ try { // optional
+ def excludedV6AddressesList = ["excluded-v6-address"]
+ rebuildingDhcp += buildElementsUnbounded(v6DhcpPoolXml, excludedV6AddressesList, "excluded-v6-addresses")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception DHCP 'excluded-v6-addresses' ")
+ }
+ def v6DhcpPoolsList2 = ["v6-dhcp-relay-gateway-address", "v6-dhcp-relay-next-hop-address"]
+ rebuildingDhcp += buildElements(v6DhcpPoolXml, v6DhcpPoolsList2, "")
+ rebuildingDhcp += "</tns2:v6-dhcp-pools>"
+ }
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception DHCP 'v6-dhcp-pools' ")
+ }
+ rebuildingDhcp += "</tns2:dhcp>"
+ }
+ log("DEBUG", " rebuildingDhcp - " + rebuildingDhcp)
+ return rebuildingDhcp
+ }
+
+ // Build pat
+ def buildPat(xmlInput) {
+ def rebuildingPat = ''
+ if (xmlInput != null) {
+ rebuildingPat = "<tns2:pat>"
+ def patList = ["v4-pat-enabled", "use-v4-default-pool", "v4-pat-default-pool-prefix", "v4-pat-default-pool-prefix-length"]
+ rebuildingPat += buildElements(xmlInput, patList, "")
+ try { // optional
+ def v4PatPools = getNodeXml(xmlInput, "v4-pat-pools").drop(38).trim()
+ def v4PatPoolsList = ["v4-pat-pool-prefix", "v4-pat-pool-prefix-length", "v4-pat-pool-next-hop-address"]
+ rebuildingPat += buildElementsUnbounded(xmlInput, v4PatPoolsList, "v4-pat-pools")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception 'v4-pat-pool-next-hop-address' ")
+ }
+ rebuildingPat += "</tns2:pat>"
+ }
+ log("DEBUG", " rebuildingPat - " + rebuildingPat)
+ return rebuildingPat
+ }
+
+ // Build nat
+ def buildNat(xmlInput) {
+ def rebuildingNat = ''
+ if (xmlInput != null) {
+ rebuildingNat = "<tns2:nat>"
+ rebuildingNat += buildElements(xmlInput, ["v4-nat-enabled"], "")
+ try { // optional
+ def v4NatMappingEntries = getNodeXml(xmlInput, "v4-nat-mapping-entries").drop(38).trim()
+ def v4NatMappingEntriesList = ["v4-nat-internal", "v4-nat-next-hop-address", "v4-nat-external"]
+ rebuildingNat += buildElementsUnbounded(xmlInput, v4NatMappingEntriesList, "v4-nat-mapping-entries")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception 'v4-nat-external' ")
+ }
+ rebuildingNat += "</tns2:nat>"
+ }
+ log("DEBUG", " rebuildingNat - " + rebuildingNat)
+ return rebuildingNat
+ }
+
+ // Build firewall-lite
+ def buildFirewallLite(xmlInput) {
+ def rebuildingFirewallLite = ''
+
+ if (xmlInput != null) {
+
+ def firewallLiteData = new XmlSlurper().parseText(xmlInput)
+ rebuildingFirewallLite = "<tns2:firewall-lite>"
+ def firewallLiteList = ["stateful-firewall-lite-v4-enabled", "stateful-firewall-lite-v6-enabled"]
+ rebuildingFirewallLite += buildElements(xmlInput, firewallLiteList, "")
+
+ try { // optional
+ def v4FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v4-firewall-packet-filters"}
+ def v4FirewallPacketFiltersSize = v4FirewallPacketFilters.size()
+ //println " v4FirewallPacketFiltersSize = " + v4FirewallPacketFilters.size()
+ for (i in 0..v4FirewallPacketFiltersSize-1) {
+ def v4FirewallPacketFilter = v4FirewallPacketFilters[i]
+ def v4FirewallPacketFilterXml = XmlUtil.serialize(v4FirewallPacketFilter)
+ rebuildingFirewallLite += "<tns2:v4-firewall-packet-filters>"
+ def v4FirewallPacketFiltersList = ["v4-firewall-prefix", "v4-firewall-prefix-length", "allow-icmp-ping"]
+ rebuildingFirewallLite += buildElements(v4FirewallPacketFilterXml, v4FirewallPacketFiltersList, "")
+ try { // optional
+ def udpPortsList = ["port-number"]
+ rebuildingFirewallLite += buildElementsUnbounded(v4FirewallPacketFilterXml, udpPortsList, "udp-ports")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception FIREWALL-LITE v4 'udp-ports' ")
+ }
+ try { // optional
+ def tcpPortsList = ["port-number"]
+ rebuildingFirewallLite += buildElementsUnbounded(v4FirewallPacketFilterXml, tcpPortsList, "tcp-ports")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception FIREWALL-LITE v4 'tcp-ports' ")
+ }
+ rebuildingFirewallLite += "</tns2:v4-firewall-packet-filters>"
+ }
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception FIREWALL-LITE 'v4-firewall-packet-filters' ")
+ }
+
+ try { // optional
+ def v6FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v6-firewall-packet-filters"}
+ def v6FirewallPacketFiltersSize = v6FirewallPacketFilters.size()
+ //println " v6FirewallPacketFiltersSize = " + v6FirewallPacketFilters.size()
+ for (i in 0..v6FirewallPacketFiltersSize-1) {
+ def v6FirewallPacketFilter = v6FirewallPacketFilters[i]
+ def v6FirewallPacketFilterXml = XmlUtil.serialize(v6FirewallPacketFilter)
+ rebuildingFirewallLite += "<tns2:v6-firewall-packet-filters>"
+ def v6FirewallPacketFiltersList = ["v6-firewall-prefix", "v6-firewall-prefix-length", "allow-icmp-ping"]
+ rebuildingFirewallLite += buildElements(v6FirewallPacketFilterXml, v6FirewallPacketFiltersList, "")
+ try { // optional
+ def udpPortsList = ["port-number"]
+ rebuildingFirewallLite += buildElementsUnbounded(v6FirewallPacketFilterXml, udpPortsList, "udp-ports")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception FIREWALL-LITE v6 'udp-ports' ")
+ }
+ try { // optional
+ def tcpPortsList = ["port-number"]
+ rebuildingFirewallLite += buildElementsUnbounded(v6FirewallPacketFilterXml, tcpPortsList, "tcp-ports")
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception FIREWALL-LITE v6 'tcp-ports' ")
+ }
+ rebuildingFirewallLite += "</tns2:v6-firewall-packet-filters>"
+ }
+ } catch (Exception e) {
+ log("ERROR", " Optional - Exception FIREWALL-LITE 'v6-firewall-packet-filters' ")
+ }
+ rebuildingFirewallLite+= "</tns2:firewall-lite>"
+ }
+ log("DEBUG", " rebuildingFirewallLite - " + rebuildingFirewallLite)
+ return rebuildingFirewallLite
+ }
+
+ def buildStaticRoutes(xmlInput) {
+ def rebuildingStaticRoutes = ''
+ if (xmlInput != null) {
+ rebuildingStaticRoutes = "<tns2:static-routes>"
+ def v4StaticRouteslist = ["v4-static-route-prefix","v4-static-route-prefix-length", "v4-next-hop-address"]
+ rebuildingStaticRoutes += buildElementsUnbounded(xmlInput, v4StaticRouteslist, "v4-static-routes")
+ def v6StaticRouteslist = ["v6-static-route-prefix","v6-static-route-prefix-length", "v6-next-hop-address"]
+ rebuildingStaticRoutes += buildElementsUnbounded(xmlInput, v6StaticRouteslist, "v6-static-routes")
+ rebuildingStaticRoutes += "</tns2:static-routes>"
+ }
+ log("DEBUG", " rebuildingStaticRoutes - " + rebuildingStaticRoutes)
+ return rebuildingStaticRoutes
+ }
+
+ public String generateCurrentTimeInUtc(){
+ final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+ final String utcTime = sdf.format(new Date());
+ return utcTime;
+ }
+
+ public String generateCurrentTimeInGMT(){
+ final SimpleDateFormat sdf = new SimpleDateFormat("E, d MMM yyyy h:m:s z");
+ sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
+ final String utcTime = sdf.format(new Date());
+ return utcTime;
+ }
+
+
+ /**
+ * @param encryptedAuth: encrypted credentials from urn properties
+ * @param msoKey: key to use to decrypt from urn properties
+ * @return base 64 encoded basic auth credentials
+ */
+ def getBasicAuth(encryptedAuth, msoKey){
+ try {
+ def auth = decrypt(encryptedAuth, msoKey)
+ byte[] encoded = Base64.encodeBase64(auth.getBytes())
+ String encodedString = new String(encoded)
+ encodedString = "Basic " + encodedString
+ return encodedString
+ } catch (Exception ex) {
+ log("ERROR", "Unable to encode basic auth")
+ throw ex
+ }
+ }
+
+ def encrypt(toEncrypt, msokey){
+ try {
+ String result = CryptoUtils.encrypt(toEncrypt, msokey);
+ return result
+ }
+ catch (Exception e) {
+ log("ERROR", "Failed to encrypt credentials")
+ }
+ }
+
+ def decrypt(toDecrypt, msokey){
+ try {
+ String result = CryptoUtils.decrypt(toDecrypt, msokey);
+ return result
+ }
+ catch (Exception e) {
+ log("ERROR", "Failed to decrypt credentials")
+ throw e
+ }
+ }
+
+ /**
+ * Return URL with qualified host name (if any) or urn mapping
+ * @param String url from urn mapping
+ * @return String url with qualified host name
+ */
+ public String getQualifiedHostNameForCallback(String urnCallbackUrl) {
+ def callbackUrlToUse = urnCallbackUrl
+ try{
+ //swap host name with qualified host name from the jboss properties
+ def qualifiedHostName = System.getProperty("jboss.qualified.host.name")
+ if(qualifiedHostName!=null){
+ log("DEBUG", "qualifiedHostName:\n" + qualifiedHostName)
+ callbackUrlToUse = callbackUrlToUse.replaceAll("(http://)(.*)(:28080*)", {orig, first, torepl, last -> "${first}${qualifiedHostName}${last}"})
+ }
+ }catch(Exception e){
+ log("DEBUG", "unable to grab qualified host name, using what's in urn properties for callbackurl. Exception was: " + e.printStackTrace())
+ }
+ return callbackUrlToUse
+
+ }
+
+ /**
+ * Retrieves text context of the element if the element exists, returns empty string otherwise
+ * @param com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl element to parse
+ * param String tagName tagName
+ * @return String text content of the element
+ */
+ public String getElementText(Element element, String tagName) {
+ String text = ""
+ org.w3c.dom.NodeList nodeList = element.getElementsByTagNameNS("*", tagName)
+ if (nodeList != null && nodeList.length > 0) {
+ text = nodeList.item(0).getTextContent()
+ }
+ return text
+ }
+
+ /**
+ *
+ * Find the lowest unused module-index value in a given xml
+ */
+ public String getLowestUnusedIndex(String xml) {
+ if (xml == null || xml.isEmpty()) {
+ return "0"
+ }
+ def moduleIndexList = getMultNodes(xml, "module-index")
+ if (moduleIndexList == null || moduleIndexList.size() == 0) {
+ return "0"
+ }
+ def sortedModuleIndexList = moduleIndexList.sort { a, b -> a.compareTo b }
+
+ for (i in 0..sortedModuleIndexList.size()-1) {
+ if (Integer.parseInt(sortedModuleIndexList[i]) != i) {
+ return i.toString()
+ }
+ }
+ return sortedModuleIndexList.size().toString()
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/NetworkUtils.groovy
index 7d2c53dc47..3ff2863d54 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/NetworkUtils.groovy
@@ -1,1325 +1,1491 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import org.apache.commons.lang3.*
-
-import groovy.xml.XmlUtil
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-import javax.xml.transform.Transformer
-import javax.xml.transform.TransformerFactory
-import javax.xml.transform.TransformerException
-import javax.xml.transform.dom.DOMSource
-import javax.xml.transform.stream.StreamResult
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-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 org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-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
-
-
-/**
- * This groovy class supports the any Network processes that need the methods defined here.
- */
-class NetworkUtils {
-
- public MsoUtils utils = new MsoUtils()
- private AbstractServiceTaskProcessor taskProcessor
-
- public NetworkUtils(AbstractServiceTaskProcessor taskProcessor) {
- this.taskProcessor = taskProcessor
- }
-
-
- /**
- * This method returns the string for Network request
- * V2 for Contrail 3.x will populate cloud-region data in same cloudSiteId filed
- * Network adapter will handle it properly
- * @param requestId either 'request-id' or 'att-mso-request-id'
- * @param requestInput the request in the process
- * @param queryIdResponse the response of REST AAI query by Id
- * @param routeCollection the collection
- * @param policyFqdns the policy
- * @param tableCollection the collection
- * @param cloudRegionId the cloud-region-region
- * @return String request
- */
- def CreateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyFqdns, tableCollection, cloudRegionId, backoutOnFailure, source) {
- String createNetworkRequest = null
- if(requestInput!=null && queryIdResponse!=null) {
- String serviceInstanceId = ""
- String sharedValue = ""
- String externalValue = ""
-
- if (source == "VID") {
- sharedValue = utils.getNodeText1(queryIdResponse, "is-shared-network") != null ? utils.getNodeText1(queryIdResponse, "is-shared-network") : "false"
- externalValue = utils.getNodeText1(queryIdResponse, "is-external-network") != null ? utils.getNodeText1(queryIdResponse, "is-external-network") : "false"
- serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id")
-
- } else { // source = 'PORTAL'
- sharedValue = getParameterValue(requestInput, "shared")
- externalValue = getParameterValue(requestInput, "external")
- serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id") != null ? utils.getNodeText1(requestInput, "service-instance-id") : ""
- }
-
- String networkParams = ""
- if (utils.nodeExists(requestInput, "network-params")) {
- String netParams = utils.getNodeXml(requestInput, "network-params", false).replace("tag0:","").replace(":tag0","")
- networkParams = buildParams(netParams)
- }
-
- String failIfExists = "false"
- // requestInput
- String cloudRegion = cloudRegionId
- String tenantId = utils.getNodeText1(requestInput, "tenant-id")
-
- // queryIdResponse
- String networkName = utils.getNodeText1(queryIdResponse, "network-name")
- String networkId = utils.getNodeText1(queryIdResponse, "network-id")
- String networkType = utils.getNodeText1(queryIdResponse, "network-type")
-
- // rebuild subnets
- String subnets = ""
- if (utils.nodeExists(queryIdResponse, "subnets")) {
- def subnetsGroup = utils.getNodeXml(queryIdResponse, "subnets", false)
- subnets = buildSubnets(subnetsGroup)
- }
-
- String physicalNetworkName = ""
- physicalNetworkName = utils.getNodeText1(queryIdResponse, "physical-network-name")
-
- String vlansCollection = buildVlans(queryIdResponse)
-
- 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?
-
- createNetworkRequest = """
- <createNetworkRequest>
- <cloudSiteId>${cloudRegion}</cloudSiteId>
- <tenantId>${tenantId}</tenantId>
- <networkId>${networkId}</networkId>
- <networkName>${networkName}</networkName>
- <networkType>${networkType}</networkType>
- <networkTechnology>CONTRAIL</networkTechnology>
- <providerVlanNetwork>
- <physicalNetworkName>${physicalNetworkName}</physicalNetworkName >
- ${vlansCollection}
- </providerVlanNetwork>
- <contrailNetwork>
- <shared>${sharedValue}</shared>
- <external>${externalValue}</external>
- ${routeCollection}
- ${policyFqdns}
- ${tableCollection}
- </contrailNetwork>
- ${subnets}
- <skipAAI>true</skipAAI>
- <backout>${backoutOnFailure}</backout>
- <failIfExists>${failIfExists}</failIfExists>
- ${networkParams}
- <msoRequest>
- <requestId>${requestId}</requestId>
- <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
- </msoRequest>
- <messageId>${messageId}</messageId>
- <notificationUrl>${notificationUrl}</notificationUrl>
- </createNetworkRequest>
- """.trim()
- }
- return createNetworkRequest
-
- }
-
- /**
- * This method returns the string for Network request
- * V2 for Contrail 3.x will populate cloud-region data in same cloudSiteId filed
- * Network adapter will handle it properly
- * @param requestId either 'request-id' or 'att-mso-request-id'
- * @param requestInput the request in the process
- * @param queryIdResponse the response of REST AAI query by Id
- * @param routeCollection the collection
- * @param policyFqdns the policy
- * @param cloudRegionId the cloud-region-region
- * @return String request
- */
- def UpdateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyFqdns, tableCollection, cloudRegionId, backoutOnFailure, source) {
- String updateNetworkRequest = null
- if(requestInput!=null && queryIdResponse!=null) {
- String serviceInstanceId = ""
- String sharedValue = ""
- String externalValue = ""
-
- if (source == "VID") {
- sharedValue = utils.getNodeText1(queryIdResponse, "is-shared-network") != null ? utils.getNodeText1(queryIdResponse, "is-shared-network") : "false"
- externalValue = utils.getNodeText1(queryIdResponse, "is-external-network") != null ? utils.getNodeText1(queryIdResponse, "is-external-network") : "false"
- serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id")
-
- } else { // source = 'PORTAL'
- sharedValue = getParameterValue(requestInput, "shared")
- externalValue = getParameterValue(requestInput, "external")
- serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id") != null ? utils.getNodeText1(requestInput, "service-instance-id") : ""
- }
-
- String failIfExists = "false"
- // requestInput
- String cloudRegion = cloudRegionId
- String tenantId = utils.getNodeText1(requestInput, "tenant-id")
-
- // queryIdResponse
- String networkName = utils.getNodeText1(queryIdResponse, "network-name")
- String networkId = utils.getNodeText1(queryIdResponse, "network-id")
- String networkType = utils.getNodeText1(queryIdResponse, "network-type")
-
- // rebuild subnets
- String subnets = ""
- if (utils.nodeExists(queryIdResponse, "subnets")) {
- def subnetsGroup = utils.getNodeXml(queryIdResponse, "subnets", false)
- subnets = buildSubnets(subnetsGroup)
- }
-
- String networkParams = ""
- if (utils.nodeExists(requestInput, "network-params")) {
- String netParams = utils.getNodeXml(requestInput, "network-params", false).replace("tag0:","").replace(":tag0","")
- networkParams = buildParams(netParams)
- }
-
- String networkStackId = utils.getNodeText1(queryIdResponse, "heat-stack-id")
- if (networkStackId == 'null' || networkStackId == "" || networkStackId == null) {
- networkStackId = "force_update"
- }
-
- String physicalNetworkName = utils.getNodeText1(queryIdResponse, "physical-network-name")
- String vlansCollection = buildVlans(queryIdResponse)
-
- updateNetworkRequest =
- """<updateNetworkRequest>
- <cloudSiteId>${cloudRegion}</cloudSiteId>
- <tenantId>${tenantId}</tenantId>
- <networkId>${networkId}</networkId>
- <networkStackId>${networkStackId}</networkStackId>
- <networkName>${networkName}</networkName>
- <networkType>${networkType}</networkType>
- <networkTypeVersion/>
- <networkTechnology>CONTRAIL</networkTechnology>
- <providerVlanNetwork>
- <physicalNetworkName>${physicalNetworkName}</physicalNetworkName>
- ${vlansCollection}
- </providerVlanNetwork>
- <contrailNetwork>
- <shared>${sharedValue}</shared>
- <external>${externalValue}</external>
- ${routeCollection}
- ${policyFqdns}
- ${tableCollection}
- </contrailNetwork>
- ${subnets}
- <skipAAI>true</skipAAI>
- <backout>${backoutOnFailure}</backout>
- <failIfExists>${failIfExists}</failIfExists>
- ${networkParams}
-
- <msoRequest>
- <requestId>${requestId}</requestId>
- <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
- </msoRequest>
- <messageId>${messageId}</messageId>
- <notificationUrl></notificationUrl>
- </updateNetworkRequest>""".trim()
-
- }
- return updateNetworkRequest
-
- }
-
- /**
- * This method returns the string for Create Volume Request payload
- * @param groupId the volume-group-id
- * @param volumeName the volume-group-name
- * @param vnfType the vnf-type
- * @param tenantId the value of relationship-key 'tenant.tenant-id'
- * @return String request payload
- */
- def String CreateNetworkVolumeRequest(groupId, volumeName, vnfType, tenantId) {
-
- String requestPayload =
- """<volume-group xmlns="http://org.openecomp.aai.inventory/v6">
- <volume-group-id>${groupId}</volume-group-id>
- <volume-group-name>${volumeName}</volume-group-name>
- <heat-stack-id></heat-stack-id>
- <vnf-type>${vnfType}</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>${tenantId}</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </volume-group>"""
-
- return requestPayload
- }
-
- def String createCloudRegionVolumeRequest(groupId, volumeName, vnfType, tenantId, cloudRegion, namespace) {
-
- String requestPayload =
- """<volume-group xmlns="${namespace}">
- <volume-group-id>${groupId}</volume-group-id>
- <volume-group-name>${volumeName}</volume-group-name>
- <heat-stack-id></heat-stack-id>
- <vnf-type>${vnfType}</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>${tenantId}</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>${cloudRegion}</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </volume-group>"""
-
- return requestPayload
- }
-
- def String createCloudRegionVolumeRequest(groupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace) {
-
- String requestPayload =
- """<volume-group xmlns="${namespace}">
- <volume-group-id>${groupId}</volume-group-id>
- <volume-group-name>${volumeName}</volume-group-name>
- <heat-stack-id></heat-stack-id>
- <vnf-type>${vnfType}</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>generic-vnf</related-to>
- <relationship-data>
- <relationship-key>generic-vnf.vnf-id</relationship-key>
- <relationship-value>${vnfId}</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>${tenantId}</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>${cloudRegion}</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </volume-group>"""
-
- return requestPayload
- }
-
-
- /**
- * This method returns the string for Update Volume Request payload
- * @param requeryAAIVolGrpNameResponse the response of query volume group name (in AAI)
- * @param heatStackId the value of heat stack id
- * @return String request payload
- */
- def String updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, heatStackId, namespace) {
- String requestPayload = ""
- if (requeryAAIVolGrpNameResponse != null) {
- def groupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
- def volumeName = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-name")
- def vnfType = utils.getNodeText(requeryAAIVolGrpNameResponse, "vnf-type")
- def resourceVersion = utils.getNodeText(requeryAAIVolGrpNameResponse, "resource-version")
- def relationshipList = ""
- if (utils.nodeExists(requeryAAIVolGrpNameResponse, "relationship")) {
- relationshipList = rebuildRelationship(requeryAAIVolGrpNameResponse)
- }
-
- requestPayload =
- """<volume-group xmlns="${namespace}">
- <volume-group-id>${groupId}</volume-group-id>
- <volume-group-name>${volumeName}</volume-group-name>
- <heat-stack-id>${heatStackId}</heat-stack-id>
- <vnf-type>${vnfType}</vnf-type>
- <orchestration-status>Active</orchestration-status>
- <resource-version>${resourceVersion}</resource-version>
- ${relationshipList}
- </volume-group>"""
- }
-
- return requestPayload
- }
-
-
- /**
- * This method returns the string for Update Volume Request payload
- * @param requeryAAIVolGrpNameResponse the response of query volume group name (in AAI)
- * @param heatStackId the value of heat stack id
- * @return String request payload
- */
- def String UpdateNetworkVolumeRequest(requeryAAIVolGrpNameResponse, heatStackId) {
- String requestPayload = ""
- if (requeryAAIVolGrpNameResponse != null) {
- def groupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
- def volumeName = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-name")
- def vnfType = utils.getNodeText(requeryAAIVolGrpNameResponse, "vnf-type")
- def resourceVersion = utils.getNodeText(requeryAAIVolGrpNameResponse, "resource-version")
- def relationshipList = ""
- if (utils.nodeExists(requeryAAIVolGrpNameResponse, "relationship")) {
- relationshipList = rebuildRelationship(requeryAAIVolGrpNameResponse)
- }
-
- requestPayload =
- """<volume-group xmlns="http://org.openecomp.aai.inventory/v6">
- <volume-group-id>${groupId}</volume-group-id>
- <volume-group-name>${volumeName}</volume-group-name>
- <heat-stack-id>${heatStackId}</heat-stack-id>
- <vnf-type>${vnfType}</vnf-type>
- <orchestration-status>Active</orchestration-status>
- <resource-version>${resourceVersion}</resource-version>
- ${relationshipList}
- </volume-group>"""
- }
-
- return requestPayload
- }
-
- /**
- * This method returns the string for Create Contrail Network payload
- * @param requeryIdAAIResponse the response from AAI query by id
- * @param createNetworkResponse the response of create network
- * @return String contrailNetworkCreatedUpdate
- */
- def ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion) {
-
- String contrailNetworkCreatedUpdate = ""
- if(requeryIdAAIResponse!=null && createNetworkResponse!=null) {
-
- def l3Network = utils.getNodeXml(requeryIdAAIResponse, "l3-network", false).replace("tag0:","").replace(":tag0","")
- def createNetworkContrailResponse = ""
- if (utils.nodeExists(createNetworkResponse, 'createNetworkResponse')) {
- createNetworkContrailResponse = utils.getNodeXml(createNetworkResponse, "createNetworkResponse", false).replace("tag0:","").replace(":tag0","")
- } else {
- createNetworkContrailResponse = utils.getNodeXml(createNetworkResponse, "updateNetworkContrailResponse", false).replace("tag0:","").replace(":tag0","")
- }
-
- // rebuild network
- def networkList = ["network-id", "network-name", "network-type", "network-role", "network-technology", "neutron-network-id", "is-bound-to-vpn", "service-id", "network-role-instance", "resource-version", "resource-model-uuid", "orchestration-status", "heat-stack-id", "mso-catalog-key", "contrail-network-fqdn",
- "physical-network-name", "is-provider-network", "is-shared-network", "is-external-network"]
- String rebuildNetworkElements = buildNetworkElements(l3Network, createNetworkContrailResponse, networkList)
-
- // rebuild 'subnets'
- def rebuildSubnetList = ""
- if (utils.nodeExists(requeryIdAAIResponse, 'subnet')) {
- rebuildSubnetList = buildSubnets(requeryIdAAIResponse, createNetworkResponse)
- }
-
- // rebuild 'segmentation-assignments'
- def rebuildSegmentationAssignments = ""
- if (utils.nodeExists(requeryIdAAIResponse, 'segmentation-assignments')) {
- List elementList = ["segmentation-id"]
- rebuildSegmentationAssignments = buildXMLElements(requeryIdAAIResponse, "", "segmentation-assignments", elementList)
- }
-
- // rebuild 'ctag-assignments' / rebuildCtagAssignments
- def rebuildCtagAssignmentsList = ""
- if (utils.nodeExists(requeryIdAAIResponse, 'ctag-assignment')) {
- rebuildCtagAssignmentsList = rebuildCtagAssignments(requeryIdAAIResponse)
- }
-
- // rebuild 'relationship'
- def relationshipList = ""
- if (utils.nodeExists(requeryIdAAIResponse, 'relationship-list')) {
- String rootRelationshipData = getFirstNodeXml(requeryIdAAIResponse, "relationship-list").drop(38).trim().replace("tag0:","").replace(":tag0","")
- if (utils.nodeExists(rootRelationshipData, 'relationship')) {
- relationshipList = rebuildRelationship(rootRelationshipData)
- }
- }
-
- //Check for optional contrail network fqdn within CreateNetworkResponse
- String contrailNetworkFQDN
- if(utils.nodeExists(createNetworkResponse, "contrail-network-fqdn")){
- contrailNetworkFQDN = utils.getNodeXml(createNetworkResponse, "contrail-network-fqdn")
- contrailNetworkFQDN = utils.removeXmlNamespaces(contrailNetworkFQDN)
- contrailNetworkFQDN = utils.removeXmlPreamble(contrailNetworkFQDN)
- }else{
- contrailNetworkFQDN = ""
- }
-
- contrailNetworkCreatedUpdate =
- """<l3-network xmlns="${schemaVersion}">
- ${rebuildNetworkElements}
- ${rebuildSubnetList}
- ${rebuildSegmentationAssignments}
- ${rebuildCtagAssignmentsList}
- ${relationshipList}
- ${contrailNetworkFQDN}
- </l3-network>""".trim()
-
- }
- return contrailNetworkCreatedUpdate
- }
-
-
-
- /**
- * This method returns the value for the name paramName.
- * Ex: <network-params>
- * <param name="shared">1</param>
- * <param name="external">0</external>
- * </network-params>
- *
- * @param xmlInput the XML document
- * @param paramName the param name (ex: 'shared')
- * @return a param value for 'shared' (ex: '1')
- */
- def getParameterValue(xmlInput, paramName) {
- def rtn=""
- if(xmlInput!=null){
- def xml= new XmlSlurper().parseText(xmlInput)
- rtn= xml.'**'.find {param->param.'@name'.text() == paramName}
- }
- if (rtn==null) {
- return ""
- } else {
- return rtn
- }
- }
-
- /**
- * This method returns the name of param if found/match with paramName.
- * Ex: <network-params>
- * <param name="shared">1</param>
- * <param name="external">0</external>
- * </network-params>
- *
- * @param xmlInput the XML document
- * @param paramName the param name (ex: 'shared', )
- * @return a param name for 'shared' (ex: 'shared' if found)
- */
- def getParameterName(xmlInput, paramName) {
- def rtn=""
- if(xmlInput!=null){
- def xml= new XmlSlurper().parseText(xmlInput)
- try {
- rtn= xml.'**'.find {param->param.'@name' == paramName}.'@name'
- } catch (Exception ex) {
- rtn=""
- }
- }
- if (rtn==null || rtn=="") {
- return ""
- } else {
- return rtn
- }
- }
-
- /**
- * This method returns the networkParams xml string.
- * Ex: input:
- * <network-params>
- * <param name="shared">1</param>
- * <param name="external">0</external>
- * </network-params>
- *
- * Sample result:
- * <networkParams>
- * <shared>1</shared>
- * <external>0</external>
- * </networkParams>
- *
- */
-
- def buildParams(networkParams) {
- def build = ""
- def netParams = new XmlParser().parseText(networkParams)
- try {
- def paramsList = netParams.'**'.findAll {param->param.'@name'}.'@name'
- if (paramsList.size() > 0) {
- build += "<networkParams>"
- for (i in 0..paramsList.size()-1) {
- def name = netParams.'**'.find {param->param.'@name' == paramsList[i]}.'@name'
- def value= netParams.'**'.find {param->param.'@name' == paramsList[i]}.text()
- build += "<${name}>${value}</${name}>"
- }
- build += "</networkParams>"
- }
-
- } catch (Exception ex) {
- println ' buildParams error - ' + ex.getMessage()
- build = ""
- }
- return build
- }
-
- def getVlans(xmlInput) {
- def rtn = ""
- if (xmlInput!=null) {
- def vlansList = getListWithElements(xmlInput, 'vlans')
- def vlansListSize = vlansList.size()
- if (vlansListSize > 0) {
- for (i in 0..vlansListSize-1) {
- rtn += '<vlans>'+vlansList[i]+'</vlans>'
- }
- }
- }
- return rtn
-
-
- }
-
- /**
- * This method returns the uri value for the vpn bindings.
- * Return the a list of value of vpn binding in the <related-link> string.
- * Ex.
- * <relationship-list>
- * <relationship>
- * <related-to>vpn-binding</related-to>
- * <related-link>https://aai-app-e2e.test.att.com:8443/aai/v6/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-ext1.test.att.com:8443/aai/v6/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>
- * @param xmlInput the XML document
- * @return a list of vpn binding values
- * ex: ['aai/v6/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', 'aai/v6/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/']
- *
- **/
- def getVnfBindingObject(xmlInput) {
- //def rtn = null
- List rtn = []
- if (xmlInput!=null) {
- def relationshipList = getListWithElements(xmlInput, 'relationship')
- def relationshipListSize = relationshipList.size()
- if (relationshipListSize > 0) {
- for (i in 0..relationshipListSize-1) {
- def relationshipXml = XmlUtil.serialize(relationshipList[i])
- if (utils.getNodeText(relationshipXml, 'related-to') == "vpn-binding") {
- def relatedLink = utils.getNodeText(relationshipXml, 'related-link')
- if (relatedLink != null || relatedLink != "") {
- rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
- }
- }
- }
- }
- }
- return rtn
- }
- /**
- * similar to VNF bindings method
- * @param xmlInput the XML document
- * @return a list of network policy values
- * ex: ['aai/v$/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg', 'aai/v$/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg']
- *
- **/
- def getNetworkPolicyObject(xmlInput) {
- //def rtn = null
- List rtn = []
- if (xmlInput!=null) {
- def relationshipList = getListWithElements(xmlInput, 'relationship')
- def relationshipListSize = relationshipList.size()
- if (relationshipListSize > 0) {
- for (i in 0..relationshipListSize-1) {
- def relationshipXml = XmlUtil.serialize(relationshipList[i])
- if (utils.getNodeText(relationshipXml, 'related-to') == "network-policy") {
- def relatedLink = utils.getNodeText(relationshipXml, 'related-link')
- if (relatedLink != null || relatedLink != "") {
- rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
- }
- }
- }
- }
- }
- return rtn
- }
-
- /**
- * similar to network policymethod
- * @param xmlInput the XML document
- * @return a list of network policy values
- * ex: ['aai/v$/network/route-table-references/route-table-reference/refFQDN1', 'aai/v$/network/route-table-references/route-table-reference/refFQDN2']
- *
- **/
- def getNetworkTableRefObject(xmlInput) {
- //def rtn = null
- List rtn = []
- if (xmlInput!=null) {
- def relationshipList = getListWithElements(xmlInput, 'relationship')
- def relationshipListSize = relationshipList.size()
- if (relationshipListSize > 0) {
- for (i in 0..relationshipListSize-1) {
- def relationshipXml = XmlUtil.serialize(relationshipList[i])
- if (utils.getNodeText(relationshipXml, 'related-to') == "route-table-reference") {
- def relatedLink = utils.getNodeText1(relationshipXml, 'related-link')
- if (relatedLink != null || relatedLink != "") {
- rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
- }
- }
- }
- }
- }
- return rtn
- }
-
-
- def isVfRelationshipExist(xmlInput) {
- Boolean rtn = false
- if (xmlInput!=null) {
- def relationshipList = getListWithElements(xmlInput, 'relationship')
- def relationshipListSize = relationshipList.size()
- if (relationshipListSize > 0) {
- for (i in 0..relationshipListSize-1) {
- def relationshipXml = XmlUtil.serialize(relationshipList[i])
- if (utils.getNodeText(relationshipXml, 'related-to') == "vf-module") {
- rtn = true
- }
- }
- }
- }
- return rtn
-
- }
-
- def isInstanceValueMatch(linkResource, globalSubscriberId, serviceType) {
- Boolean rtn = false
- try {
- String globalSubscriberIdLink = linkResource.substring(linkResource.indexOf("/customer/")+10, linkResource.indexOf("/service-subscriptions"))
- String serviceTypeLink = linkResource.substring(linkResource.indexOf("/service-subscription/")+22, linkResource.indexOf("/service-instances"))
- if (globalSubscriberIdLink == globalSubscriberId) {
- rtn = true
- } else {
- if (serviceTypeLink == serviceType) {
- rtn = true
- }
- }
-
- } catch (Exception ex) {
- println 'Exception - ' + ex.getMessage()
- return false
- }
- return rtn
- }
-
- def getListWithElements(xmlInput, groupName) {
- def rtn = ""
- if (xmlInput != null) {
- def relationshipData = new XmlSlurper().parseText(xmlInput)
- rtn = relationshipData.'**'.findAll {it.name() == groupName}
- }
- return rtn
-
- }
-
- // build network single elements
- def buildNetworkElements(l3Network, createNetworkContrailResponse, networkList) {
- def replaceNetworkId = ""
- def replaceNeutronNetworkId = ""
- def replaceContrailNetworkFqdn = ""
- if (l3Network != null && createNetworkContrailResponse != null) {
- if (utils.nodeExists(l3Network, 'heat-stack-id')) {
- replaceNetworkId = utils.getNodeText(l3Network, 'heat-stack-id')
- } else {
- if (utils.nodeExists(createNetworkContrailResponse, 'networkStackId')) {
- replaceNetworkId = utils.getNodeText(createNetworkContrailResponse, 'networkStackId')
- }
- }
- if (utils.nodeExists(l3Network, 'neutron-network-id')) {
- replaceNeutronNetworkId = utils.getNodeText(l3Network, 'neutron-network-id')
- } else {
- if (utils.nodeExists(createNetworkContrailResponse, 'neutronNetworkId')) {
- replaceNeutronNetworkId = utils.getNodeText(createNetworkContrailResponse, 'neutronNetworkId')
- }
- }
- if (utils.nodeExists(l3Network, 'contrail-network-fqdn')) {
- replaceContrailNetworkFqdn = utils.getNodeText(l3Network, 'contrail-network-fqdn')
- } else {
- if (utils.nodeExists(createNetworkContrailResponse, 'networkFqdn')) {
- replaceContrailNetworkFqdn = utils.getNodeText(createNetworkContrailResponse, 'networkFqdn')
- }
- }
- }
-
- String var = ""
- def xmlNetwork = ""
- if (l3Network != null) {
- for (element in networkList) {
- def xml= new XmlSlurper().parseText(l3Network)
- var = xml.'**'.find {it.name() == element}
- if (var == null) {
- if (element=="orchestration-status") {
- xmlNetwork += "<"+element+">"+"active"+"</"+element+">"
- }
- if (element=="heat-stack-id") {
- if (replaceNetworkId != "") {
- xmlNetwork += "<"+element+">"+replaceNetworkId+"</"+element+">"
- }
- }
- if (element=="neutron-network-id") {
- if (replaceNeutronNetworkId != "") {
- xmlNetwork += "<"+element+">"+replaceNeutronNetworkId+"</"+element+">"
- }
- }
- if (element=="contrail-network-fqdn") {
- if (replaceContrailNetworkFqdn != "") {
- xmlNetwork += "<"+element+">"+replaceContrailNetworkFqdn+"</"+element+">"
- }
- }
-
- } else {
- if (element=="orchestration-status") {
- xmlNetwork += "<"+element+">"+"active"+"</"+element+">"
- } else {
- xmlNetwork += "<"+element+">"+var.toString()+"</"+element+">"
- }
- }
-
- }
- }
- return xmlNetwork
- }
-
- def buildSubnets(requeryIdAAIResponse, createNetworkResponse) {
- def rebuildingSubnets = ""
- if (requeryIdAAIResponse != null && utils.nodeExists(requeryIdAAIResponse, 'subnets')) {
- def subnetIdMapValue = ""
- def subnetsGroup = utils.getNodeXml(requeryIdAAIResponse, "subnets", false)
- def subnetsData = new XmlSlurper().parseText(subnetsGroup)
- rebuildingSubnets += "<subnets>"
- try {
- def subnets = subnetsData.'**'.findAll {it.name() == "subnet"}
- def subnetsSize = subnets.size()
- for (i in 0..subnetsSize-1) {
- def subnet = subnets[i]
- def subnetXml = XmlUtil.serialize(subnet)
- def subnetList = ["subnet-id", "neutron-subnet-id", "gateway-address", "network-start-address", "cidr-mask", "ip-version", "orchestration-status", "dhcp-enabled", "dhcp-start", "dhcp-end", "resource-version", "subnet-name"]
- rebuildingSubnets += buildSubNetworkElements(subnetXml, createNetworkResponse, subnetList, "subnet")
- }
- if (utils.nodeExists(subnetsData, 'relationship')) {
- rebuildingSubnets = rebuildRelationship(requeryIdAAIResponse)
- }
-
- } catch (Exception ex) {
- // error
- } finally {
- rebuildingSubnets += "</subnets>"
- }
- }
- return rebuildingSubnets
- }
-
- def buildSubnets(queryIdResponse) {
- def rebuildingSubnets = ""
- def subnetsData = new XmlSlurper().parseText(queryIdResponse)
- //rebuildingSubnets += "<subnets>"
- try {
- def subnets = subnetsData.'**'.findAll {it.name() == "subnet"}
- def subnetsSize = subnets.size()
- for (i in 0..subnetsSize-1) {
- def subnet = subnets[i]
- def subnetXml = XmlUtil.serialize(subnet)
- def subnetList = ["dhcp-start", "dhcp-end", "network-start-address", "cidr-mask", "dhcp-enabled", "gateway-address", "ip-version", "subnet-id", "subnet-name"]
- rebuildingSubnets += buildSubNetworkElements(subnetXml, subnetList, "subnets")
- //rebuildingSubnets += buildSubNetworkElements(subnetXml, subnetList, "")
- }
- } catch (Exception ex) {
- //
- } finally {
- //rebuildingSubnets += "</subnets>"
- }
- return rebuildingSubnets
- }
-
-
- // build subnet sub-network single elements
- def buildSubNetworkElements(subnetXml, createNetworkResponse, elementList, parentName) {
- String var = ""
- def xmlBuild = ""
- if (parentName != "") {
- xmlBuild += "<"+parentName+">"
- }
- if (subnetXml != null) {
- for (element in elementList) {
- def xml= new XmlSlurper().parseText(subnetXml)
- var = xml.'**'.find {it.name() == element}
- if (var != null) {
- if (element=="orchestration-status") {
- xmlBuild += "<"+element+">"+"active"+"</"+element+">"
- } else { // "subnet-id", "neutron-subnet-id"
- if (element=="subnet-id") {
- if (utils.nodeExists(createNetworkResponse, "subnetMap")) {
- xmlBuild += "<"+element+">"+var.toString()+"</"+element+">"
- String neutronSubnetId = extractNeutSubId(createNetworkResponse, var.toString())
- xmlBuild += "<neutron-subnet-id>"+neutronSubnetId+"</neutron-subnet-id>"
- }
- } else {
- if (element=="neutron-subnet-id") {
- // skip
- } else {
- xmlBuild += "<"+element+">"+var.toString()+"</"+element+">"
- }
- }
- }
- }
- }
-
- }
- if (parentName != "") {
- xmlBuild += "</"+parentName+">"
- }
- return xmlBuild
- }
-
- // build subnet sub-network single elements
- def buildSubNetworkElements(subnetXml, elementList, parentName) {
- def var = ""
- def xmlBuild = ""
- if (parentName != "") {
- xmlBuild += "<"+parentName+">"
- }
- if (subnetXml != null) {
- def networkStartAddress = ""
- for (element in elementList) {
- def xml= new XmlSlurper().parseText(subnetXml)
- var = xml.'**'.find {it.name() == element}
- if (element == "dhcp-start") {
- xmlBuild += "<allocationPools>"
- if (var.toString() == 'null') {
- xmlBuild += "<start>"+""+"</start>"
- } else {
- xmlBuild += "<start>"+var.toString()+"</start>"
- }
- }
- if (element == "dhcp-end") {
- if (var.toString() == 'null') {
- xmlBuild += "<end>"+""+"</end>"
- } else {
- xmlBuild += "<end>"+var.toString()+"</end>"
- }
- xmlBuild += "</allocationPools>"
- }
- if (element == "network-start-address" || element == "cidr-mask") {
- if (element == "network-start-address") {
- networkStartAddress = var.toString()
- }
- if (element == "cidr-mask") {
- xmlBuild += "<cidr>"+networkStartAddress+"/"+var.toString()+"</cidr>"
- }
- }
- if (element == "dhcp-enabled") {
- xmlBuild += "<enableDHCP>"+var.toString()+"</enableDHCP>"
- }
- if (element == "gateway-address") {
- xmlBuild += "<gatewayIp>"+var.toString()+"</gatewayIp>"
- }
- if (element == "ip-version") {
- xmlBuild += "<ipVersion>"+var.toString()+"</ipVersion>"
- }
- if (element == "subnet-id") {
- xmlBuild += "<subnetId>"+var.toString()+"</subnetId>"
- }
- if ((element == "subnet-name") && (var != null)) {
- xmlBuild += "<subnetName>"+var.toString()+"</subnetName>"
- }
- }
- }
- if (parentName != "") {
- xmlBuild += "</"+parentName+">"
- }
- return xmlBuild
- }
-
- // rebuild ctag-assignments
- def rebuildCtagAssignments(xmlInput) {
- def rebuildingCtagAssignments = ""
- if (xmlInput!=null) {
- def ctagAssignmentsData = new XmlSlurper().parseText(xmlInput)
- rebuildingCtagAssignments += "<ctag-assignments>"
- def ctagAssignments = ctagAssignmentsData.'**'.findAll {it.name() == "ctag-assignment"}
- def ctagAssignmentsSize = ctagAssignments.size()
- for (i in 0..ctagAssignmentsSize-1) {
- def ctagAssignment = ctagAssignments[i]
- def ctagAssignmentXml = XmlUtil.serialize(ctagAssignment)
- rebuildingCtagAssignments += "<ctag-assignment>"
- List elementList = ["vlan-id-inner", "resource-version"]
- rebuildingCtagAssignments += buildXMLElements(ctagAssignmentXml, "" , "", elementList)
- if (utils.nodeExists(ctagAssignmentXml, 'relationship')) {
- rebuildingCtagAssignments += rebuildRelationship(ctagAssignmentXml)
- }
- rebuildingCtagAssignments += "</ctag-assignment>"
- }
- rebuildingCtagAssignments += "</ctag-assignments>"
- }
- return rebuildingCtagAssignments
- }
-
- // rebuild 'relationship-list'
- def rebuildRelationship(xmlInput) {
- def rebuildingSubnets = ""
- if (xmlInput!=null) {
- def subnetsData = new XmlSlurper().parseText(xmlInput)
- rebuildingSubnets += "<relationship-list>"
- def relationships = subnetsData.'**'.findAll {it.name() == "relationship"}
- def relationshipsSize = relationships.size()
- for (i in 0..relationshipsSize-1) {
- def relationship = relationships[i]
- def relationshipXml = XmlUtil.serialize(relationship)
- rebuildingSubnets += "<relationship>"
- def relationshipList = ["related-to", "related-link"]
- rebuildingSubnets += buildSubNetworkElements(relationshipXml, "", relationshipList, "")
- if (utils.nodeExists(relationshipXml, 'relationship-data')) {
- def relationshipDataXmlData = new XmlSlurper().parseText(relationshipXml)
- def relationshipsData = relationshipDataXmlData.'**'.findAll {it.name() == "relationship-data"}
- def relationshipsDataSize = relationshipsData.size()
- for (j in 0..relationshipsDataSize-1) {
- def relationshipData = relationshipsData[j]
- def relationshipDataXml = XmlUtil.serialize(relationshipData)
- def relationshipDataList = ["relationship-key", "relationship-value"]
- rebuildingSubnets += buildXMLElements(relationshipDataXml, "", "relationship-data", relationshipDataList)
- }
- }
- if (utils.nodeExists(relationshipXml, 'related-to-property')) {
- def relationshipDataXmlData = new XmlSlurper().parseText(relationshipXml)
- def relationshipsData = relationshipDataXmlData.'**'.findAll {it.name() == "related-to-property"}
- def relationshipsDataSize = relationshipsData.size()
- for (j in 0..relationshipsDataSize-1) {
- def relationshipData = relationshipsData[j]
- def relationshipDataXml = XmlUtil.serialize(relationshipData)
- def relationshipDataList = ["property-key", "property-value"]
- rebuildingSubnets += buildXMLElements(relationshipDataXml, "", "related-to-property", relationshipDataList)
- }
- }
-
- rebuildingSubnets += "</relationship>"
- }
- rebuildingSubnets += "</relationship-list>"
- }
- return rebuildingSubnets
- }
-
- def buildVlans(queryIdResponse) {
- def rebuildingSubnets = "<vlans>"
- def subnetsData = new XmlSlurper().parseText(queryIdResponse)
-
- try {
- def subnets = subnetsData.'**'.findAll {it.name() == "segmentation-assignments"}
- def subnetsSize = subnets.size()
- for (i in 0..subnetsSize-1) {
- def subnet = subnets[i]
- def subnetXml = XmlUtil.serialize(subnet)
-
- String vlan = utils.getNodeText1(subnetXml, "segmentation-id")
- if (i>0){
- rebuildingSubnets += ","
- }
- rebuildingSubnets += vlan
- }
- } catch (Exception ex) {
- //
- } finally {
- //rebuildingSubnets += "</subnets>"
- rebuildingSubnets += "</vlans>"
- }
- return rebuildingSubnets
- }
-
- /* Utility code to rebuild xml/elements in a list:
- * rebuild xml with 1) unbounded groups of elements; or
- * 2) one group of elements; or
- * 3) just one or more elements (in a list as argument)
- * @param xmlInput the XML document
- * @param parentName the parent name (ex: 'inputs')
- * @param childrenName the chilrendName (ex: 'entry' as unbounded/occurs>1)
- * @param elementList the element list of children (ex: 'key', 'value')
- * @return a string of rebuild xml
- *
- * Ex 1: xmlInput:
- * <ws:inputs>
- * <ws:entry>
- * <ws:key>name</ws:key>
- * <ws:value>Edward</ws:value>
- * </ws:entry>
- * <ws:entry>
- * <ws:key>age</ws:key>
- * <ws:value>30</ws:value>
- * </ws:entry>
- * <ws:entry>
- * <ws:key>age</ws:key>
- * <ws:value>30</ws:value>
- * </ws:entry>
- * <ws:/inputs>
- * Usage:
- * List elementList = ["key", "value"]
- * String rebuild = buildXMLElements(xmlInput, "inputs", "entry", elementList)
- *
- * Ex 2: xmlInput // no parent tag
- * <ws:sdnc-request-header>
- * <ws:svc-request-id>fec8ec88-151a-45c9-ad60-8233e0fc8ff2</ws:svc-request-id>
- * <ws:svc-notification-url>https://msojra.mtsnj.aic.cip.att.com:8443/adapters/rest/SDNCNotify</ws:svc-notification-url>
- * <ws:svc-action>assign</ws:svc-action>
- * </ws:sdnc-request-header>
- * Usage:
- * List elementList = ["svc-request-id", "svc-notification-url", "svc-action"]
- * String rebuild = buildXMLElements(xmlInput, "" , "sdnc-request-header", elementList) // no parent tag
- *
- * Ex 3: xmlInput // elements one after another (with no parent & children tag)
- * <ws:test-id>myTestid</ws:test-id>
- * <ws:test-user>myUser</ws:test-user>
- * Usage:
- * List elementList = ["test-id", "test-user"]
- * String rebuild = buildXMLElements(xmlInput, "" , "", elementList)
- *
- */
- def buildXMLElements(xmlInput, parentName, childrenName, elementList) {
- def varChildren = ""
- def var = ""
- def xmlBuildUnbounded = ""
- if (parentName!="") {xmlBuildUnbounded += "<"+parentName+">" +'\n'}
- if (xmlInput != null) {
- def xml= new XmlSlurper().parseText(xmlInput)
- if (childrenName!="") {
- varChildren = xml.'**'.findAll {it.name() == childrenName}
- for (i in 0..varChildren.size()-1) {
- xmlBuildUnbounded += "<"+childrenName+">" +'\n'
- for (element in elementList) {
- var = varChildren[i].'*'.find {it.name() == element}
- if (var != null) {
- xmlBuildUnbounded += "<"+element+">"+var.toString()+"</"+element+">" +'\n'
- }
- }
- xmlBuildUnbounded += "</"+childrenName+">" +'\n'
- }
- } else {
- for (element in elementList) {
- var = xml.'*'.find {it.name() == element}
- if (var != null) {
- xmlBuildUnbounded += "<"+element+">"+var.toString()+"</"+element+">" +'\n'
- }
- }
- }
-
- }
- if (parentName!="") {xmlBuildUnbounded += "</"+parentName+">" +'\n'}
- return xmlBuildUnbounded
- }
-
- def getFirstNodeXml(xmlInput, element){
- def nodeAsText = ""
- def nodeToSerialize = ""
- if (xmlInput != null) {
- def fxml= new XmlSlurper().parseText(xmlInput)
- if (utils.nodeExists(xmlInput, "payload")) {
- nodeToSerialize = fxml.'payload'.'l3-network'.'*'.find {it.name() == element}
- if (nodeToSerialize!=null) {
- nodeAsText = XmlUtil.serialize(nodeToSerialize)
- } else {
- nodeAsText = ""
- }
-
- } else {
- nodeToSerialize = fxml.'*'.find {it.name() == element}
- if (nodeToSerialize!=null) {
- nodeAsText = XmlUtil.serialize(nodeToSerialize)
- } else {
- nodeAsText = ""
- }
-
- }
- }
- return nodeAsText
-
- }
-
-//TODO: This method still needs to be tested before using.
- /**
- * This method is similar to the gennetwork:ContrailNetworUpdateCompletedObject
- * BPEL method. It extracts all of the required subnet information
- * for each subnet listed with an orch status equal to the one provided
- * and puts the corresponding infomation with the appropriate node for
- * updating aai. The method sets the orch status for each subnet to active
- *
- * @param subnetsXml the entire subnets xml
- * @param requestInput the request in the process
- * @param queryIdResponse the response of REST AAI query by Id
- * @param queryVpnBindingResponse the response of REST AAI query by vpn binding
- * @param routeCollection the collection of vpnBinding's 'global-route-target'
- * @return String request
- */
- public String networkUpdateSubnetInfo(String subnetsXml, String networkResponseXml){
-
- String subnets = ""
- StringBuilder sb = new StringBuilder()
- InputSource source = new InputSource(new StringReader(subnetsXml));
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- docFactory.setNamespaceAware(true)
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
- Document xml = docBuilder.parse(source)
- NodeList nodeList = xml.getElementsByTagNameNS("*", "subnet")
- for (int x = 0; x < nodeList.getLength(); x++) {
- Node node = nodeList.item(x)
- String subnet = ""
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- String subnetOrchStatus = eElement.getElementsByTagNameNS("*", "orchestration-status").item(0).getTextContent()
- if(subnetOrchStatus.equals("pending-create")){
-
- String subnetId = eElement.getElementsByTagNameNS("*", "subnet-id").item(0).getTextContent()
- def netAddress = eElement.getElementsByTagNameNS("*", "network-start-address").item(0).getTextContent()
- def mask = eElement.getElementsByTagNameNS("*", "cidr-mask").item(0).getTextContent()
- def dhcpEnabledSubnet = eElement.getElementsByTagNameNS("*", "dhcp-enabled").item(0).getTextContent()
- def gatewayAddress = eElement.getElementsByTagNameNS("*", "gateway-address").item(0).getTextContent()
- def ipVersion = eElement.getElementsByTagNameNS("*", "ip-version").item(0).getTextContent()
- def relationshipList = eElement.getElementsByTagNameNS("*", "relationship-list").item(0).getTextContent() //TODO: test this
- String neutronSubnetId = extractNeutSubId(networkResponseXml, subnetId)
- subnet =
- """<subnet>
- <subnetId>${subnetId}</subnetId>
- <neutron-subnet-id>${neutronSubnetId}</neutron-subnet-id>
- <gateway-address>${gatewayAddress}</gateway-address>
- <network-start-address>${netAddress}</network-start-address>
- <cidr-mask>${mask}</cidr-mask>
- <ip-Version>${ipVersion}</ip-Version>
- <orchestration-status>active</orchestration-status>
- <dhcp-enabled>${dhcpEnabledSubnet}</dhcp-enabled>
- <relationship-list>${relationshipList}</relationship-list>
- </subnet>"""
-
- }else if(subnetOrchStatus.equals("pending-delete")){
- StringWriter writer = new StringWriter()
- Transformer transformer = TransformerFactory.newInstance().newTransformer()
- transformer.transform(new DOMSource(node), new StreamResult(writer))
- subnet = writer.toString()
-
- }else{
- subnet = ""
- }
- }
- subnets = sb.append(subnet)
- }
-
- subnets = utils.removeXmlPreamble(subnets)
-
- String subnetsList =
- """<subnets>
- ${subnets}
- </subnets>"""
-
- return subnetsList
- }
-
-
- /**
- * This method extracts the "value" node text for the the given subnet Id.
- *
- * @param String inputSource - xml that contains the subnet id key and value
- * @param String subnetId - for which you want the value of
-
- * @return String value - node text of node named value associated with the given subnet id
- */
- public String extractNeutSubId(String inputSource, String subnetId){
-
- String value = ""
- InputSource source = new InputSource(new StringReader(inputSource));
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- docFactory.setNamespaceAware(true)
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
- Document xml = docBuilder.parse(source)
- NodeList nodeList = xml.getElementsByTagNameNS("*", "entry")
- for (int x = 0; x < nodeList.getLength(); x++) {
- Node node = nodeList.item(x)
- String subnet = ""
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- String key = eElement.getElementsByTagNameNS("*", "key").item(0).getTextContent()
- if(key.equals(subnetId)){
- value = eElement.getElementsByTagNameNS("*", "value").item(0).getTextContent()
- }
- }
- }
- return value
- }
-
- public boolean isRollbackEnabled (Execution execution, String payloadXml) {
-
- boolean rollbackEnabled = false
- boolean rollbackValueSet = false
- if (utils.nodeExists(payloadXml, "backout-on-failure")) {
- String backoutValue = utils.getNodeText1(payloadXml, "backout-on-failure")
- if (backoutValue != null && !backoutValue.isEmpty()) {
- if (backoutValue.equalsIgnoreCase("false")) {
- rollbackEnabled = false
- }
- else {
- rollbackEnabled = true
- }
- rollbackValueSet = true;
- }
- }
-
- if (!rollbackValueSet) {
- rollbackEnabled = execution.getVariable("URN_mso_rollback")
- }
- return rollbackEnabled
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import org.apache.commons.lang3.*
+
+import groovy.xml.XmlUtil
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+import javax.xml.transform.Transformer
+import javax.xml.transform.TransformerFactory
+import javax.xml.transform.TransformerException
+import javax.xml.transform.dom.DOMSource
+import javax.xml.transform.stream.StreamResult
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+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 org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+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
+
+
+/**
+ * This groovy class supports the any Network processes that need the methods defined here.
+ */
+class NetworkUtils {
+
+ public MsoUtils utils = new MsoUtils()
+ private AbstractServiceTaskProcessor taskProcessor
+
+ public NetworkUtils(AbstractServiceTaskProcessor taskProcessor) {
+ this.taskProcessor = taskProcessor
+ }
+
+ /**
+ * This method returns the string for Network request
+ * V2 for Contrail 3.x will populate cloud-region data in same cloudSiteId filed
+ * Network adapter will handle it properly
+ * @param requestId either 'request-id' or 'mso-request-id'
+ * @param requestInput the request in the process
+ * @param queryIdResponse the response of REST AAI query by Id
+ * @param routeCollection the collection
+ * @param policyFqdns the policy
+ * @param tableCollection the collection
+ * @param cloudRegionId the cloud-region-region
+ * @return String request
+ */
+ def CreateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyFqdns, tableCollection, cloudRegionId, backoutOnFailure, source) {
+ String createNetworkRequest = null
+ if(requestInput!=null && queryIdResponse!=null) {
+ String serviceInstanceId = ""
+ String sharedValue = ""
+ String externalValue = ""
+
+ if (source == "VID") {
+ sharedValue = utils.getNodeText1(queryIdResponse, "is-shared-network") != null ? utils.getNodeText1(queryIdResponse, "is-shared-network") : "false"
+ externalValue = utils.getNodeText1(queryIdResponse, "is-external-network") != null ? utils.getNodeText1(queryIdResponse, "is-external-network") : "false"
+ serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id")
+
+ } else { // source = 'PORTAL'
+ sharedValue = getParameterValue(requestInput, "shared")
+ externalValue = getParameterValue(requestInput, "external")
+ serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id") != null ? utils.getNodeText1(requestInput, "service-instance-id") : ""
+ }
+
+ String networkParams = ""
+ if (utils.nodeExists(requestInput, "network-params")) {
+ String netParams = utils.getNodeXml(requestInput, "network-params", false).replace("tag0:","").replace(":tag0","")
+ networkParams = buildParams(netParams)
+ }
+
+ String failIfExists = "false"
+ // requestInput
+ String cloudRegion = cloudRegionId
+ String tenantId = utils.getNodeText1(requestInput, "tenant-id")
+ String networkType = ""
+ if (utils.nodeExists(requestInput, "networkModelInfo")) {
+ String networkModelInfo = utils.getNodeXml(requestInput, "networkModelInfo", false).replace("tag0:","").replace(":tag0","")
+ networkType = utils.getNodeText1(networkModelInfo, "modelName")
+ } else {
+ networkType = utils.getNodeText1(queryIdResponse, "network-type")
+ }
+
+ // queryIdResponse
+ String networkName = utils.getNodeText1(queryIdResponse, "network-name")
+ String networkId = utils.getNodeText1(queryIdResponse, "network-id")
+ String networkTechnology = utils.getNodeText1(queryIdResponse, "network-technology")
+
+ // contrailNetwork - networkTechnology = 'Contrail' vs. 'AIC_SR_IOV')
+ String contrailNetwork = ""
+ if (networkTechnology.contains('Contrail') || networkTechnology.contains('contrail') || networkTechnology.contains('CONTRAIL')) {
+ contrailNetwork = """<contrailNetwork>
+ <shared>${sharedValue}</shared>
+ <external>${externalValue}</external>
+ ${routeCollection}
+ ${policyFqdns}
+ ${tableCollection}
+ </contrailNetwork>"""
+ networkTechnology = "CONTRAIL" // replace
+ }
+
+ // rebuild subnets
+ String subnets = ""
+ if (utils.nodeExists(queryIdResponse, "subnets")) {
+ def subnetsGroup = utils.getNodeXml(queryIdResponse, "subnets", false)
+ subnets = buildSubnets(subnetsGroup)
+ }
+
+ String physicalNetworkName = ""
+ physicalNetworkName = utils.getNodeText1(queryIdResponse, "physical-network-name")
+
+ String vlansCollection = buildVlans(queryIdResponse)
+
+ 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?
+
+ createNetworkRequest = """
+ <createNetworkRequest>
+ <cloudSiteId>${cloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <networkId>${networkId}</networkId>
+ <networkName>${networkName}</networkName>
+ <networkType>${networkType}</networkType>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
+ <networkTechnology>${networkTechnology}</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>${physicalNetworkName}</physicalNetworkName >
+ ${vlansCollection}
+ </providerVlanNetwork>
+ ${contrailNetwork}
+ ${subnets}
+ <skipAAI>true</skipAAI>
+ <backout>${backoutOnFailure}</backout>
+ <failIfExists>${failIfExists}</failIfExists>
+ ${networkParams}
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </createNetworkRequest>
+ """.trim()
+ }
+ return createNetworkRequest
+
+ }
+
+ /**
+ * This method returns the string for Network request
+ * V2 for Contrail 3.x will populate cloud-region data in same cloudSiteId filed
+ * Network adapter will handle it properly
+ * @param requestId either 'request-id' or 'mso-request-id'
+ * @param requestInput the request in the process
+ * @param queryIdResponse the response of REST AAI query by Id
+ * @param routeCollection the collection
+ * @param policyFqdns the policy
+ * @param cloudRegionId the cloud-region-region
+ * @return String request
+ */
+ def UpdateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyFqdns, tableCollection, cloudRegionId, backoutOnFailure, source) {
+ String updateNetworkRequest = null
+ if(requestInput!=null && queryIdResponse!=null) {
+ String serviceInstanceId = ""
+ String sharedValue = ""
+ String externalValue = ""
+
+ if (source == "VID") {
+ sharedValue = utils.getNodeText1(queryIdResponse, "is-shared-network") != null ? utils.getNodeText1(queryIdResponse, "is-shared-network") : "false"
+ externalValue = utils.getNodeText1(queryIdResponse, "is-external-network") != null ? utils.getNodeText1(queryIdResponse, "is-external-network") : "false"
+ serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id")
+
+ } else { // source = 'PORTAL'
+ sharedValue = getParameterValue(requestInput, "shared")
+ externalValue = getParameterValue(requestInput, "external")
+ serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id") != null ? utils.getNodeText1(requestInput, "service-instance-id") : ""
+ }
+
+ String failIfExists = "false"
+ // requestInput
+ String cloudRegion = cloudRegionId
+ String tenantId = utils.getNodeText1(requestInput, "tenant-id")
+
+ // queryIdResponse
+ String networkName = utils.getNodeText1(queryIdResponse, "network-name")
+ String networkId = utils.getNodeText1(queryIdResponse, "network-id")
+
+ String networkType = ""
+ String modelCustomizationUuid = ""
+ if (utils.nodeExists(requestInput, "networkModelInfo")) {
+ String networkModelInfo = utils.getNodeXml(requestInput, "networkModelInfo", false).replace("tag0:","").replace(":tag0","")
+ networkType = utils.getNodeText1(networkModelInfo, "modelName")
+ modelCustomizationUuid = utils.getNodeText1(networkModelInfo, "modelCustomizationUuid")
+ } else {
+ networkType = utils.getNodeText1(queryIdResponse, "network-type")
+ }
+
+
+ // rebuild subnets
+ String subnets = ""
+ if (utils.nodeExists(queryIdResponse, "subnets")) {
+ def subnetsGroup = utils.getNodeXml(queryIdResponse, "subnets", false)
+ subnets = buildSubnets(subnetsGroup)
+ }
+
+ String networkParams = ""
+ if (utils.nodeExists(requestInput, "network-params")) {
+ String netParams = utils.getNodeXml(requestInput, "network-params", false).replace("tag0:","").replace(":tag0","")
+ networkParams = buildParams(netParams)
+ }
+
+ String networkStackId = utils.getNodeText1(queryIdResponse, "heat-stack-id")
+ if (networkStackId == 'null' || networkStackId == "" || networkStackId == null) {
+ networkStackId = "force_update"
+ }
+
+ String physicalNetworkName = utils.getNodeText1(queryIdResponse, "physical-network-name")
+ String vlansCollection = buildVlans(queryIdResponse)
+
+ updateNetworkRequest =
+ """<updateNetworkRequest>
+ <cloudSiteId>${cloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <networkId>${networkId}</networkId>
+ <networkStackId>${networkStackId}</networkStackId>
+ <networkName>${networkName}</networkName>
+ <networkType>${networkType}</networkType>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
+ <networkTypeVersion/>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>${physicalNetworkName}</physicalNetworkName>
+ ${vlansCollection}
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>${sharedValue}</shared>
+ <external>${externalValue}</external>
+ ${routeCollection}
+ ${policyFqdns}
+ ${tableCollection}
+ </contrailNetwork>
+ ${subnets}
+ <skipAAI>true</skipAAI>
+ <backout>${backoutOnFailure}</backout>
+ <failIfExists>${failIfExists}</failIfExists>
+ ${networkParams}
+
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl></notificationUrl>
+ </updateNetworkRequest>""".trim()
+
+ }
+ return updateNetworkRequest
+
+ }
+
+ /**
+ * This method returns the string for Create Volume Request payload
+ * @param groupId the volume-group-id
+ * @param volumeName the volume-group-name
+ * @param vnfType the vnf-type
+ * @param tenantId the value of relationship-key 'tenant.tenant-id'
+ * @return String request payload
+ */
+ def String CreateNetworkVolumeRequest(groupId, volumeName, vnfType, tenantId) {
+
+ String requestPayload =
+ """<volume-group xmlns="http://org.openecomp.mso/v6">
+ <volume-group-id>${groupId}</volume-group-id>
+ <volume-group-name>${volumeName}</volume-group-name>
+ <heat-stack-id></heat-stack-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>${tenantId}</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </volume-group>"""
+
+ return requestPayload
+ }
+
+ def String createCloudRegionVolumeRequest(groupId, volumeName, vnfType, tenantId, cloudRegion, namespace, modelCustomizationId) {
+
+ String requestPayload =
+ """<volume-group xmlns="${namespace}">
+ <volume-group-id>${groupId}</volume-group-id>
+ <volume-group-name>${volumeName}</volume-group-name>
+ <heat-stack-id></heat-stack-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <vf-module-persona-model-customization-id>${modelCustomizationId}</vf-module-persona-model-customization-id>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>${tenantId}</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>${cloudRegion}</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </volume-group>"""
+
+ return requestPayload
+ }
+
+ def String createCloudRegionVolumeRequest(groupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace, modelCustomizationId) {
+
+ String requestPayload =
+ """<volume-group xmlns="${namespace}">
+ <volume-group-id>${groupId}</volume-group-id>
+ <volume-group-name>${volumeName}</volume-group-name>
+ <heat-stack-id></heat-stack-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <vf-module-persona-model-customization-id>${modelCustomizationId}</vf-module-persona-model-customization-id>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>${vnfId}</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>${tenantId}</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>${cloudRegion}</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </volume-group>"""
+
+ return requestPayload
+ }
+
+
+ /**
+ * This method returns the string for Update Volume Request payload
+ * @param requeryAAIVolGrpNameResponse the response of query volume group name (in AAI)
+ * @param heatStackId the value of heat stack id
+ * @return String request payload
+ */
+ def String updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, heatStackId, namespace, modelCustomizationId) {
+ String requestPayload = ""
+ if (requeryAAIVolGrpNameResponse != null) {
+ def groupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+ def volumeName = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-name")
+ def vnfType = utils.getNodeText(requeryAAIVolGrpNameResponse, "vnf-type")
+ def resourceVersion = utils.getNodeText(requeryAAIVolGrpNameResponse, "resource-version")
+ def relationshipList = ""
+ if (utils.nodeExists(requeryAAIVolGrpNameResponse, "relationship")) {
+ relationshipList = rebuildRelationship(requeryAAIVolGrpNameResponse)
+ }
+
+ requestPayload =
+ """<volume-group xmlns="${namespace}">
+ <volume-group-id>${groupId}</volume-group-id>
+ <volume-group-name>${volumeName}</volume-group-name>
+ <heat-stack-id>${heatStackId}</heat-stack-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <orchestration-status>Active</orchestration-status>
+ <resource-version>${resourceVersion}</resource-version>
+ <vf-module-persona-model-customization-id>${modelCustomizationId}</vf-module-persona-model-customization-id>
+ ${relationshipList}
+ </volume-group>"""
+ }
+
+ return requestPayload
+ }
+
+
+ /**
+ * This method returns the string for Update Volume Request payload
+ * @param requeryAAIVolGrpNameResponse the response of query volume group name (in AAI)
+ * @param heatStackId the value of heat stack id
+ * @return String request payload
+ */
+ def String UpdateNetworkVolumeRequest(requeryAAIVolGrpNameResponse, heatStackId) {
+ String requestPayload = ""
+ if (requeryAAIVolGrpNameResponse != null) {
+ def groupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+ def volumeName = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-name")
+ def vnfType = utils.getNodeText(requeryAAIVolGrpNameResponse, "vnf-type")
+ def resourceVersion = utils.getNodeText(requeryAAIVolGrpNameResponse, "resource-version")
+ def relationshipList = ""
+ if (utils.nodeExists(requeryAAIVolGrpNameResponse, "relationship")) {
+ relationshipList = rebuildRelationship(requeryAAIVolGrpNameResponse)
+ }
+
+ requestPayload =
+ """<volume-group xmlns="http://org.openecomp.mso/v6">
+ <volume-group-id>${groupId}</volume-group-id>
+ <volume-group-name>${volumeName}</volume-group-name>
+ <heat-stack-id>${heatStackId}</heat-stack-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <orchestration-status>Active</orchestration-status>
+ <resource-version>${resourceVersion}</resource-version>
+ ${relationshipList}
+ </volume-group>"""
+ }
+
+ return requestPayload
+ }
+
+ /**
+ * This method returns the string for Create Contrail Network payload
+ * @param requeryIdAAIResponse the response from AAI query by id
+ * @param createNetworkResponse the response of create network
+ * @return String contrailNetworkCreatedUpdate
+ */
+ def ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion) {
+
+ String contrailNetworkCreatedUpdate = ""
+ if(requeryIdAAIResponse!=null && createNetworkResponse!=null) {
+
+ def l3Network = utils.getNodeXml(requeryIdAAIResponse, "l3-network", false).replace("tag0:","").replace(":tag0","")
+ def createNetworkContrailResponse = ""
+ if (utils.nodeExists(createNetworkResponse, 'createNetworkResponse')) {
+ createNetworkContrailResponse = utils.getNodeXml(createNetworkResponse, "createNetworkResponse", false).replace("tag0:","").replace(":tag0","")
+ } else {
+ createNetworkContrailResponse = utils.getNodeXml(createNetworkResponse, "updateNetworkContrailResponse", false).replace("tag0:","").replace(":tag0","")
+ }
+
+ // rebuild network
+ def networkList = ["network-id", "network-name", "network-type", "network-role", "network-technology", "neutron-network-id", "is-bound-to-vpn", "service-id", "network-role-instance", "resource-version", "resource-model-uuid", "orchestration-status", "heat-stack-id", "mso-catalog-key", "contrail-network-fqdn",
+ "physical-network-name", "is-provider-network", "is-shared-network", "is-external-network"]
+ String rebuildNetworkElements = buildNetworkElements(l3Network, createNetworkContrailResponse, networkList)
+
+ // rebuild 'subnets'
+ def rebuildSubnetList = ""
+ if (utils.nodeExists(requeryIdAAIResponse, 'subnet')) {
+ rebuildSubnetList = buildSubnets(requeryIdAAIResponse, createNetworkResponse)
+ }
+
+ // rebuild 'segmentation-assignments'
+ def rebuildSegmentationAssignments = ""
+ if (utils.nodeExists(requeryIdAAIResponse, 'segmentation-assignments')) {
+ List elementList = ["segmentation-id"]
+ rebuildSegmentationAssignments = buildXMLElements(requeryIdAAIResponse, "", "segmentation-assignments", elementList)
+ }
+
+ // rebuild 'ctag-assignments' / rebuildCtagAssignments
+ def rebuildCtagAssignmentsList = ""
+ if (utils.nodeExists(requeryIdAAIResponse, 'ctag-assignment')) {
+ rebuildCtagAssignmentsList = rebuildCtagAssignments(requeryIdAAIResponse)
+ }
+
+ // rebuild 'relationship'
+ def relationshipList = ""
+ if (utils.nodeExists(requeryIdAAIResponse, 'relationship-list')) {
+ String rootRelationshipData = getFirstNodeXml(requeryIdAAIResponse, "relationship-list").drop(38).trim().replace("tag0:","").replace(":tag0","")
+ if (utils.nodeExists(rootRelationshipData, 'relationship')) {
+ relationshipList = rebuildRelationship(rootRelationshipData)
+ }
+ }
+
+ //Check for optional contrail network fqdn within CreateNetworkResponse
+ String contrailNetworkFQDN
+ if(utils.nodeExists(createNetworkResponse, "contrail-network-fqdn")){
+ contrailNetworkFQDN = utils.getNodeXml(createNetworkResponse, "contrail-network-fqdn")
+ contrailNetworkFQDN = utils.removeXmlNamespaces(contrailNetworkFQDN)
+ contrailNetworkFQDN = utils.removeXmlPreamble(contrailNetworkFQDN)
+ }else{
+ contrailNetworkFQDN = ""
+ }
+
+ contrailNetworkCreatedUpdate =
+ """<l3-network xmlns="${schemaVersion}">
+ ${rebuildNetworkElements}
+ ${rebuildSubnetList}
+ ${rebuildSegmentationAssignments}
+ ${rebuildCtagAssignmentsList}
+ ${relationshipList}
+ ${contrailNetworkFQDN}
+ </l3-network>""".trim()
+
+ }
+ return contrailNetworkCreatedUpdate
+ }
+
+
+
+ /**
+ * This method returns the value for the name paramName.
+ * Ex: <network-params>
+ * <param name="shared">1</param>
+ * <param name="external">0</external>
+ * </network-params>
+ *
+ * @param xmlInput the XML document
+ * @param paramName the param name (ex: 'shared')
+ * @return a param value for 'shared' (ex: '1')
+ */
+ def getParameterValue(xmlInput, paramName) {
+ def rtn=""
+ if(xmlInput!=null){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ rtn= xml.'**'.find {param->param.'@name'.text() == paramName}
+ }
+ if (rtn==null) {
+ return ""
+ } else {
+ return rtn
+ }
+ }
+
+ /**
+ * This method returns the name of param if found/match with paramName.
+ * Ex: <network-params>
+ * <param name="shared">1</param>
+ * <param name="external">0</external>
+ * </network-params>
+ *
+ * @param xmlInput the XML document
+ * @param paramName the param name (ex: 'shared', )
+ * @return a param name for 'shared' (ex: 'shared' if found)
+ */
+ def getParameterName(xmlInput, paramName) {
+ def rtn=""
+ if(xmlInput!=null){
+ def xml= new XmlSlurper().parseText(xmlInput)
+ try {
+ rtn= xml.'**'.find {param->param.'@name' == paramName}.'@name'
+ } catch (Exception ex) {
+ rtn=""
+ }
+ }
+ if (rtn==null || rtn=="") {
+ return ""
+ } else {
+ return rtn
+ }
+ }
+
+ /**
+ * This method returns the networkParams xml string.
+ * Ex: input:
+ * <network-params>
+ * <param name="shared">1</param>
+ * <param name="external">0</external>
+ * </network-params>
+ *
+ * Sample result:
+ * <networkParams>
+ * <shared>1</shared>
+ * <external>0</external>
+ * </networkParams>
+ *
+ */
+
+ def buildParams(networkParams) {
+ def build = ""
+ def netParams = new XmlParser().parseText(networkParams)
+ try {
+ def paramsList = netParams.'**'.findAll {param->param.'@name'}.'@name'
+ if (paramsList.size() > 0) {
+ build += "<networkParams>"
+ for (i in 0..paramsList.size()-1) {
+ def name = netParams.'**'.find {param->param.'@name' == paramsList[i]}.'@name'
+ def value= netParams.'**'.find {param->param.'@name' == paramsList[i]}.text()
+ build += "<${name}>${value}</${name}>"
+ }
+ build += "</networkParams>"
+ }
+
+ } catch (Exception ex) {
+ println ' buildParams error - ' + ex.getMessage()
+ build = ""
+ }
+ return build
+ }
+
+ def getVlans(xmlInput) {
+ def rtn = ""
+ if (xmlInput!=null) {
+ def vlansList = getListWithElements(xmlInput, 'vlans')
+ def vlansListSize = vlansList.size()
+ if (vlansListSize > 0) {
+ for (i in 0..vlansListSize-1) {
+ rtn += '<vlans>'+vlansList[i]+'</vlans>'
+ }
+ }
+ }
+ return rtn
+
+
+ }
+
+ /**
+ * This method returns the uri value for the vpn bindings.
+ * Return the a list of value of vpn binding in the <related-link> string.
+ * Ex.
+ * <relationship-list>
+ * <relationship>
+ * <related-to>vpn-binding</related-to>
+ * <related-link>https://aai-app-e2e.test.openecomp.com:8443/aai/v6/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-ext1.test.openecomp.com:8443/aai/v6/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>
+ * @param xmlInput the XML document
+ * @return a list of vpn binding values
+ * ex: ['aai/v6/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', 'aai/v6/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/']
+ *
+ **/
+ def getVnfBindingObject(xmlInput) {
+ //def rtn = null
+ List rtn = []
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "vpn-binding") {
+ def relatedLink = utils.getNodeText(relationshipXml, 'related-link')
+ if (relatedLink != null || relatedLink != "") {
+ rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
+ }
+ }
+ }
+ }
+ }
+ return rtn
+ }
+ /**
+ * similar to VNF bindings method
+ * @param xmlInput the XML document
+ * @return a list of network policy values
+ * ex: ['aai/v$/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg', 'aai/v$/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg']
+ *
+ **/
+ def getNetworkPolicyObject(xmlInput) {
+ //def rtn = null
+ List rtn = []
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "network-policy") {
+ def relatedLink = utils.getNodeText(relationshipXml, 'related-link')
+ if (relatedLink != null || relatedLink != "") {
+ rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
+ }
+ }
+ }
+ }
+ }
+ return rtn
+ }
+
+ /**
+ * similar to network policymethod
+ * @param xmlInput the XML document
+ * @return a list of network policy values
+ * ex: ['aai/v$/network/route-table-references/route-table-reference/refFQDN1', 'aai/v$/network/route-table-references/route-table-reference/refFQDN2']
+ *
+ **/
+ def getNetworkTableRefObject(xmlInput) {
+ //def rtn = null
+ List rtn = []
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "route-table-reference") {
+ def relatedLink = utils.getNodeText1(relationshipXml, 'related-link')
+ if (relatedLink != null || relatedLink != "") {
+ rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
+ }
+ }
+ }
+ }
+ }
+ return rtn
+ }
+
+ /**
+ * similar to network policymethod
+ * @param xmlInput the XML document
+ * @return a list of IDs for related VNF instances
+ *
+ **/
+ def getRelatedVnfIdList(xmlInput) {
+ //def rtn = null
+ List rtn = []
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "generic-vnf") {
+ def relatedLink = utils.getNodeText1(relationshipXml, 'related-link')
+ if (relatedLink != null || relatedLink != "") {
+ if (relatedLink.substring(relatedLink.indexOf("/generic-vnf/")+13, relatedLink.length()).contains('/')) {
+ rtn.add(relatedLink.substring(relatedLink.indexOf("/generic-vnf/")+13, relatedLink.length()-1))
+ } else {
+ rtn.add(relatedLink.substring(relatedLink.indexOf("/generic-vnf/")+13, relatedLink.length()))
+ }
+
+ }
+ }
+ }
+ }
+ }
+ return rtn
+ }
+
+ /**
+ * similar to network policymethod
+ * @param xmlInput the XML document
+ * @return a list of IDs for related Network instances
+ *
+ **/
+ def getRelatedNetworkIdList(xmlInput) {
+ //def rtn = null
+ List rtn = []
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "l3-network") {
+ def relatedLink = utils.getNodeText1(relationshipXml, 'related-link')
+ if (relatedLink != null || relatedLink != "") {
+ if (relatedLink.substring(relatedLink.indexOf("/l3-network/")+12, relatedLink.length()).contains('/')) {
+ rtn.add(relatedLink.substring(relatedLink.indexOf("/l3-network/")+12, relatedLink.length()-1))
+ } else {
+ rtn.add(relatedLink.substring(relatedLink.indexOf("/l3-network/")+12, relatedLink.length()))
+ }
+
+ }
+ }
+ }
+ }
+ }
+ return rtn
+ }
+
+ def isVfRelationshipExist(xmlInput) {
+ Boolean rtn = false
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "vf-module") {
+ rtn = true
+ }
+ }
+ }
+ }
+ return rtn
+
+ }
+
+ def getCloudRegion(xmlInput) {
+ String lcpCloudRegion = ""
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "cloud-region") {
+ def relatedLink = utils.getNodeText1(relationshipXml, 'related-link')
+ if (relatedLink != null || relatedLink != "") {
+ lcpCloudRegion = relatedLink.substring(relatedLink.indexOf("/att-aic/")+9, relatedLink.length())
+ if (lcpCloudRegion.contains('/')) {
+ lcpCloudRegion = relatedLink.substring(relatedLink.indexOf("/att-aic/")+9, relatedLink.length()-1)
+ }
+ }
+ }
+ }
+ }
+ }
+ return lcpCloudRegion
+ }
+
+ def getTenantId(xmlInput) {
+ String tenantId = ""
+ if (xmlInput!=null) {
+ def relationshipList = getListWithElements(xmlInput, 'relationship')
+ def relationshipListSize = relationshipList.size()
+ if (relationshipListSize > 0) {
+ for (i in 0..relationshipListSize-1) {
+ def relationshipXml = XmlUtil.serialize(relationshipList[i])
+ if (utils.getNodeText(relationshipXml, 'related-to') == "tenant") {
+ def relatedLink = utils.getNodeText1(relationshipXml, 'related-link')
+ if (relatedLink != null || relatedLink != "") {
+ tenantId = relatedLink.substring(relatedLink.indexOf("/tenant/")+8, relatedLink.length())
+ if (tenantId.contains('/')) {
+ tenantId = relatedLink.substring(relatedLink.indexOf("/tenant/")+8, relatedLink.length()-1)
+ }
+ }
+ }
+ }
+ }
+ }
+ return tenantId
+ }
+
+ def isInstanceValueMatch(linkResource, globalSubscriberId, serviceType) {
+ Boolean rtn = false
+ try {
+ String globalSubscriberIdLink = linkResource.substring(linkResource.indexOf("/customer/")+10, linkResource.indexOf("/service-subscriptions"))
+ String serviceTypeLink = linkResource.substring(linkResource.indexOf("/service-subscription/")+22, linkResource.indexOf("/service-instances"))
+ if (globalSubscriberIdLink == globalSubscriberId) {
+ rtn = true
+ } else {
+ if (serviceTypeLink == serviceType) {
+ rtn = true
+ }
+ }
+
+ } catch (Exception ex) {
+ println 'Exception - ' + ex.getMessage()
+ return false
+ }
+ return rtn
+ }
+
+ def getListWithElements(xmlInput, groupName) {
+ def rtn = ""
+ if (xmlInput != null) {
+ def relationshipData = new XmlSlurper().parseText(xmlInput)
+ rtn = relationshipData.'**'.findAll {it.name() == groupName}
+ }
+ return rtn
+
+ }
+
+ // build network single elements
+ def buildNetworkElements(l3Network, createNetworkContrailResponse, networkList) {
+ def replaceNetworkId = ""
+ def replaceNeutronNetworkId = ""
+ def replaceContrailNetworkFqdn = ""
+ if (l3Network != null && createNetworkContrailResponse != null) {
+ if (utils.nodeExists(l3Network, 'heat-stack-id')) {
+ replaceNetworkId = utils.getNodeText(l3Network, 'heat-stack-id')
+ } else {
+ if (utils.nodeExists(createNetworkContrailResponse, 'networkStackId')) {
+ replaceNetworkId = utils.getNodeText(createNetworkContrailResponse, 'networkStackId')
+ }
+ }
+ if (utils.nodeExists(l3Network, 'neutron-network-id')) {
+ replaceNeutronNetworkId = utils.getNodeText(l3Network, 'neutron-network-id')
+ } else {
+ if (utils.nodeExists(createNetworkContrailResponse, 'neutronNetworkId')) {
+ replaceNeutronNetworkId = utils.getNodeText(createNetworkContrailResponse, 'neutronNetworkId')
+ }
+ }
+ if (utils.nodeExists(l3Network, 'contrail-network-fqdn')) {
+ replaceContrailNetworkFqdn = utils.getNodeText(l3Network, 'contrail-network-fqdn')
+ } else {
+ if (utils.nodeExists(createNetworkContrailResponse, 'networkFqdn')) {
+ replaceContrailNetworkFqdn = utils.getNodeText(createNetworkContrailResponse, 'networkFqdn')
+ }
+ }
+ }
+
+ String var = ""
+ def xmlNetwork = ""
+ if (l3Network != null) {
+ for (element in networkList) {
+ def xml= new XmlSlurper().parseText(l3Network)
+ var = xml.'**'.find {it.name() == element}
+ if (var == null) {
+ if (element=="orchestration-status") {
+ if (var.toString() == 'pending-create' || var.toString() == 'PendingCreate') {
+ xmlNetwork += "<"+element+">"+"Created"+"</"+element+">"
+ } else { //pending-update or PendingUpdate
+ xmlNetwork += "<"+element+">"+"Active"+"</"+element+">"
+ }
+ }
+
+ if (element=="heat-stack-id") {
+ if (replaceNetworkId != "") {
+ xmlNetwork += "<"+element+">"+replaceNetworkId+"</"+element+">"
+ }
+ }
+ if (element=="neutron-network-id") {
+ if (replaceNeutronNetworkId != "") {
+ xmlNetwork += "<"+element+">"+replaceNeutronNetworkId+"</"+element+">"
+ }
+ }
+ if (element=="contrail-network-fqdn") {
+ if (replaceContrailNetworkFqdn != "") {
+ xmlNetwork += "<"+element+">"+replaceContrailNetworkFqdn+"</"+element+">"
+ }
+ }
+
+ } else {
+ if (element=="orchestration-status") {
+ if (element=="orchestration-status") {
+ if (var.toString() == 'pending-create' || var.toString() == 'PendingCreate') {
+ xmlNetwork += "<"+element+">"+"Created"+"</"+element+">"
+ } else { //pending-update or PendingUpdate
+ xmlNetwork += "<"+element+">"+"Active"+"</"+element+">"
+ }
+ }
+ } else {
+ xmlNetwork += "<"+element+">"+var.toString()+"</"+element+">"
+ }
+ }
+ }
+
+ }
+ return xmlNetwork
+ }
+
+ def buildSubnets(requeryIdAAIResponse, createNetworkResponse) {
+ def rebuildingSubnets = ""
+ if (requeryIdAAIResponse != null && utils.nodeExists(requeryIdAAIResponse, 'subnets')) {
+ def subnetIdMapValue = ""
+ def subnetsGroup = utils.getNodeXml(requeryIdAAIResponse, "subnets", false)
+ def subnetsData = new XmlSlurper().parseText(subnetsGroup)
+ rebuildingSubnets += "<subnets>"
+ try {
+ def subnets = subnetsData.'**'.findAll {it.name() == "subnet"}
+ def subnetsSize = subnets.size()
+ for (i in 0..subnetsSize-1) {
+ def subnet = subnets[i]
+ def subnetXml = XmlUtil.serialize(subnet)
+ def orchestrationStatus = utils.getNodeText1(subnetXml, "orchestration-status")
+ if (orchestrationStatus == "PendingDelete" || orchestrationStatus == "pending-delete") {
+ // skip, do not include in processing, remove!!!
+ } else {
+ def subnetList = ["subnet-id", "neutron-subnet-id", "gateway-address", "network-start-address", "cidr-mask", "ip-version", "orchestration-status", "dhcp-enabled", "dhcp-start", "dhcp-end", "resource-version", "subnet-name"]
+ rebuildingSubnets += buildSubNetworkElements(subnetXml, createNetworkResponse, subnetList, "subnet")
+ }
+ }
+ if (utils.nodeExists(subnetsData, 'relationship')) {
+ rebuildingSubnets = rebuildRelationship(requeryIdAAIResponse)
+ }
+
+ } catch (Exception ex) {
+ // error
+ } finally {
+ rebuildingSubnets += "</subnets>"
+ }
+ }
+ return rebuildingSubnets
+ }
+
+ def buildSubnets(queryIdResponse) {
+ def rebuildingSubnets = ""
+ def subnetsData = new XmlSlurper().parseText(queryIdResponse)
+ //rebuildingSubnets += "<subnets>"
+ try {
+ def subnets = subnetsData.'**'.findAll {it.name() == "subnet"}
+ def subnetsSize = subnets.size()
+ for (i in 0..subnetsSize-1) {
+ def subnet = subnets[i]
+ def subnetXml = XmlUtil.serialize(subnet)
+ def orchestrationStatus = utils.getNodeText1(subnetXml, "orchestration-status")
+ if (orchestrationStatus == "pending-delete" || orchestrationStatus == "PendingDelete") {
+ // skip, do not include in processing, remove!!!
+ } else {
+ def subnetList = ["dhcp-start", "dhcp-end", "network-start-address", "cidr-mask", "dhcp-enabled", "gateway-address", "ip-version", "subnet-id", "subnet-name"]
+ rebuildingSubnets += buildSubNetworkElements(subnetXml, subnetList, "subnets")
+ //rebuildingSubnets += buildSubNetworkElements(subnetXml, subnetList, "")
+ } }
+ } catch (Exception ex) {
+ //
+ } finally {
+ //rebuildingSubnets += "</subnets>"
+ }
+ return rebuildingSubnets
+ }
+
+
+ // build subnet sub-network single elements
+ def buildSubNetworkElements(subnetXml, createNetworkResponse, elementList, parentName) {
+ String var = ""
+ def xmlBuild = ""
+ if (parentName != "") {
+ xmlBuild += "<"+parentName+">"
+ }
+ if (subnetXml != null) {
+ for (element in elementList) {
+ def xml= new XmlSlurper().parseText(subnetXml)
+ var = xml.'**'.find {it.name() == element}
+ if (var != null) {
+ if (element=="orchestration-status") {
+ if(var.toString() == 'pending-create' || var.toString() == 'PendingCreate') {
+ xmlBuild += "<"+element+">"+"Created"+"</"+element+">"
+ } else { // pending-update or PendingUpdate'
+ xmlBuild += "<"+element+">"+"Active"+"</"+element+">"
+ }
+ } else { // "subnet-id", "neutron-subnet-id"
+ if (element=="subnet-id") {
+ if (utils.nodeExists(createNetworkResponse, "subnetMap")) {
+ xmlBuild += "<"+element+">"+var.toString()+"</"+element+">"
+ String neutronSubnetId = extractNeutSubId(createNetworkResponse, var.toString())
+ xmlBuild += "<neutron-subnet-id>"+neutronSubnetId+"</neutron-subnet-id>"
+ }
+ } else {
+ if (element=="neutron-subnet-id") {
+ // skip
+ } else {
+ xmlBuild += "<"+element+">"+var.toString()+"</"+element+">"
+ }
+ }
+ }
+ }
+ }
+
+ }
+ if (parentName != "") {
+ xmlBuild += "</"+parentName+">"
+ }
+ return xmlBuild
+ }
+
+ // build subnet sub-network single elements
+ def buildSubNetworkElements(subnetXml, elementList, parentName) {
+ def var = ""
+ def xmlBuild = ""
+ if (parentName != "") {
+ xmlBuild += "<"+parentName+">"
+ }
+ if (subnetXml != null) {
+ def networkStartAddress = ""
+ for (element in elementList) {
+ def xml= new XmlSlurper().parseText(subnetXml)
+ var = xml.'**'.find {it.name() == element}
+ if (element == "dhcp-start") {
+ xmlBuild += "<allocationPools>"
+ if (var.toString() == 'null') {
+ xmlBuild += "<start>"+""+"</start>"
+ } else {
+ xmlBuild += "<start>"+var.toString()+"</start>"
+ }
+ }
+ if (element == "dhcp-end") {
+ if (var.toString() == 'null') {
+ xmlBuild += "<end>"+""+"</end>"
+ } else {
+ xmlBuild += "<end>"+var.toString()+"</end>"
+ }
+ xmlBuild += "</allocationPools>"
+ }
+ if (element == "network-start-address" || element == "cidr-mask") {
+ if (element == "network-start-address") {
+ networkStartAddress = var.toString()
+ }
+ if (element == "cidr-mask") {
+ xmlBuild += "<cidr>"+networkStartAddress+"/"+var.toString()+"</cidr>"
+ }
+ }
+ if (element == "dhcp-enabled") {
+ xmlBuild += "<enableDHCP>"+var.toString()+"</enableDHCP>"
+ }
+ if (element == "gateway-address") {
+ xmlBuild += "<gatewayIp>"+var.toString()+"</gatewayIp>"
+ }
+ if (element == "ip-version") {
+ xmlBuild += "<ipVersion>"+var.toString()+"</ipVersion>"
+ }
+ if (element == "subnet-id") {
+ xmlBuild += "<subnetId>"+var.toString()+"</subnetId>"
+ }
+ if ((element == "subnet-name") && (var != null)) {
+ xmlBuild += "<subnetName>"+var.toString()+"</subnetName>"
+ }
+ }
+ }
+ if (parentName != "") {
+ xmlBuild += "</"+parentName+">"
+ }
+ return xmlBuild
+ }
+
+ // rebuild ctag-assignments
+ def rebuildCtagAssignments(xmlInput) {
+ def rebuildingCtagAssignments = ""
+ if (xmlInput!=null) {
+ def ctagAssignmentsData = new XmlSlurper().parseText(xmlInput)
+ rebuildingCtagAssignments += "<ctag-assignments>"
+ def ctagAssignments = ctagAssignmentsData.'**'.findAll {it.name() == "ctag-assignment"}
+ def ctagAssignmentsSize = ctagAssignments.size()
+ for (i in 0..ctagAssignmentsSize-1) {
+ def ctagAssignment = ctagAssignments[i]
+ def ctagAssignmentXml = XmlUtil.serialize(ctagAssignment)
+ rebuildingCtagAssignments += "<ctag-assignment>"
+ List elementList = ["vlan-id-inner", "resource-version"]
+ rebuildingCtagAssignments += buildXMLElements(ctagAssignmentXml, "" , "", elementList)
+ if (utils.nodeExists(ctagAssignmentXml, 'relationship')) {
+ rebuildingCtagAssignments += rebuildRelationship(ctagAssignmentXml)
+ }
+ rebuildingCtagAssignments += "</ctag-assignment>"
+ }
+ rebuildingCtagAssignments += "</ctag-assignments>"
+ }
+ return rebuildingCtagAssignments
+ }
+
+ // rebuild 'relationship-list'
+ def rebuildRelationship(xmlInput) {
+ def rebuildingSubnets = ""
+ if (xmlInput!=null) {
+ def subnetsData = new XmlSlurper().parseText(xmlInput)
+ rebuildingSubnets += "<relationship-list>"
+ def relationships = subnetsData.'**'.findAll {it.name() == "relationship"}
+ def relationshipsSize = relationships.size()
+ for (i in 0..relationshipsSize-1) {
+ def relationship = relationships[i]
+ def relationshipXml = XmlUtil.serialize(relationship)
+ rebuildingSubnets += "<relationship>"
+ def relationshipList = ["related-to", "related-link"]
+ rebuildingSubnets += buildSubNetworkElements(relationshipXml, "", relationshipList, "")
+ if (utils.nodeExists(relationshipXml, 'relationship-data')) {
+ def relationshipDataXmlData = new XmlSlurper().parseText(relationshipXml)
+ def relationshipsData = relationshipDataXmlData.'**'.findAll {it.name() == "relationship-data"}
+ def relationshipsDataSize = relationshipsData.size()
+ for (j in 0..relationshipsDataSize-1) {
+ def relationshipData = relationshipsData[j]
+ def relationshipDataXml = XmlUtil.serialize(relationshipData)
+ def relationshipDataList = ["relationship-key", "relationship-value"]
+ rebuildingSubnets += buildXMLElements(relationshipDataXml, "", "relationship-data", relationshipDataList)
+ }
+ }
+ if (utils.nodeExists(relationshipXml, 'related-to-property')) {
+ def relationshipDataXmlData = new XmlSlurper().parseText(relationshipXml)
+ def relationshipsData = relationshipDataXmlData.'**'.findAll {it.name() == "related-to-property"}
+ def relationshipsDataSize = relationshipsData.size()
+ for (j in 0..relationshipsDataSize-1) {
+ def relationshipData = relationshipsData[j]
+ def relationshipDataXml = XmlUtil.serialize(relationshipData)
+ def relationshipDataList = ["property-key", "property-value"]
+ rebuildingSubnets += buildXMLElements(relationshipDataXml, "", "related-to-property", relationshipDataList)
+ }
+ }
+
+ rebuildingSubnets += "</relationship>"
+ }
+ rebuildingSubnets += "</relationship-list>"
+ }
+ return rebuildingSubnets
+ }
+
+ def buildVlans(queryIdResponse) {
+ def rebuildingSubnets = "<vlans>"
+ def subnetsData = new XmlSlurper().parseText(queryIdResponse)
+
+ try {
+ def subnets = subnetsData.'**'.findAll {it.name() == "segmentation-assignments"}
+ def subnetsSize = subnets.size()
+ for (i in 0..subnetsSize-1) {
+ def subnet = subnets[i]
+ def subnetXml = XmlUtil.serialize(subnet)
+
+ String vlan = utils.getNodeText1(subnetXml, "segmentation-id")
+ if (i>0){
+ rebuildingSubnets += ","
+ }
+ rebuildingSubnets += vlan
+ }
+ } catch (Exception ex) {
+ //
+ } finally {
+ //rebuildingSubnets += "</subnets>"
+ rebuildingSubnets += "</vlans>"
+ }
+ return rebuildingSubnets
+ }
+
+ /* Utility code to rebuild xml/elements in a list:
+ * rebuild xml with 1) unbounded groups of elements; or
+ * 2) one group of elements; or
+ * 3) just one or more elements (in a list as argument)
+ * @param xmlInput the XML document
+ * @param parentName the parent name (ex: 'inputs')
+ * @param childrenName the chilrendName (ex: 'entry' as unbounded/occurs>1)
+ * @param elementList the element list of children (ex: 'key', 'value')
+ * @return a string of rebuild xml
+ *
+ * Ex 1: xmlInput:
+ * <ws:inputs>
+ * <ws:entry>
+ * <ws:key>name</ws:key>
+ * <ws:value>Edward</ws:value>
+ * </ws:entry>
+ * <ws:entry>
+ * <ws:key>age</ws:key>
+ * <ws:value>30</ws:value>
+ * </ws:entry>
+ * <ws:entry>
+ * <ws:key>age</ws:key>
+ * <ws:value>30</ws:value>
+ * </ws:entry>
+ * <ws:/inputs>
+ * Usage:
+ * List elementList = ["key", "value"]
+ * String rebuild = buildXMLElements(xmlInput, "inputs", "entry", elementList)
+ *
+ * Ex 2: xmlInput // no parent tag
+ * <ws:sdnc-request-header>
+ * <ws:svc-request-id>fec8ec88-151a-45c9-ad60-8233e0fc8ff2</ws:svc-request-id>
+ * <ws:svc-notification-url>https://msojra.mtsnj.aic.cip.openecomp.com:8443/adapters/rest/SDNCNotify</ws:svc-notification-url>
+ * <ws:svc-action>assign</ws:svc-action>
+ * </ws:sdnc-request-header>
+ * Usage:
+ * List elementList = ["svc-request-id", "svc-notification-url", "svc-action"]
+ * String rebuild = buildXMLElements(xmlInput, "" , "sdnc-request-header", elementList) // no parent tag
+ *
+ * Ex 3: xmlInput // elements one after another (with no parent & children tag)
+ * <ws:test-id>myTestid</ws:test-id>
+ * <ws:test-user>myUser</ws:test-user>
+ * Usage:
+ * List elementList = ["test-id", "test-user"]
+ * String rebuild = buildXMLElements(xmlInput, "" , "", elementList)
+ *
+ */
+ def buildXMLElements(xmlInput, parentName, childrenName, elementList) {
+ def varChildren = ""
+ def var = ""
+ def xmlBuildUnbounded = ""
+ if (parentName!="") {xmlBuildUnbounded += "<"+parentName+">" +'\n'}
+ if (xmlInput != null) {
+ def xml= new XmlSlurper().parseText(xmlInput)
+ if (childrenName!="") {
+ varChildren = xml.'**'.findAll {it.name() == childrenName}
+ for (i in 0..varChildren.size()-1) {
+ xmlBuildUnbounded += "<"+childrenName+">" +'\n'
+ for (element in elementList) {
+ var = varChildren[i].'*'.find {it.name() == element}
+ if (var != null) {
+ xmlBuildUnbounded += "<"+element+">"+var.toString()+"</"+element+">" +'\n'
+ }
+ }
+ xmlBuildUnbounded += "</"+childrenName+">" +'\n'
+ }
+ } else {
+ for (element in elementList) {
+ var = xml.'*'.find {it.name() == element}
+ if (var != null) {
+ xmlBuildUnbounded += "<"+element+">"+var.toString()+"</"+element+">" +'\n'
+ }
+ }
+ }
+
+ }
+ if (parentName!="") {xmlBuildUnbounded += "</"+parentName+">" +'\n'}
+ return xmlBuildUnbounded
+ }
+
+ def getFirstNodeXml(xmlInput, element){
+ def nodeAsText = ""
+ def nodeToSerialize = ""
+ if (xmlInput != null) {
+ def fxml= new XmlSlurper().parseText(xmlInput)
+ if (utils.nodeExists(xmlInput, "payload")) {
+ nodeToSerialize = fxml.'payload'.'l3-network'.'*'.find {it.name() == element}
+ if (nodeToSerialize!=null) {
+ nodeAsText = XmlUtil.serialize(nodeToSerialize)
+ } else {
+ nodeAsText = ""
+ }
+
+ } else {
+ nodeToSerialize = fxml.'*'.find {it.name() == element}
+ if (nodeToSerialize!=null) {
+ nodeAsText = XmlUtil.serialize(nodeToSerialize)
+ } else {
+ nodeAsText = ""
+ }
+
+ }
+ }
+ return nodeAsText
+
+ }
+
+//TODO: This method still needs to be tested before using.
+ /**
+ *
+ * This method is similar to the gennetwork:ContrailNetworUpdateCompletedObject
+ * BPEL method. It extracts all of the required subnet information
+ * for each subnet listed with an orch status equal to the one provided
+ * and puts the corresponding infomation with the appropriate node for
+ * updating aai. The method sets the orch status for each subnet to active
+ *
+ * @param subnetsXml the entire subnets xml
+ * @param requestInput the request in the process
+ * @param queryIdResponse the response of REST AAI query by Id
+ * @param queryVpnBindingResponse the response of REST AAI query by vpn binding
+ * @param routeCollection the collection of vpnBinding's 'global-route-target'
+ * @return String request
+ */
+ public String networkUpdateSubnetInfo(String subnetsXml, String networkResponseXml){
+
+ String subnets = ""
+ StringBuilder sb = new StringBuilder()
+ InputSource source = new InputSource(new StringReader(subnetsXml));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document xml = docBuilder.parse(source)
+ NodeList nodeList = xml.getElementsByTagNameNS("*", "subnet")
+ for (int x = 0; x < nodeList.getLength(); x++) {
+ Node node = nodeList.item(x)
+ String subnet = ""
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ String subnetOrchStatus = eElement.getElementsByTagNameNS("*", "orchestration-status").item(0).getTextContent()
+ if(subnetOrchStatus.equals("pending-create")){
+
+ String subnetId = eElement.getElementsByTagNameNS("*", "subnet-id").item(0).getTextContent()
+ def netAddress = eElement.getElementsByTagNameNS("*", "network-start-address").item(0).getTextContent()
+ def mask = eElement.getElementsByTagNameNS("*", "cidr-mask").item(0).getTextContent()
+ def dhcpEnabledSubnet = eElement.getElementsByTagNameNS("*", "dhcp-enabled").item(0).getTextContent()
+ def gatewayAddress = eElement.getElementsByTagNameNS("*", "gateway-address").item(0).getTextContent()
+ def ipVersion = eElement.getElementsByTagNameNS("*", "ip-version").item(0).getTextContent()
+ def relationshipList = eElement.getElementsByTagNameNS("*", "relationship-list").item(0).getTextContent() //TODO: test this
+ String neutronSubnetId = extractNeutSubId(networkResponseXml, subnetId)
+ subnet =
+ """<subnet>
+ <subnetId>${subnetId}</subnetId>
+ <neutron-subnet-id>${neutronSubnetId}</neutron-subnet-id>
+ <gateway-address>${gatewayAddress}</gateway-address>
+ <network-start-address>${netAddress}</network-start-address>
+ <cidr-mask>${mask}</cidr-mask>
+ <ip-Version>${ipVersion}</ip-Version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>${dhcpEnabledSubnet}</dhcp-enabled>
+ <relationship-list>${relationshipList}</relationship-list>
+ </subnet>"""
+
+ }else if(subnetOrchStatus.equals("pending-delete")){
+ StringWriter writer = new StringWriter()
+ Transformer transformer = TransformerFactory.newInstance().newTransformer()
+ transformer.transform(new DOMSource(node), new StreamResult(writer))
+ subnet = writer.toString()
+
+ }else{
+ subnet = ""
+ }
+ }
+ subnets = sb.append(subnet)
+ }
+
+ subnets = utils.removeXmlPreamble(subnets)
+
+ String subnetsList =
+ """<subnets>
+ ${subnets}
+ </subnets>"""
+
+ return subnetsList
+ }
+
+
+ /**
+ *
+ * This method extracts the "value" node text for the the given subnet Id.
+ *
+ * @param String inputSource - xml that contains the subnet id key and value
+ * @param String subnetId - for which you want the value of
+
+ * @return String value - node text of node named value associated with the given subnet id
+ */
+ public String extractNeutSubId(String inputSource, String subnetId){
+
+ String value = ""
+ InputSource source = new InputSource(new StringReader(inputSource));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document xml = docBuilder.parse(source)
+ NodeList nodeList = xml.getElementsByTagNameNS("*", "entry")
+ for (int x = 0; x < nodeList.getLength(); x++) {
+ Node node = nodeList.item(x)
+ String subnet = ""
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ String key = eElement.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+ if(key.equals(subnetId)){
+ value = eElement.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ }
+ }
+ }
+ return value
+ }
+
+ public boolean isRollbackEnabled (Execution execution, String payloadXml) {
+
+ def rollbackEnabled = false
+ def rollbackValueSet = false
+ if (utils.nodeExists(payloadXml, "backout-on-failure")) {
+ String backoutValue = utils.getNodeText1(payloadXml, "backout-on-failure")
+ if (backoutValue != null && !backoutValue.isEmpty()) {
+ if (backoutValue.equalsIgnoreCase("false")) {
+ rollbackEnabled = false
+ }
+ else {
+ rollbackEnabled = true
+ }
+ rollbackValueSet = true;
+ }
+ }
+
+ if (!rollbackValueSet) {
+ if (execution.getVariable("URN_mso_rollback") != null) {
+ rollbackEnabled = execution.getVariable("URN_mso_rollback").toBoolean()
+ }
+ }
+ return rollbackEnabled
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
index b34467e57e..f30692c409 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
@@ -1,363 +1,374 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.util.Node
-import groovy.xml.QName
-
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.springframework.web.util.UriUtils
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-import com.jayway.jsonpath.internal.Utils;
-
-public class PrepareUpdateAAIVfModule extends VfModuleBase {
-
- /**
- * Initialize the flow's variables.
- *
- * @param execution The flow's execution instance.
- */
- public void initProcessVariables(Execution execution) {
- execution.setVariable('prefix', 'PUAAIVfMod_')
- execution.setVariable('PUAAIVfMod_vnfId', null)
- execution.setVariable('PUAAIVfMod_vfModuleId', null)
- execution.setVariable('PUAAIVfMod_vnfName', null)
- execution.setVariable('PUAAIVfMod_orchestrationStatus', null)
- execution.setVariable('PUAAIVfMod_vfModule', null)
- execution.setVariable('PUAAIVfMod_vfModuleOK', false)
- execution.setVariable('PUAAIVfMod_vfModuleValidationError', null)
- execution.setVariable('PUAAIVfMod_getVnfResponseCode' ,null)
- execution.setVariable('PUAAIVfMod_getVnfResponse', '')
- execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', null)
- execution.setVariable('PUAAIVfMod_updateVfModuleResponse', '')
- execution.setVariable('PUAAIVfMod_outVfModule', null)
- }
-
- /**
- * Check for missing elements in the received request.
- *
- * @param execution The flow's execution instance.
- */
- public void preProcessRequest(Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def xml = execution.getVariable('PrepareUpdateAAIVfModuleRequest')
- logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
- initProcessVariables(execution)
-
- def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
- execution.setVariable('PUAAIVfMod_vnfId', vnfId)
-
- def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
- execution.setVariable('PUAAIVfMod_vfModuleId', vfModuleId)
-
- def orchestrationStatus = getRequiredNodeText(execution, xml,'orchestration-status')
- execution.setVariable('PUAAIVfMod_orchestrationStatus', orchestrationStatus)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
- }
- }
-
- /**
- * Using the received vnfId, query AAI to get the corresponding Generic VNF.
- * A 200 response is expected with the Generic VNF in the response body.
- *
- * @param execution The flow's execution instance.
- */
- public void getGenericVnf(Execution execution) {
- def method = getClass().getSimpleName() + '.getGenericVnf(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
-
- String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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');
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
- APIResponse response = client.httpGet()
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable('PUAAIVfMod_getVnfResponseCode', response.getStatusCode())
- execution.setVariable('PUAAIVfMod_getVnfResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(), isDebugLogEnabled)
- execution.setVariable('PUAAIVfMod_getVnfResponseCode', 500)
- execution.setVariable('PUAAIVfMod_getVnfResponse', 'AAI GET Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in getGenericVnf(): ' + 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(Execution execution) {
- def method = getClass().getSimpleName() + '.validateVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def genericVnf = execution.getVariable('PUAAIVfMod_getVnfResponse')
- def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
- def vfModuleId = execution.getVariable('PUAAIVfMod_vfModuleId')
- def vnfName = getNodeTextForce(genericVnf, 'vnf-name')
- execution.setVariable('PUAAIVfMod_vnfName', vnfName)
- def VfModule vfModule = findVfModule(genericVnf, vfModuleId)
- if (vfModule == null) {
- def String msg = 'VF Module \'' + vfModuleId + '\' does not exist in Generic VNF \'' + vnfId + '\''
- execution.setVariable('PUAAIVfMod_vfModuleValidationError', msg)
- execution.setVariable('PUAAIVfMod_vfModuleOK', false)
- } else {
- def orchestrationStatus = execution.getVariable('PUAAIVfMod_orchestrationStatus')
- if (isDebugLogEnabled) {
- logDebug('VF Module \'' + vfModuleId + '\': isBaseVfModule=' + vfModule.isBaseVfModule() +
- ', isOnlyVfModule=' + vfModule.isOnlyVfModule() + ', new orchestration-status=' + orchestrationStatus,
- isDebugLogEnabled)
- }
- if (vfModule.isBaseVfModule() && !vfModule.isOnlyVfModule() && orchestrationStatus.equals('pending-delete')) {
- def String msg = 'Orchestration status for VF Module \'' + vfModuleId +
- '\' cannot be set to \'pending-delete\' since it is the base VF Module and it\'s not the only VF Module in Generic VNF \'' + vnfId + '\''
- execution.setVariable('PUAAIVfMod_vfModuleValidationError', msg)
- execution.setVariable('PUAAIVfMod_vfModuleOK', false)
- } else {
- execution.setVariable('PUAAIVfMod_vfModule', vfModule)
- execution.setVariable('PUAAIVfMod_vfModuleOK', true)
- }
- }
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in validateVfModule(): ' + e.getMessage())
- }
- }
-
- /**
- * Construct and send a PUT request to AAI to update the VF Module.
- *
- * @param execution The flow's execution instance.
- */
- public void updateVfModule(Execution execution) {
- def method = getClass().getSimpleName() + '.updateVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- // Construct payload
- def VfModule vfModule = (VfModule) execution.getVariable('PUAAIVfMod_vfModule')
- def Node newVfModuleNode = vfModule.getNode().clone()
- def orchestrationStatus = execution.getVariable('PUAAIVfMod_orchestrationStatus')
- def Node orchestrationStatusNode = utils.getChildNode(newVfModuleNode, 'orchestration-status')
- if (orchestrationStatusNode == null) {
- // Node doesn't exist, this should never happen, right?
- new Node(newVfModuleNode, 'orchestration-status', orchestrationStatus)
- } else {
- // Node already exists, just give it a new value
- orchestrationStatusNode.setValue(orchestrationStatus)
- }
- def VfModule newVfModule = new VfModule(newVfModuleNode, vfModule.isOnlyVfModule())
- def payload = utils.nodeToString(newVfModuleNode)
-
- // Construct endpoint
- def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
- def vfModuleId = execution.getVariable('PUAAIVfMod_vfModuleId')
-
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
-
- String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "/vf-modules/vf-module/" + UriUtils.encode(vfModuleId, "UTF-8")
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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');
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
- APIResponse response = client.httpPut(payload)
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', response.getStatusCode())
- execution.setVariable('PUAAIVfMod_updateVfModuleResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
-
- // Set the output for this flow. The updated VfModule is an output, the generic VNF name, and for
- // backward compatibilty, the heat-stack-id is an output
- execution.setVariable('PUAAIVfMod_outVfModule', newVfModule)
- def vnfName = execution.getVariable('PUAAIVfMod_vnfName')
- logDebug('Output PUAAIVfMod_vnfName set to ' + vnfName, isDebugLogEnabled)
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
- execution.setVariable('WorkflowResponse', newVfModule)
- logDebug('Output PUAAIVfMod_outVfModule set for VF Module Id \'' + newVfModule.getElementText('vf-module-id') + '\'', isDebugLogEnabled)
- def heatStackId = newVfModule.getElementText('heat-stack-id')
- execution.setVariable('PUAAIVfMod_heatStackId', heatStackId)
- logDebug('Output PUAAIVfMod_heatStackId set to \'' + heatStackId + '\'', isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(), isDebugLogEnabled)
- execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', 500)
- execution.setVariable('PUAAIVfMod_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
- }
- }
-
- /**
- * Generates a WorkflowException if the AAI query returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleVnfNotFound(Execution execution) {
- def method = getClass().getSimpleName() + '.handleVnfNotFound(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to query AAI, Response Code ' +
- execution.getVariable('PUAAIVfMod_getVnfResponseCode') + ', Error Response ' +
- execution.getVariable('PUAAIVfMod_getVnfResponse'))
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable('PUAAIVfMod_getVnfResponse'))
- execution.setVariable('WorkflowException', exception)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-
- /**
- * Generates a WorkflowException if the VF Module does not pass validation.
- *
- * @param execution The flow's execution instance.
- */
- public void handleVfModuleValidationError(Execution execution) {
- def method = getClass().getSimpleName() + '.handleVfModuleValidationError(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- def String errorMsg = 'VF Module validation error: ' + execution.getVariable('PUAAIVfMod_vfModuleValidationError')
- logError(errorMsg)
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000, errorMsg)
- execution.setVariable('WorkflowException', exception)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-
- /**
- * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleUpdateVfModuleFailure(Execution execution) {
- def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
- execution.getVariable('PUAAIVfMod_updateVfModuleResponseCode') + ', Error Response ' +
- execution.getVariable('PUAAIVfMod_updateVfModuleResponse'))
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable('PUAAIVfMod_updateVfModuleResponse'))
- execution.setVariable('WorkflowException', exception)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.springframework.web.util.UriUtils
+
+public class PrepareUpdateAAIVfModule extends VfModuleBase {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'PUAAIVfMod_')
+ execution.setVariable('PUAAIVfMod_vnfId', null)
+ execution.setVariable('PUAAIVfMod_vfModuleId', null)
+ execution.setVariable('PUAAIVfMod_vnfName', null)
+ execution.setVariable('PUAAIVfMod_orchestrationStatus', null)
+ execution.setVariable('PUAAIVfMod_vfModule', null)
+ execution.setVariable('PUAAIVfMod_vfModuleOK', false)
+ execution.setVariable('PUAAIVfMod_vfModuleValidationError', null)
+ execution.setVariable('PUAAIVfMod_getVnfResponseCode' ,null)
+ execution.setVariable('PUAAIVfMod_getVnfResponse', '')
+ execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', null)
+ execution.setVariable('PUAAIVfMod_updateVfModuleResponse', '')
+ execution.setVariable('PUAAIVfMod_outVfModule', null)
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def xml = execution.getVariable('PrepareUpdateAAIVfModuleRequest')
+ logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+ utils.logAudit("PrepareUpdateAAIVfModule Request : " + xml)
+
+ initProcessVariables(execution)
+
+ def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+ execution.setVariable('PUAAIVfMod_vnfId', vnfId)
+
+ def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
+ execution.setVariable('PUAAIVfMod_vfModuleId', vfModuleId)
+
+ def orchestrationStatus = getRequiredNodeText(execution, xml,'orchestration-status')
+ execution.setVariable('PUAAIVfMod_orchestrationStatus', orchestrationStatus)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Using the received vnfId, query AAI to get the corresponding Generic VNF.
+ * A 200 response is expected with the Generic VNF in the response body.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void getGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.getGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+
+ utils.logAudit("PrepareUpdateAAIVfModule: AAI endPoint : " + endPoint)
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+ 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');
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = client.httpGet()
+ utils.logAudit("PrepareUpdateAAIVfModule: - invoking httpGet to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ execution.setVariable('PUAAIVfMod_getVnfResponseCode', response.getStatusCode())
+ execution.setVariable('PUAAIVfMod_getVnfResponse', responseData)
+
+ utils.logAudit("PrepareUpdateAAIVfModule: AAI Response : " + responseData)
+ utils.logAudit("PrepareUpdateAAIVfModule: AAI ResponseCode : " + response.getStatusCode())
+
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(), isDebugLogEnabled)
+ execution.setVariable('PUAAIVfMod_getVnfResponseCode', 500)
+ execution.setVariable('PUAAIVfMod_getVnfResponse', 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getGenericVnf(): ' + 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.validateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def genericVnf = execution.getVariable('PUAAIVfMod_getVnfResponse')
+ def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
+ def vfModuleId = execution.getVariable('PUAAIVfMod_vfModuleId')
+ def vnfName = getNodeTextForce(genericVnf, 'vnf-name')
+ execution.setVariable('PUAAIVfMod_vnfName', vnfName)
+ def VfModule vfModule = findVfModule(genericVnf, vfModuleId)
+ if (vfModule == null) {
+ def String msg = 'VF Module \'' + vfModuleId + '\' does not exist in Generic VNF \'' + vnfId + '\''
+ execution.setVariable('PUAAIVfMod_vfModuleValidationError', msg)
+ execution.setVariable('PUAAIVfMod_vfModuleOK', false)
+ } else {
+ def orchestrationStatus = execution.getVariable('PUAAIVfMod_orchestrationStatus')
+ if (isDebugLogEnabled) {
+ logDebug('VF Module \'' + vfModuleId + '\': isBaseVfModule=' + vfModule.isBaseVfModule() +
+ ', isOnlyVfModule=' + vfModule.isOnlyVfModule() + ', new orchestration-status=' + orchestrationStatus,
+ isDebugLogEnabled)
+ }
+ if (vfModule.isBaseVfModule() && !vfModule.isOnlyVfModule() && orchestrationStatus.equals('pending-delete')) {
+ def String msg = 'Orchestration status for VF Module \'' + vfModuleId +
+ '\' cannot be set to \'pending-delete\' since it is the base VF Module and it\'s not the only VF Module in Generic VNF \'' + vnfId + '\''
+ execution.setVariable('PUAAIVfMod_vfModuleValidationError', msg)
+ execution.setVariable('PUAAIVfMod_vfModuleOK', false)
+ } else {
+ execution.setVariable('PUAAIVfMod_vfModule', vfModule)
+ execution.setVariable('PUAAIVfMod_vfModuleOK', true)
+ }
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in validateVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Construct and send a PATCH request to AAI to update the VF Module.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void updateVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.updateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ // Construct payload
+ def VfModule vfModule = (VfModule) execution.getVariable('PUAAIVfMod_vfModule')
+ def Node newVfModuleNode = vfModule.getNode().clone()
+ def orchestrationStatus = execution.getVariable('PUAAIVfMod_orchestrationStatus')
+ def Node orchestrationStatusNode = utils.getChildNode(newVfModuleNode, 'orchestration-status')
+ if (orchestrationStatusNode == null) {
+ // Node doesn't exist, this should never happen, right?
+ new Node(newVfModuleNode, 'orchestration-status', orchestrationStatus)
+ } else {
+ // Node already exists, just give it a new value
+ orchestrationStatusNode.setValue(orchestrationStatus)
+ }
+ def VfModule newVfModule = new VfModule(newVfModuleNode, vfModule.isOnlyVfModule())
+ //def payload = utils.nodeToString(newVfModuleNode)
+
+ // Construct endpoint
+ def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
+ def vfModuleId = execution.getVariable('PUAAIVfMod_vfModuleId')
+
+ def payload = """{
+ "vf-module-id": "${vfModuleId}",
+ "orchestration-status": "${orchestrationStatus}"
+ }"""
+
+ utils.logAudit("VfModule payload : " + payload)
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "/vf-modules/vf-module/" + UriUtils.encode(vfModuleId, "UTF-8")
+ utils.logAudit("PrepareUpdateAAIVfModule: AAI endPoint : " + endPoint)
+ String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+ 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/merge-patch+json').
+ addHeader('Accept','application/json');
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ logDebug('sending PATCH to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+ APIResponse response = client.httpPatch(payload)
+ utils.logAudit("PrepareUpdateAAIVfModule: - invoking httpPatch to AAI")
+ utils.logAudit("PrepareUpdateAAIVfModule: - invoking httpPatch to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('PUAAIVfMod_updateVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ utils.logAudit("PrepareUpdateAAIVfModule: AAI Response : " + responseData)
+ utils.logAudit("PrepareUpdateAAIVfModule: AAI ResponseCode : " + response.getStatusCode())
+
+ // Set the output for this flow. The updated VfModule is an output, the generic VNF name, and for
+ // backward compatibilty, the heat-stack-id is an output
+ execution.setVariable('PUAAIVfMod_outVfModule', newVfModule)
+ def vnfName = execution.getVariable('PUAAIVfMod_vnfName')
+ logDebug('Output PUAAIVfMod_vnfName set to ' + vnfName, isDebugLogEnabled)
+ // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+ execution.setVariable('WorkflowResponse', newVfModule)
+ logDebug('Output PUAAIVfMod_outVfModule set for VF Module Id \'' + newVfModule.getElementText('vf-module-id') + '\'', isDebugLogEnabled)
+ def heatStackId = newVfModule.getElementText('heat-stack-id')
+ execution.setVariable('PUAAIVfMod_heatStackId', heatStackId)
+ logDebug('Output PUAAIVfMod_heatStackId set to \'' + heatStackId + '\'', isDebugLogEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(), isDebugLogEnabled)
+ execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', 500)
+ execution.setVariable('PUAAIVfMod_updateVfModuleResponse', 'AAI PATCH Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Generates a WorkflowException if the AAI query returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleVnfNotFound(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleVnfNotFound(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to query AAI, Response Code ' +
+ execution.getVariable('PUAAIVfMod_getVnfResponseCode') + ', Error Response ' +
+ execution.getVariable('PUAAIVfMod_getVnfResponse'))
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable('PUAAIVfMod_getVnfResponse'))
+ execution.setVariable('WorkflowException', exception)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+
+ /**
+ * Generates a WorkflowException if the VF Module does not pass validation.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleVfModuleValidationError(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleVfModuleValidationError(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ def String errorMsg = 'VF Module validation error: ' + execution.getVariable('PUAAIVfMod_vfModuleValidationError')
+ logError(errorMsg)
+ utils.logAudit("PrepareUpdateAAIVfModule: Error Message : " + errorMsg)
+
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000, errorMsg)
+ execution.setVariable('WorkflowException', exception)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+
+ /**
+ * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleUpdateVfModuleFailure(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
+ execution.getVariable('PUAAIVfMod_updateVfModuleResponseCode') + ', Error Response ' +
+ execution.getVariable('PUAAIVfMod_updateVfModuleResponse'))
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable('PUAAIVfMod_updateVfModuleResponse'))
+ execution.setVariable('WorkflowException', exception)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapter.groovy
index 8bd6983cc4..0f05a6b82c 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapter.groovy
@@ -1,368 +1,334 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import java.text.SimpleDateFormat
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.codec.binary.Base64;
-
-
-// SDNC Adapter Request/Response processing
-
-public class SDNCAdapter extends AbstractServiceTaskProcessor {
-
- def Prefix="SDNCA_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- // Script Task: Process SDNC Workflow Request
- // Params: Workflow Execution
- // Assume: Received SDNCAdapterWorkflowRequest is in variable 'sdncAdapterWorkflowRequest'
- // Put created SDNCAdapterRequest in variable 'sdncAdapterRequest'
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- try{
-
- utils.log("DEBUG", "=========== Begin PreProcess SDNCAdapterRequestScript ===========", isDebugEnabled)
- utils.log("DEBUG", "Incoming sdncAdapterWorkflowRequest:\n" + execution.getVariable("sdncAdapterWorkflowRequest"), isDebugEnabled)
-
- // Initialize some variables used throughout the flow
- execution.setVariable("prefix", Prefix)
- execution.setVariable("sdncAdapterResponse", "")
- execution.setVariable("asynchronousResponseTimeout", false)
- execution.setVariable("continueListening", false)
- execution.setVariable("SDNCA_SuccessIndicator", false)
-
- // Authorization Info
- String basicAuthValue = execution.getVariable("URN_mso_adapters_po_auth")
- utils.log("DEBUG", "Obtained BasicAuth userid password for sdnc adapter:" + basicAuthValue, isDebugEnabled)
- try {
- def encodedString = utils.getBasicAuth(basicAuthValue, execution.getVariable("URN_mso_msoKey"))
- execution.setVariable("BasicAuthHeaderValue",encodedString)
- } catch (IOException ex) {
- utils.log("ERROR", "Unable to encode username password string")
- }
-
- // TODO Use variables instead of passing xml request - Huh?
-
- // Get original RequestHeader
- def sdncwfreq= execution.getVariable("sdncAdapterWorkflowRequest")
- def requestHeader = utils.getNodeXml(sdncwfreq, "RequestHeader")
- requestHeader = requestHeader.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
- utils.log("DEBUG", "RequestHeader:\n" + requestHeader, isDebugEnabled)
-
- // Set Callback URL to use from URN Mapping or jBoss Property
- def origCallbackUrl = utils.getNodeText(requestHeader, "CallbackUrl")
- def callbackUrlToUse = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
- MsoUtils msoUtil = new MsoUtils()
- def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
- if((useQualifiedHostName!=null) && (useQualifiedHostName.equals("true"))){
- callbackUrlToUse = msoUtil.getQualifiedHostNameForCallback(callbackUrlToUse)
- }
- utils.log("DEBUG", "Callback URL to use:\n" + callbackUrlToUse, isDebugEnabled)
- requestHeader = requestHeader.replace(origCallbackUrl, callbackUrlToUse)
-
- // Get parameters from request header
- def sdnca_svcInstanceId = utils.getNodeText1(requestHeader, "SvcInstanceId") // optional
- utils.log("DEBUG", "SvcInstanceId: " + sdnca_svcInstanceId, isDebugEnabled)
- def sdnca_msoAction = utils.getNodeText1(requestHeader, "MsoAction") // optional
- utils.log("DEBUG", "MsoAction: " + sdnca_msoAction, isDebugEnabled)
- def sdnca_svcAction = utils.getNodeText(requestHeader, "SvcAction")
- utils.log("DEBUG", "SvcAction: " + sdnca_svcAction, isDebugEnabled)
- def sdnca_svcOperation = utils.getNodeText(requestHeader, "SvcOperation")
- utils.log("DEBUG", "SvcOperation: " + sdnca_svcOperation, isDebugEnabled)
- def sdncRequestData = utils.getChildNodes(sdncwfreq, "SDNCRequestData")
- sdncRequestData = sdncRequestData.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
- sdncRequestData = sdncRequestData.replaceAll('tag0:', '').replaceAll(':tag0', '')
- utils.log("DEBUG", "SDNCRequestData:\n" + sdncRequestData, isDebugEnabled)
- def sdnca_serviceType = ""
- if (utils.nodeExists(sdncwfreq, "service-type")) {
- sdnca_serviceType = utils.getNodeText(sdncwfreq, "service-type")
- }
- utils.log("DEBUG", "service-type: " + sdnca_serviceType, isDebugEnabled)
- def serviceConfigActivate = false
- def source = ''
-
- execution.setVariable("serviceConfigActivate", serviceConfigActivate)
- utils.log("DEBUG", "serviceConfigActivate: " + serviceConfigActivate, isDebugEnabled)
- execution.setVariable("source", source)
- utils.log("DEBUG", "source: " + source, isDebugEnabled)
-
- //calling process should pass a generated uuid if sending multiple sdnc requests
- def requestId = utils.getNodeText(requestHeader, "RequestId")
- execution.setVariable(Prefix + "requestId", requestId)
-
- // Prepare SDNC Request to the SDNC Adapter
- String sdncAdapterRequest = """
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-ENV:Body>
- <aetgt:SDNCAdapterRequest xmlns:aetgt="http://domain2.att.com/workflow/sdnc/adapter/schema/v1" xmlns:sdncadaptersc="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>"""
-
- if (sdnca_svcInstanceId != null) {
- sdncAdapterRequest += """
- <sdncadapter:SvcInstanceId>${sdnca_svcInstanceId}</sdncadapter:SvcInstanceId>"""
- }
-
- sdncAdapterRequest += """
- <sdncadapter:SvcAction>${sdnca_svcAction}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>${sdnca_svcOperation}</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackUrlToUse}</sdncadapter:CallbackUrl>"""
-
- if (sdnca_msoAction != null) {
- sdncAdapterRequest += """
- <sdncadapter:MsoAction>${sdnca_msoAction}</sdncadapter:MsoAction>"""
- }
-
- sdncAdapterRequest += """
- </sdncadapter:RequestHeader>
- <sdncadaptersc:RequestData>${sdncRequestData}</sdncadaptersc:RequestData></aetgt:SDNCAdapterRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>"""
-
- utils.logAudit("Outgoing SDNCAdapterRequest:\n" + sdncAdapterRequest)
- execution.setVariable("sdncAdapterRequest", sdncAdapterRequest)
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import java.text.SimpleDateFormat
+
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+// SDNC Adapter Request/Response processing
+
+public class SDNCAdapter extends AbstractServiceTaskProcessor {
+
+ def Prefix="SDNCA_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ // Script Task: Process SDNC Workflow Request
+ // Params: Workflow Execution
+ // Assume: Received SDNCAdapterWorkflowRequest is in variable 'sdncAdapterWorkflowRequest'
+ // Put created SDNCAdapterRequest in variable 'sdncAdapterRequest'
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ try{
+
+ utils.log("DEBUG", "=========== Begin PreProcess SDNCAdapterRequestScript ===========", isDebugEnabled)
+ utils.log("DEBUG", "Incoming sdncAdapterWorkflowRequest:\n" + execution.getVariable("sdncAdapterWorkflowRequest"), isDebugEnabled)
+
+ // Initialize some variables used throughout the flow
+ execution.setVariable("prefix", Prefix)
+ execution.setVariable("sdncAdapterResponse", "")
+ execution.setVariable("asynchronousResponseTimeout", false)
+ execution.setVariable("continueListening", false)
+ execution.setVariable("SDNCA_SuccessIndicator", false)
+
+ // Authorization Info
+ String basicAuthValue = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", "Obtained BasicAuth userid password for sdnc adapter:" + basicAuthValue, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValue, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValue",encodedString)
+ } catch (IOException ex) {
+ utils.log("ERROR", "Unable to encode username password string")
+ }
+
+ // TODO Use variables instead of passing xml request - Huh?
+
+ // Get original RequestHeader
+ def sdncwfreq= execution.getVariable("sdncAdapterWorkflowRequest")
+ def requestHeader = utils.getNodeXml(sdncwfreq, "RequestHeader")
+ requestHeader = requestHeader.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+ utils.log("DEBUG", "RequestHeader:\n" + requestHeader, isDebugEnabled)
+
+ // Set Callback URL to use from URN Mapping or jBoss Property
+ def origCallbackUrl = utils.getNodeText(requestHeader, "CallbackUrl")
+ def callbackUrlToUse = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ MsoUtils msoUtil = new MsoUtils()
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if((useQualifiedHostName!=null) && (useQualifiedHostName.equals("true"))){
+ callbackUrlToUse = msoUtil.getQualifiedHostNameForCallback(callbackUrlToUse)
+ }
+ utils.log("DEBUG", "Callback URL to use:\n" + callbackUrlToUse, isDebugEnabled)
+ requestHeader = requestHeader.replace(origCallbackUrl, callbackUrlToUse)
+
+ // Get parameters from request header
+ def sdnca_svcInstanceId = utils.getNodeText1(requestHeader, "SvcInstanceId") // optional
+ utils.log("DEBUG", "SvcInstanceId: " + sdnca_svcInstanceId, isDebugEnabled)
+ def sdnca_msoAction = utils.getNodeText1(requestHeader, "MsoAction") // optional
+ utils.log("DEBUG", "MsoAction: " + sdnca_msoAction, isDebugEnabled)
+ def sdnca_svcAction = utils.getNodeText(requestHeader, "SvcAction")
+ utils.log("DEBUG", "SvcAction: " + sdnca_svcAction, isDebugEnabled)
+ def sdnca_svcOperation = utils.getNodeText(requestHeader, "SvcOperation")
+ utils.log("DEBUG", "SvcOperation: " + sdnca_svcOperation, isDebugEnabled)
+ def sdncRequestData = utils.getChildNodes(sdncwfreq, "SDNCRequestData")
+ sdncRequestData = sdncRequestData.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+ sdncRequestData = sdncRequestData.replaceAll('tag0:', '').replaceAll(':tag0', '')
+ utils.log("DEBUG", "SDNCRequestData:\n" + sdncRequestData, isDebugEnabled)
+ def sdnca_serviceType = ""
+ if (utils.nodeExists(sdncwfreq, "service-type")) {
+ sdnca_serviceType = utils.getNodeText(sdncwfreq, "service-type")
+ }
+ utils.log("DEBUG", "service-type: " + sdnca_serviceType, isDebugEnabled)
+ def serviceConfigActivate = false
+ def source = ''
+ if ((sdnca_svcAction == 'activate') && (sdnca_svcOperation == 'service-configuration-operation') && (sdnca_serviceType == 'uCPE-VMS')) {
+ serviceConfigActivate = true
+ if (utils.nodeExists(sdncwfreq, 'source')) {
+ source = utils.getNodeText(sdncwfreq, 'source')
+ }
+ }
+ execution.setVariable("serviceConfigActivate", serviceConfigActivate)
+ utils.log("DEBUG", "serviceConfigActivate: " + serviceConfigActivate, isDebugEnabled)
+ execution.setVariable("source", source)
+ utils.log("DEBUG", "source: " + source, isDebugEnabled)
+
+ //calling process should pass a generated uuid if sending multiple sdnc requests
+ def requestId = utils.getNodeText(requestHeader, "RequestId")
+ execution.setVariable(Prefix + "requestId", requestId)
+
+ // Prepare SDNC Request to the SDNC Adapter
+ String sdncAdapterRequest = """
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <SOAP-ENV:Body>
+ <aetgt:SDNCAdapterRequest xmlns:aetgt="http://org.openecomp/workflow/sdnc/adapter/schema/v1" xmlns:sdncadaptersc="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>"""
+
+ if (sdnca_svcInstanceId != null) {
+ sdncAdapterRequest += """
+ <sdncadapter:SvcInstanceId>${sdnca_svcInstanceId}</sdncadapter:SvcInstanceId>"""
+ }
+
+ sdncAdapterRequest += """
+ <sdncadapter:SvcAction>${sdnca_svcAction}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${sdnca_svcOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrlToUse}</sdncadapter:CallbackUrl>"""
+
+ if (sdnca_msoAction != null) {
+ sdncAdapterRequest += """
+ <sdncadapter:MsoAction>${sdnca_msoAction}</sdncadapter:MsoAction>"""
+ }
+
+ sdncAdapterRequest += """
+ </sdncadapter:RequestHeader>
+ <sdncadaptersc:RequestData>${sdncRequestData}</sdncadaptersc:RequestData></aetgt:SDNCAdapterRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>"""
+
+ utils.logAudit("Outgoing SDNCAdapterRequest:\n" + sdncAdapterRequest)
+ execution.setVariable("sdncAdapterRequest", sdncAdapterRequest)
+
utils.log("DEBUG", execution.getVariable("sdncAdapterRequest"), isDebugEnabled)
utils.log("DEBUG", execution.getVariable("URN_mso_adapters_sdnc_endpoint"), isDebugEnabled)
- }catch(Exception e){
- utils.log("DEBUG", 'Internal Error occured during PreProcess Method: ' + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error occured during PreProcess Method') // TODO: what message and error code?
- }
- utils.log("DEBUG","=========== End pre Process SDNCRequestScript ===========", isDebugEnabled)
- }
-
- public void postProcessResponse (Execution execution) {
-
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- try{
- utils.log("DEBUG","=========== Begin POSTProcess SDNCAdapter ===========", isDebugEnabled)
- utils.log("DEBUG","Incoming sdncAdapterCallbackRequest:\n" + execution.getVariable("sdncAdapterCallbackRequest"), isDebugEnabled)
-
- // Check the sdnccallback request and get the responsecode
- def sdnccallbackreq = execution.getVariable("sdncAdapterCallbackRequest")
- def callbackRequestData = ""
- def callbackHeader = ""
-
- if(sdnccallbackreq != null){
- callbackHeader = utils.getNodeXml(sdnccallbackreq, "CallbackHeader")
- callbackRequestData = utils.getNodeXml(sdnccallbackreq, "RequestData")
-
- callbackHeader = callbackHeader.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
- utils.log("DEBUG","SDNCCallbackHeader is:\n" + callbackHeader, isDebugEnabled)
-
- callbackRequestData = callbackRequestData.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
- utils.log("DEBUG","DECODED SDNCCallback RequestData is:\n" + callbackRequestData, isDebugEnabled)
-
- String sdncAdapterWorkflowResponse ="""
- <sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1">
- <sdncadapterworkflow:response-data>
- ${callbackHeader}
- ${callbackRequestData}
- </sdncadapterworkflow:response-data>
- </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
-
-
- utils.log("DEBUG","Outgoing sdncAdapterWorkflowResponse:\n" + sdncAdapterWorkflowResponse, isDebugEnabled)
- sdncAdapterWorkflowResponse = utils.formatXml(sdncAdapterWorkflowResponse)
- execution.setVariable("sdncAdapterResponse", sdncAdapterWorkflowResponse)
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
- execution.setVariable("WorkflowResponse", sdncAdapterWorkflowResponse)
-
- // Check final indicator to determine if we are to continue listening or not
- def String enhancedCallbackRequestData = callbackRequestData.replaceAll("&amp;", "&")
- enhancedCallbackRequestData = enhancedCallbackRequestData.replaceAll("&lt;", "<")
- enhancedCallbackRequestData = enhancedCallbackRequestData.replaceAll("&gt;", ">")
- // replace the data with '&' (ex: subscriber-name= 'FOUR SEASONS HEATING & COOLING'
- enhancedCallbackRequestData = enhancedCallbackRequestData.replace("&", "&amp;")
- utils.log("DEBUG","EnhancedCallbackRequestData:\n" + enhancedCallbackRequestData, isDebugEnabled)
- execution.setVariable("enhancedCallbackRequestData", enhancedCallbackRequestData)
- def continueListening = false
- if (utils.nodeExists(enhancedCallbackRequestData, "ack-final-indicator")) {
- if (utils.getNodeText(enhancedCallbackRequestData, "ack-final-indicator") == 'N') {
- continueListening = true
- }
- }
- execution.setVariable("continueListening", continueListening)
- utils.log("DEBUG", "Continue Listening: " + continueListening, isDebugEnabled)
- }else{
- // Timed out waiting for asynchronous message, build error response
- exceptionUtil.buildWorkflowException(execution, 500, "SDNC Callback Timeout Error")
- execution.setVariable("asynchronousResponseTimeout", true)
- utils.log("DEBUG", "Timed out waiting for asynchronous message", isDebugEnabled)
- }
- }catch(Exception e){
- utils.log("DEBUG", 'Internal Error occured during PostProcess Method: ' + e, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error occured during PostProcess Method') // TODO: what message and error code?
- }
- utils.log("DEBUG","=========== End POSTProcess SDNCAdapter ===========", isDebugEnabled)
- }
-
- public void callbackResponsecheck(Execution execution){
-
- def sdnccallbackreq=execution.getVariable("sdncAdapterCallbackRequest")
- if (sdnccallbackreq==null){
- execution.setVariable("callbackResponseReceived",false);
- }else{
- execution.setVariable("callbackResponseReceived",true);
- }
- }
-
- public void resetCallbackRequest(Execution execution) {
-
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- utils.log("DEBUG","=========== Begin Reset Callback Info SDNCAdapter ===========", isDebugEnabled)
-
- // Clear sdncAdapterCallbackRequest variable
- execution.removeVariable("sdncAdapterCallbackRequest")
-
- // Determine and set SDNC Timeout Value
- def enhancedCallbackRequestData = execution.getVariable("enhancedCallbackRequestData")
- def interim = false
- if (enhancedCallbackRequestData != null) {
- if (utils.nodeExists(enhancedCallbackRequestData, "ack-final-indicator")) {
- if (utils.getNodeText(enhancedCallbackRequestData, "ack-final-indicator") == 'N') {
- interim = true
- }
- }
- }
- def timeoutValue = execution.getVariable("URN_mso_sdnc_timeout")
- def sdncAdapterWorkflowRequest = execution.getVariable("sdncAdapterWorkflowRequest")
- if (interim && utils.nodeExists(sdncAdapterWorkflowRequest, "InterimSDNCTimeOutValueInHours")) {
- timeoutValue = "PT" + utils.getNodeText(sdncAdapterWorkflowRequest, "InterimSDNCTimeOutValueInHours") + "H"
- } else if (utils.nodeExists(sdncAdapterWorkflowRequest, "SDNCTimeOutValueInMinutes")) {
- timeoutValue = "PT" + utils.getNodeText(sdncAdapterWorkflowRequest, "SDNCTimeOutValueInMinutes") + "M"
- }
- execution.setVariable("sdncTimeoutValue", timeoutValue)
- utils.log("DEBUG", "Setting SDNC Timeout Value to " + timeoutValue, isDebugEnabled)
-
- utils.log("DEBUG","=========== End Reset Callback Info SDNCAdapter ===========", isDebugEnabled)
- }
-
- public void prepareCSIMessage(Execution execution) {
-
- }
-
- public void prepareDBMessage(Execution execution) {
-
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- utils.log("DEBUG","=========== Begin Prepare DB Message SDNCAdapter ===========", isDebugEnabled)
-
- // Create DB Message
- def dbRequestId = execution.getVariable("att-mso-request-id")
- String dbUpdateInterimStageCompletion = """
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-ENV:Body>
- <DBAdapter:updateInterimStageCompletion xmlns:DBAdapter="http://com.att.mso/requestsdb">
- <requestId>${dbRequestId}</requestId>
- <interimStageCompletion>1</interimStageCompletion>
- <lastModifiedBy>BPEL</lastModifiedBy>
- </DBAdapter:updateInterimStageCompletion>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- """
-
- execution.setVariable("dbUpdateInterimStageCompletion", dbUpdateInterimStageCompletion)
- utils.log("DEBUG","DB UpdateInterimStageCompletion:\n" + dbUpdateInterimStageCompletion, isDebugEnabled)
-
- utils.log("DEBUG","=========== End Prepare DB Message SDNCAdapter ===========", isDebugEnabled)
- }
-
- public void prepareCCDMessage(Execution execution) {
-
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
- utils.log("DEBUG","=========== Begin Prepare CCD Message SDNCAdapter ===========", isDebugEnabled)
-
- try {
- def sdncwfreq= execution.getVariable("sdncAdapterWorkflowRequest")
- def sdncRequestData = utils.getNodeXml(sdncwfreq, "SDNCRequestData", false)
-
- def ccdNotificationUrl = utils.getNodeText(sdncRequestData, 'notification-url')
- execution.setVariable('ccd-notification-url', ccdNotificationUrl)
- utils.log("DEBUG", 'ccd-notification-url: ' + ccdNotificationUrl, isDebugEnabled)
-
- def requestId = utils.getNodeText(sdncRequestData, 'request-id')
- def requestAction = utils.getNodeText(sdncRequestData, 'request-action')
- String payload ="""
- <ns:status-notification
- xmlns:ns="http://ecomp.att.com/mso/statusnotification/schema/v1"
- xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
- xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
- <msoservtypes:request-id>${requestId}</msoservtypes:request-id>
- <msoservtypes:request-action>${requestAction}</msoservtypes:request-action>
- <msoservtypes:source>CCD</msoservtypes:source>
- <msoservtypes:ack-final-indicator>N</msoservtypes:ack-final-indicator>
- <structuredtypes:parameter-list>
- <structuredtypes:parameter>
- <structuredtypes:name>request-stage</structuredtypes:name>
- <structuredtypes:value>DataStagingComplete</structuredtypes:value>
- </structuredtypes:parameter>
- </structuredtypes:parameter-list>
- </ns:status-notification>
- """
-
- payload = utils.formatXml(payload)
- execution.setVariable('ccd-notification-payload', payload)
- utils.log("DEBUG", 'ccd-notification-payload:\n' + payload, isDebugEnabled)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in prepareCCDMessage', e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error') // TODO: what message and error code?
- }
-
- utils.log("DEBUG","=========== End Prepare CCD Message SDNCAdapter ===========", isDebugEnabled)
- }
-
- public String generateCurrentTimeInUtc(){
- final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
- final String utcTime = sdf.format(new Date());
- return utcTime;
- }
-
- public void toggleSuccessIndicator(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("SDNCA_SuccessIndicator", true)
- utils.log("DEBUG","Setting SDNCA Success Indicator to True", isDebugEnabled)
- }
-
- public void assignError(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG","=========== Started Assign Error ===========", isDebugEnabled)
- WorkflowException wf = execution.getVariable("WorkflowException")
- if(wf == null){
- exceptionUtil.buildWorkflowException(execution, 5000, "SDNCAdapter Encountered an Internal Error") // TODO: Not sure what message and error code we want here.....
- }else{
- execution.setVariable("WorkflowException", wf)
- }
-
- utils.log("DEBUG","Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- utils.log("DEBUG","=========== End Assign Error ===========", isDebugEnabled)
- }
-
-}
-
+ }catch(Exception e){
+ utils.log("DEBUG", 'Internal Error occured during PreProcess Method: ' + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error occured during PreProcess Method') // TODO: what message and error code?
+ }
+ utils.log("DEBUG","=========== End pre Process SDNCRequestScript ===========", isDebugEnabled)
+ }
+
+ public void postProcessResponse (Execution execution) {
+
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ try{
+ utils.log("DEBUG","=========== Begin POSTProcess SDNCAdapter ===========", isDebugEnabled)
+ utils.log("DEBUG","Incoming sdncAdapterCallbackRequest:\n" + execution.getVariable("sdncAdapterCallbackRequest"), isDebugEnabled)
+
+ // Check the sdnccallback request and get the responsecode
+ def sdnccallbackreq = execution.getVariable("sdncAdapterCallbackRequest")
+ def callbackRequestData = ""
+ def callbackHeader = ""
+ utils.logAudit("SDNCAdapterCallback Request :" + sdnccallbackreq)
+
+ if(sdnccallbackreq != null){
+ callbackHeader = utils.getNodeXml(sdnccallbackreq, "CallbackHeader")
+ callbackRequestData = utils.getNodeXml(sdnccallbackreq, "RequestData")
+
+ callbackHeader = callbackHeader.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+ utils.log("DEBUG","SDNCCallbackHeader is:\n" + callbackHeader, isDebugEnabled)
+
+ callbackRequestData = callbackRequestData.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+ utils.log("DEBUG","DECODED SDNCCallback RequestData is:\n" + callbackRequestData, isDebugEnabled)
+
+ String sdncAdapterWorkflowResponse ="""
+ <sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ ${callbackHeader}
+ ${callbackRequestData}
+ </sdncadapterworkflow:response-data>
+ </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+
+ utils.log("DEBUG","Outgoing sdncAdapterWorkflowResponse:\n" + sdncAdapterWorkflowResponse, isDebugEnabled)
+ sdncAdapterWorkflowResponse = utils.formatXml(sdncAdapterWorkflowResponse)
+ utils.logAudit("sdncAdapterWorkflowResponse :" + sdncAdapterWorkflowResponse)
+ execution.setVariable("sdncAdapterResponse", sdncAdapterWorkflowResponse)
+ // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+ execution.setVariable("WorkflowResponse", sdncAdapterWorkflowResponse)
+
+ // Check final indicator to determine if we are to continue listening or not
+ def String enhancedCallbackRequestData = callbackRequestData.replaceAll("&amp;", "&")
+ enhancedCallbackRequestData = enhancedCallbackRequestData.replaceAll("&lt;", "<")
+ enhancedCallbackRequestData = enhancedCallbackRequestData.replaceAll("&gt;", ">")
+ // replace the data with '&' (ex: subscriber-name= 'FOUR SEASONS HEATING & COOLING'
+ enhancedCallbackRequestData = enhancedCallbackRequestData.replace("&", "&amp;")
+ utils.log("DEBUG","EnhancedCallbackRequestData:\n" + enhancedCallbackRequestData, isDebugEnabled)
+ execution.setVariable("enhancedCallbackRequestData", enhancedCallbackRequestData)
+ def continueListening = false
+ if (utils.nodeExists(enhancedCallbackRequestData, "ack-final-indicator")) {
+ if (utils.getNodeText(enhancedCallbackRequestData, "ack-final-indicator") == 'N') {
+ continueListening = true
+ }
+ }
+ execution.setVariable("continueListening", continueListening)
+ utils.log("DEBUG", "Continue Listening: " + continueListening, isDebugEnabled)
+ execution.setVariable("asynchronousResponseTimeout", false)
+ }else{
+ // Timed out waiting for asynchronous message, build error response
+ exceptionUtil.buildWorkflowException(execution, 500, "SDNC Callback Timeout Error")
+ execution.setVariable("asynchronousResponseTimeout", true)
+ utils.log("DEBUG", "Timed out waiting for asynchronous message", isDebugEnabled)
+ }
+ }catch(Exception e){
+ utils.log("DEBUG", 'Internal Error occured during PostProcess Method: ' + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error occured during PostProcess Method') // TODO: what message and error code?
+ }
+ utils.log("DEBUG","=========== End POSTProcess SDNCAdapter ===========", isDebugEnabled)
+ }
+
+ public void callbackResponsecheck(Execution execution){
+
+ def sdnccallbackreq=execution.getVariable("sdncAdapterCallbackRequest")
+ utils.logAudit("sdncAdapterCallbackRequest :" + sdnccallbackreq)
+ if (sdnccallbackreq==null){
+ execution.setVariable("callbackResponseReceived",false);
+ }else{
+ execution.setVariable("callbackResponseReceived",true);
+ }
+ }
+
+ public void resetCallbackRequest(Execution execution) {
+
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG","=========== Begin Reset Callback Info SDNCAdapter ===========", isDebugEnabled)
+
+ // Clear sdncAdapterCallbackRequest variable
+ execution.removeVariable("sdncAdapterCallbackRequest")
+
+ // Determine and set SDNC Timeout Value
+ def enhancedCallbackRequestData = execution.getVariable("enhancedCallbackRequestData")
+ utils.logAudit("sdncAdapter - enhancedCallbackRequestData :" + enhancedCallbackRequestData)
+ def interim = false
+ if (enhancedCallbackRequestData != null) {
+ if (utils.nodeExists(enhancedCallbackRequestData, "ack-final-indicator")) {
+ if (utils.getNodeText(enhancedCallbackRequestData, "ack-final-indicator") == 'N') {
+ interim = true
+ }
+ }
+ }
+ def timeoutValue = execution.getVariable("URN_mso_sdnc_timeout")
+ def sdncAdapterWorkflowRequest = execution.getVariable("sdncAdapterWorkflowRequest")
+ if (interim && utils.nodeExists(sdncAdapterWorkflowRequest, "InterimSDNCTimeOutValueInHours")) {
+ timeoutValue = "PT" + utils.getNodeText(sdncAdapterWorkflowRequest, "InterimSDNCTimeOutValueInHours") + "H"
+ } else if (utils.nodeExists(sdncAdapterWorkflowRequest, "SDNCTimeOutValueInMinutes")) {
+ timeoutValue = "PT" + utils.getNodeText(sdncAdapterWorkflowRequest, "SDNCTimeOutValueInMinutes") + "M"
+ }
+ execution.setVariable("sdncTimeoutValue", timeoutValue)
+ utils.log("DEBUG", "Setting SDNC Timeout Value to " + timeoutValue, isDebugEnabled)
+
+ utils.log("DEBUG","=========== End Reset Callback Info SDNCAdapter ===========", isDebugEnabled)
+ }
+
+
+ public void prepareDBMessage(Execution execution) {
+
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG","=========== Begin Prepare DB Message SDNCAdapter ===========", isDebugEnabled)
+
+ // Create DB Message
+ def dbRequestId = execution.getVariable("mso-request-id")
+ String dbUpdateInterimStageCompletion = """
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <SOAP-ENV:Body>
+ <DBAdapter:updateInterimStageCompletion xmlns:DBAdapter="http://org.openecomp.mso/requestsdb">
+ <requestId>${dbRequestId}</requestId>
+ <interimStageCompletion>1</interimStageCompletion>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ </DBAdapter:updateInterimStageCompletion>
+ </SOAP-ENV:Body>
+ </SOAP-ENV:Envelope>
+ """
+
+ execution.setVariable("dbUpdateInterimStageCompletion", dbUpdateInterimStageCompletion)
+ utils.logAudit("sdncAdapter - dbUpdateInterimStageCompletion :" + dbUpdateInterimStageCompletion)
+ utils.log("DEBUG","DB UpdateInterimStageCompletion:\n" + dbUpdateInterimStageCompletion, isDebugEnabled)
+ utils.log("DEBUG","=========== End Prepare DB Message SDNCAdapter ===========", isDebugEnabled)
+ }
+
+ public String generateCurrentTimeInUtc(){
+ final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+ final String utcTime = sdf.format(new Date());
+ return utcTime;
+ }
+
+ public void toggleSuccessIndicator(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("SDNCA_SuccessIndicator", true)
+ utils.log("DEBUG","Setting SDNCA Success Indicator to True", isDebugEnabled)
+ }
+
+ public void assignError(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG","=========== Started Assign Error ===========", isDebugEnabled)
+ WorkflowException wf = execution.getVariable("WorkflowException")
+ if(wf == null){
+ exceptionUtil.buildWorkflowException(execution, 5000, "SDNCAdapter Encountered an Internal Error") // TODO: Not sure what message and error code we want here.....
+ }else{
+ execution.setVariable("WorkflowException", wf)
+ }
+
+ utils.log("DEBUG","Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+ utils.log("DEBUG","=========== End Assign Error ===========", isDebugEnabled)
+ }
+
+ public void setTimeout(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG","=========== Started SetTimeout ===========", isDebugEnabled)
+ utils.log("DEBUG", "Timer expired, telling correlation service to stop listening", isDebugEnabled)
+ execution.setVariable("asynchronousResponseTimeout", true)
+
+ utils.log("DEBUG", "Timed out branch sleeping for one second to give success branch a chance to complete if running", isDebugEnabled)
+ Thread.sleep(1000)
+ utils.log("DEBUG","=========== End SetTimeout ===========", isDebugEnabled)
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterRestV1.groovy
new file mode 100644
index 0000000000..1859838f29
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterRestV1.groovy
@@ -0,0 +1,343 @@
+package org.openecomp.mso.bpmn.common.scripts
+
+import java.text.SimpleDateFormat
+import java.net.URLEncoder
+
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import groovy.json.*
+
+import org.json.JSONObject
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+
+class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * Processes the incoming request.
+ */
+ public void preProcessRequest (Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ def prefix="SDNCREST_"
+ execution.setVariable("prefix", prefix)
+ setSuccessIndicator(execution, false)
+
+ try {
+ // Determine the request type and log the request
+
+ String request = validateRequest(execution, "mso-request-id")
+ String requestType = jsonUtil.getJsonRootProperty(request)
+ execution.setVariable(prefix + 'requestType', requestType)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'requestType = ' + requestType, isDebugLogEnabled)
+ utils.logAudit('SDNCAdapterRestV1, request: ' + request)
+
+ // Determine the SDNCAdapter endpoint
+
+ String sdncAdapterEndpoint = execution.getVariable("URN_mso_adapters_sdnc_rest_endpoint")
+
+ if (sdncAdapterEndpoint == null || sdncAdapterEndpoint.isEmpty()) {
+ String msg = getProcessKey(execution) + ': mso:adapters:sdnc:rest:endpoint URN mapping is not defined'
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ while (sdncAdapterEndpoint.endsWith('/')) {
+ sdncAdapterEndpoint = sdncAdapterEndpoint.substring(0, sdncAdapterEndpoint.length()-1)
+ }
+
+ String sdncAdapterMethod = null
+ String sdncAdapterUrl = null
+ String sdncAdapterRequest = request
+
+ if ('SDNCServiceRequest'.equals(requestType)) {
+ // Get the sdncRequestId from the request
+
+ String sdncRequestId = jsonUtil.getJsonValue(request, requestType + ".sdncRequestId")
+
+ if (sdncRequestId == null || sdncRequestId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no sdncRequestId in ' + requestType
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ execution.setVariable('SDNCAResponse_CORRELATOR', sdncRequestId)
+ logDebug(getProcessKey(execution) + ': SDNCAResponse_CORRELATOR = ' + sdncRequestId, isDebugLogEnabled)
+
+ // Get the bpNotificationUrl from the request (just to make sure it's there)
+
+ String bpNotificationUrl = jsonUtil.getJsonValue(request, requestType + ".bpNotificationUrl")
+
+ if (bpNotificationUrl == null || bpNotificationUrl.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no bpNotificationUrl in ' + requestType
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ sdncAdapterMethod = 'POST'
+ sdncAdapterUrl = sdncAdapterEndpoint + '/services'
+
+ } else {
+ String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ execution.setVariable(prefix + 'sdncAdapterMethod', sdncAdapterMethod)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'sdncAdapterMethod = ' + sdncAdapterMethod, isDebugLogEnabled)
+ execution.setVariable(prefix + 'sdncAdapterUrl', sdncAdapterUrl)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'sdncAdapterUrl = ' + sdncAdapterUrl, isDebugLogEnabled)
+ execution.setVariable(prefix + 'sdncAdapterRequest', sdncAdapterRequest)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'sdncAdapterRequest = \n' + sdncAdapterRequest, isDebugLogEnabled)
+
+ // Get the Basic Auth credentials for the SDNCAdapter (yes... we ARE using the PO adapters credentials)
+
+ String basicAuthValue = execution.getVariable("URN_mso_adapters_po_auth")
+
+ if (basicAuthValue == null || basicAuthValue.isEmpty()) {
+ logDebug(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", isDebugLogEnabled)
+ logError(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
+ } else {
+ logDebug(getProcessKey(execution) + ": Obtained BasicAuth credentials for SDNCAdapter:" +
+ basicAuthValue, isDebugLogEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValue, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable(prefix + 'basicAuthHeaderValue', encodedString)
+ } catch (IOException ex) {
+ logDebug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter", isDebugLogEnabled)
+ logError(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter")
+ }
+ }
+
+ // Set the timeout value, e.g. PT5M. It may be specified in the request as the
+ // bpTimeout value. If it's not in the request, use the URN mapping value.
+
+ String timeout = jsonUtil.getJsonValue(request, requestType + ".bpTimeout")
+
+ if (timeout == null || timeout.isEmpty()) {
+ timeout = execution.getVariable("URN_mso_sdnc_timeout")
+ }
+
+ execution.setVariable(prefix + 'timeout', timeout)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'timeout = ' + timeout, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception e) {
+ String msg = 'Caught exception in ' + method + ": " + e
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ }
+
+ /**
+ * Sends the request to the SDNC adapter.
+ */
+ public void sendRequestToSDNCAdapter(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendRequestToSDNCAdapter(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String prefix = execution.getVariable('prefix')
+
+ try {
+ String sdncAdapterMethod = execution.getVariable(prefix + 'sdncAdapterMethod')
+ String sdncAdapterUrl = execution.getVariable(prefix + 'sdncAdapterUrl')
+ String sdncAdapterRequest = execution.getVariable(prefix + 'sdncAdapterRequest')
+ utils.logAudit("Outgoing SDNC Rest Request is: " + sdncAdapterRequest)
+
+ RESTConfig config = new RESTConfig(sdncAdapterUrl)
+ RESTClient client = new RESTClient(config).
+ addHeader("Content-Type", "application/json").
+ addAuthorizationHeader(execution.getVariable(prefix + "basicAuthHeaderValue"))
+
+ APIResponse response
+
+ if ("GET".equals(sdncAdapterMethod)) {
+ response = client.httpGet()
+ } else if ("PUT".equals(sdncAdapterMethod)) {
+ response = client.httpPut(sdncAdapterRequest)
+ } else if ("POST".equals(sdncAdapterMethod)) {
+ response = client.httpPost(sdncAdapterRequest)
+ } else if ("DELETE".equals(sdncAdapterMethod)) {
+ response = client.httpDelete(sdncAdapterRequest)
+ } else {
+ String msg = 'Unsupported HTTP method "' + sdncAdapterMethod + '" in ' + method + ": " + e
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ execution.setVariable(prefix + "sdncAdapterStatusCode", response.getStatusCode())
+ execution.setVariable(prefix + "sdncAdapterResponse", response.getResponseBodyAsString())
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception e) {
+ String msg = 'Caught exception in ' + method + ": " + e
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ }
+
+ /**
+ * Processes a callback.
+ */
+ public void processCallback(Execution execution){
+ def method = getClass().getSimpleName() + '.processCallback(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String prefix = execution.getVariable('prefix')
+ String callback = execution.getVariable('SDNCAResponse_MESSAGE')
+ utils.logAudit("Incoming SDNC Rest Callback is: " + callback)
+
+ try {
+ logDebug(getProcessKey(execution) + ": received callback:\n" + callback, isDebugLogEnabled)
+
+ int callbackNumber = 1
+ while (execution.getVariable(prefix + 'callback' + callbackNumber) != null) {
+ ++callbackNumber
+ }
+
+ execution.setVariable(prefix + 'callback' + callbackNumber, callback)
+ execution.removeVariable('SDNCAResponse_MESSAGE')
+
+ String responseType = jsonUtil.getJsonRootProperty(callback)
+
+ // Get the ackFinalIndicator and make sure it's either Y or N. Default to Y.
+ String ackFinalIndicator = jsonUtil.getJsonValue(callback, responseType + ".ackFinalIndicator")
+
+ if (!'N'.equals(ackFinalIndicator)) {
+ ackFinalIndicator = 'Y'
+ }
+
+ execution.setVariable(prefix + "ackFinalIndicator", ackFinalIndicator)
+
+ if (responseType.endsWith('Error')) {
+ sdncAdapterBuildWorkflowException(execution, callback)
+ }
+ } catch (Exception e) {
+ callback = callback == null || String.valueOf(callback).isEmpty() ? "NONE" : callback
+ String msg = "Received error from SDNCAdapter: " + callback
+ logDebug(getProcessKey(execution) + ': ' + msg, isDebugLogEnabled)
+ exceptionUtil.buildWorkflowException(execution, 5300, msg)
+ }
+ }
+
+ /**
+ * Tries to parse the response as XML to extract the information to create
+ * a WorkflowException. If the response cannot be parsed, a more generic
+ * WorkflowException is created.
+ */
+ public void sdncAdapterBuildWorkflowException(Execution execution, String response) {
+ try {
+ String responseType = jsonUtil.getJsonRootProperty(response)
+ String responseCode = jsonUtil.getJsonValue(response, responseType + ".responseCode")
+ String responseMessage = jsonUtil.getJsonValue(response, responseType + ".responseMessage")
+
+ String info = ""
+
+ if (responseCode != null && !responseCode.isEmpty()) {
+ info += " responseCode='" + responseCode + "'"
+ }
+
+ if (responseMessage != null && !responseMessage.isEmpty()) {
+ info += " responseMessage='" + responseMessage + "'"
+ }
+
+ // Note: the mapping function handles a null or empty responseCode
+ int mappedResponseCode = Integer.parseInt(exceptionUtil.MapSDNCResponseCodeToErrorCode(responseCode));
+ exceptionUtil.buildWorkflowException(execution, mappedResponseCode, "Received " + responseType +
+ " from SDNCAdapter:" + info)
+ } catch (Exception e) {
+ response = response == null || String.valueOf(response).isEmpty() ? "NONE" : response
+ exceptionUtil.buildWorkflowException(execution, 5300, "Received error from SDNCAdapter: " + response)
+ }
+ }
+
+ /**
+ * Gets the last callback request from the execution, or null if there was no callback.
+ */
+ public String getLastCallback(Execution execution) {
+ def method = getClass().getSimpleName() + '.getLastCallback(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String prefix = execution.getVariable('prefix')
+
+ try {
+ int callbackNumber = 1
+ String callback = null
+
+ while (true) {
+ String thisCallback = (String) execution.getVariable(prefix + 'callback' + callbackNumber)
+
+ if (thisCallback == null) {
+ break
+ }
+
+ callback = thisCallback
+ ++callbackNumber
+ }
+
+ return callback
+ } catch (Exception e) {
+ String msg = 'Caught exception in ' + method + ": " + e
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ }
+
+ /**
+ * Sets the timeout value to wait for the next notification.
+ */
+ public void setTimeoutValue(Execution execution) {
+ def method = getClass().getSimpleName() + '.setTimeoutValue(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String prefix = execution.getVariable('prefix')
+
+ try {
+ def timeoutValue = execution.getVariable("URN_mso_sdnc_timeout")
+
+ if (execution.getVariable(prefix + 'callback1') != null) {
+ // Waiting for subsequent notifications
+ }
+ } catch (Exception e) {
+ String msg = 'Caught exception in ' + method + ": " + e
+ logDebug(msg, isDebugLogEnabled)
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy
index 0a280b2015..f870e30d1d 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterUtils.groovy
@@ -1,837 +1,966 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-
-
-/**
- * @version 1.0
- *
- */
-class SDNCAdapterUtils {
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- private AbstractServiceTaskProcessor taskProcessor
-
- public SDNCAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
- this.taskProcessor = taskProcessor
- }
-
- String SDNCAdapterFeatureRequest(Execution execution, String requestName, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
- def utils=new MsoUtils()
-
- def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, requestName)
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def featureInformation = utils.getNodeXml(request, 'feature-information', false)
- def featureParameters = utils.getNodeXml(request, 'feature-parameters', false)
-
- def requestId = execution.getVariable('testReqId') // for junits
- if(requestId==null){
- requestId = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
- }
-
- def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
-
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsFeatureInformation = utils.removeXmlNamespaces(featureInformation)
- def nnsFeatureParameters = utils.removeXmlNamespaces(featureParameters)
-
- String sdncAdapterFeatureRequest = """
- <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- ${nnsRequestInformation}
- ${nnsServiceInformation}
- ${nnsFeatureInformation}
- ${nnsFeatureParameters}
- </sdncadapterworkflow:SDNCRequestData>
- <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
- sdncAdapterFeatureRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterFeatureRequest))
- return sdncAdapterFeatureRequest
- }
-
- String SDNCAdapterActivateVnfRequest(Execution execution, String action, String callbackURL, String serviceOperation, String msoAction, String timeoutValueInMinutes) {
- def utils=new MsoUtils()
-
- def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
-
- def requestId = execution.getVariable('testReqId') // for junits
- if(requestId==null){
- requestId = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
- }
-
- def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
-
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsVnfInformationList = utils.removeXmlNamespaces(vnfInformationList)
-
- String sdncAdapterActivateVnfRequest = """
- <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
- <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- ${nnsRequestInformation}
- ${nnsServiceInformation}
- ${nnsVnfInformationList}
- </sdncadapterworkflow:SDNCRequestData>
- <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
- sdncAdapterActivateVnfRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterActivateVnfRequest))
- return sdncAdapterActivateVnfRequest
- }
-
- String SDNCAdapterL3ToHigherLayerRequest(Execution execution, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
- def utils=new MsoUtils()
-
- def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
-
- def requestInformation = """<request-information>
- <request-id>${execution.getVariable("att-mso-request-id")}</request-id>
- <request-action>torepl</request-action>
- <source>${execution.getVariable(prefix+"source")}</source>
- <notification-url>${execution.getVariable(prefix+"notificationUrl")}</notification-url>
- </request-information>"""
-
- // Change the value of the 'request-information'.'request-action' element
- def xml = new XmlSlurper().parseText(requestInformation)
- if("assign".equalsIgnoreCase(action)){
- xml.'request-action'.replaceBody('createTrinityBonding')
- }else if("activate".equalsIgnoreCase(action)){
- xml.'request-action'.replaceBody('activateTrinityBonding')
- }else if("delete".equalsIgnoreCase(action)){
- xml.'request-action'.replaceBody('deleteTrinityBonding')
- }
- requestInformation = utils.removeXmlPreamble(groovy.xml.XmlUtil.serialize(xml))
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
-
- def requestId = execution.getVariable('testReqId') // for junits
- if(requestId==null){
- requestId = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
- }
-
- def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
-
- //Build Service Information
- // Send serviceName from CANOPI to sdnc for service-type
- def serviceInformation = """<service-information>
- <service-type>${execution.getVariable(prefix+"serviceName")}</service-type>
- <service-instance-id>${svcInstanceId}</service-instance-id>
- <subscriber-name>${execution.getVariable(prefix+"subscriberName")}</subscriber-name>
- <subscriber-global-id>${execution.getVariable(prefix+"subscriberGlobalId")}</subscriber-global-id>
- </service-information>"""
-
- //Build Additional Information - vpn or vni
- // Send serviceType from CANOPI to SDNC for nbnc-request-information service-type
- def service = execution.getVariable(prefix+"serviceType")
- def customerId = execution.getVariable(prefix+"customerId")
- def vpnId = execution.getVariable(prefix+"vpnId")
- def vpnRt = execution.getVariable(prefix+"vpnRt")
- def vpnService = execution.getVariable(prefix+"vpnService")
- def vpnRegion = execution.getVariable(prefix+"vpnRegion")
- def additionalInfo = ""
- if("assign".equalsIgnoreCase(action)){
- additionalInfo = """<vpn-data-list>
- <vpn-id>${vpnId}</vpn-id>
- <vpn-rt>${vpnRt}</vpn-rt>
- <vpn-service>${vpnService}</vpn-service>
- <vpn-region>${vpnRegion}</vpn-region>
- </vpn-data-list>"""
- }else if("activate".equalsIgnoreCase(action) || "delete".equalsIgnoreCase(action)){
- def vniId = execution.getVariable(prefix+'vniId')
- additionalInfo = "<vni-id>${vniId}</vni-id>"
- }
-
- //Set Interface Status
- def interfaceStatus = "DISABLE"
- if("activate".equalsIgnoreCase(action)){
- interfaceStatus = "ENABLE"
- }
-
- //Build SDNC Adapter Request
- String sdncAdapterL3ToHLRequest = """
- <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- ${nnsRequestInformation}
- ${serviceInformation}
- <nbnc-request-information>
- <service-type>${service}</service-type>
- <customer-id>${customerId}</customer-id>
- <interface-status>${interfaceStatus}</interface-status>
- ${additionalInfo}
- </nbnc-request-information>
- </sdncadapterworkflow:SDNCRequestData>
- <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
- sdncAdapterL3ToHLRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterL3ToHLRequest))
-
- return sdncAdapterL3ToHLRequest
- }
-
-
-
- private void SDNCAdapterActivateRequest(Execution execution, String resultVar, String svcAction,
- String svcOperation, String additionalData) {
- def utils=new MsoUtils()
-
- def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def serviceParameters = utils.getNodeXml(request, 'service-parameters', false)
-
- def requestId = execution.getVariable('testReqId') // for junits
- if(requestId==null){
- requestId = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
- }
-
- def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
- def msoAction = 'gammainternet'
-
- def timeoutInMinutes = execution.getVariable('URN_mso_sdnc_timeout_firewall_minutes')
-
- def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- if (callbackUrl == null || callbackUrl.trim() == "") {
- logError('mso:workflow:sdncadapter:callback URN is not set')
- workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
- }
-
- def internetEvcAccessInformation = utils.getNodeXml(serviceParameters, 'internet-evc-access-information', false)
- def vrLan = utils.getNodeXml(serviceParameters, 'vr-lan', false)
-
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
- def nnsVrLan = utils.removeXmlNamespaces(vrLan)
-
- if (additionalData == null) {
- additionalData = ""
- }
-
- String content = """
- <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${svcAction}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>${svcOperation}</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
- <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- ${additionalData}
- ${nnsRequestInformation}
- ${nnsServiceInformation}
- ${nnsInternetEvcAccessInformation}
- ${nnsVrLan}
- </sdncadapterworkflow:SDNCRequestData>
- <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
-
- content = utils.removeXmlPreamble(utils.formatXML(content))
- execution.setVariable(resultVar, content)
- }
-
- /**
- * Builds an SDNC "reserve" 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 sdncReservePrep(Execution execution, String action, String resultVar) {
- sdncPrep(execution, resultVar, action , 'service-configuration-operation', null, this.taskProcessor)
- }
-
- /**
- * Builds a basic SDNC 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
- * @param svcAction the svcAction element value
- * @param svcOperation the svcOperation element value
- * @param additionalData additional XML content to be inserted into the
- * RequestData element (may be null)
- */
- public void sdncPrep(Execution execution, String resultVar, String svcAction,
- String svcOperation, String additionalData, AbstractServiceTaskProcessor taskProcessor) {
- def method = getClass().getSimpleName() + '.sdncPrep(' +
- 'execution=' + execution.getId() +
- ', resultVar=' + resultVar +
- ', svcAction=' + svcAction +
- ', svcOperation=' + svcOperation +
- ', additionalData=' + (additionalData == null ? "no" : "yes") +
- ')'
-
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
- MsoUtils utils = taskProcessor.utils
- try {
- def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def serviceParameters = utils.getChildNodes(request, 'service-parameters')
- def requestAction = utils.getNodeText1(request, 'request-action')
-
- def timeoutInMinutes = execution.getVariable('URN_mso_sdnc_timeout_firewall_minutes')
-
- def requestId = execution.getVariable('testReqId') // for junits
- if(requestId==null){
- requestId = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
- }
-
- def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
- def msoAction = 'gammainternet'
-
- def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- if (callbackUrl == null || callbackUrl.trim() == "") {
- taskProcessor.logError('mso:workflow:sdncadapter:callback URN is not set')
- taskProcessor.workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
- }
-
- def internetEvcAccessInformation = utils.getNodeXml(request, 'internet-evc-access-information', false)
- def vrLan = utils.getNodeXml(request, 'vr-lan', false)
- def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
-
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
- def nnsVrLan = utils.removeXmlNamespaces(vrLan)
- def nnsVnfInformationList = utils.removeXmlNamespaces(vrLan)
- def nnsinternetSvcChangeDetails = ""
-
- if(requestAction!=null && requestAction.equals("ChangeLayer3ServiceProvRequest")){
- def internetSvcChangeDetails = utils.removeXmlNamespaces(serviceParameters)
- nnsinternetSvcChangeDetails = """<internet-service-change-details>
- ${internetSvcChangeDetails}
- </internet-service-change-details>"""
- }
-
- if (additionalData == null) {
- additionalData = ""
- }
-
- String content = """
- <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${svcAction}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>${svcOperation}</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
- <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- ${additionalData}
- ${nnsRequestInformation}
- ${nnsServiceInformation}
- ${nnsInternetEvcAccessInformation}
- ${nnsVrLan}
- ${nnsVnfInformationList}
- ${nnsinternetSvcChangeDetails}
- </sdncadapterworkflow:SDNCRequestData>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
-
- content = utils.removeXmlPreamble(utils.formatXML(content))
- execution.setVariable(resultVar, content)
- taskProcessor.logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- taskProcessor.logError('Caught exception in ' + method, e)
- taskProcessor.workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
- }
- }
-
-
-
- /**
- * Builds a topology SDNC request and return String request.
- * As V2 will use 1607-style request, region instead of aic clli code
- * @param execution, the execution
- * @param requestXML, the incoming request for the flow
- * @param serviceInstanceId, the serviceIntance (if available)
- * @param callbackUrl, the call back url
- * @param action, the action element value
- * @param requestAction the svcOperation element value
- * @param cloudRegionId the aai's cloud-region-id
- * @param additionalData additional XML content to be inserted into the
- * RequestData element (may be null)
- */
- public String sdncTopologyRequestV2 (Execution execution, String requestXML, String serviceInstanceId, String callbackUrl, String action, String requestAction, String cloudRegionId, networkId, String additionalData) {
- def utils=new MsoUtils()
-
- String requestId = ""
- try {
- requestId = execution.getVariable("att-mso-request-id")
- } catch (Exception ex) {
- requestId = utils.getNodeText1(requestXML, "request-id")
- }
-
- String aicCloudRegion = cloudRegionId
- String tenantId = ""
- if (utils.nodeExists(requestXML, "tenant-id")) {
- tenantId = utils.getNodeText1(requestXML, "tenant-id")
- }
- String networkType = ""
- if (utils.nodeExists(requestXML, "network-type")) {
- networkType = utils.getNodeText1(requestXML, "network-type")
- }
- String serviceId = ""
- if (utils.nodeExists(requestXML, "service-id")) {
- serviceId = utils.getNodeText1(requestXML, "service-id")
- }
- String networkName = ""
- if (utils.nodeExists(requestXML, "network-name")) {
- networkName = utils.getNodeText1(requestXML, "network-name")
- }
- String source = ""
- if (utils.nodeExists(requestXML, "source")) {
- source = utils.getNodeText1(requestXML, "source")
- }
-
- // get resourceLink from subflow execution variable
- String serviceType = ""
- String subscriberName = ""
- String siRelatedLink = execution.getVariable("GENGSI_siResourceLink")
- if (siRelatedLink != null) {
- // get service type
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
- // get subscriber name
- int subscriberNameStart = siRelatedLink.indexOf("customers/customer/")
- int subscriberNameEnd = siRelatedLink.indexOf("/service-subscriptions/")
- subscriberName = siRelatedLink.substring(subscriberNameStart + 19, subscriberNameEnd)
- }
-
- String content =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1"
- xmlns:ns5="http://ecomp.att.com/mso/request/types/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- <request-information>
- <request-id>${requestId}</request-id>
- <request-action>${requestAction}</request-action>
- <source>${source}</source>
- <notification-url></notification-url>
- <order-number></order-number>
- <order-version></order-version>
- </request-information>
- <service-information>
- <service-id>${serviceId}</service-id>
- <service-type>${serviceType}</service-type>
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- <subscriber-name>${subscriberName}</subscriber-name>
- </service-information>
- <network-request-information>
- <network-id>${networkId}</network-id>
- <network-type>${networkType}</network-type>
- <network-name>${networkName}</network-name>
- <tenant>${tenantId}</tenant>
- <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
- </network-request-information>
- </sdncadapterworkflow:SDNCRequestData>
- </aetgt:SDNCAdapterWorkflowRequest>""".trim()
-
- return content
- }
-
- /**
- * 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 validateSDNCResponseOld(Execution execution, String responseVar,
- String responseCodeVar, String errorResponseVar) {
- def method = getClass().getSimpleName() + '.validateWorkflowResponse(' +
- 'execution=' + execution.getId() +
- ', responseVar=' + responseVar +
- ', responseCodeVar=' + responseCodeVar +
- ', errorResponseVar=' + errorResponseVar +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def prefix = execution.getVariable('prefix')
- execution.setVariable(prefix+'sdncResponseSuccess', false)
- def response = execution.getVariable(responseVar)
- taskProcessor.logDebug(responseVar + ' = ' +
- (response == null ? "" : System.lineSeparator()) +
- response, isDebugLogEnabled)
-
- def responseCode = execution.getVariable(responseCodeVar)
- taskProcessor.logDebug(responseCodeVar + ' = ' + responseCode, isDebugLogEnabled)
-
- def errorResponse = execution.getVariable(errorResponseVar)
-
- errorResponse = taskProcessor.utils.getNodeText1(errorResponse,"ErrorMessage")
- if (errorResponse == null) errorResponse = errorResponse
-
- taskProcessor.logDebug(errorResponseVar + ' = ' +
- (errorResponse == null ? "" : System.lineSeparator()) +
- errorResponse, isDebugLogEnabled)
-
- if ("200".equals(String.valueOf(responseCode)) || "201".equals(String.valueOf(responseCode))) {
-
- // we need to peer into the request data for error
- def String callbackRequestData = taskProcessor.utils.getNodeXml(response, 'RequestData', false)
- def String decodedXml = decodeXML(callbackRequestData)
- taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
-
- def int requestDataResponseCode = 200
- def String requestDataResponseMessage = ''
-
- if (taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
- try{
- requestDataResponseCode = ((String) taskProcessor.utils.getNodeText(decodedXml, "response-code")).toInteger()
- }catch(Exception e){
- //TODO proper handling of new, non numerical response codes in 1607 and new error handling for common API
- requestDataResponseCode = 500
- }
- if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
- requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
- }
- }
-
- taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
- taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
-
- // if response-code is not Success (200, 201, etc) we need to throw an exception
- if (requestDataResponseCode < 200 || requestDataResponseCode > 299) {
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- def convertedCode = exceptionUtil.MapSDNCResponseCodeToErrorCode(requestDataResponseCode.toString())
- taskProcessor.workflowException(execution, "Received error from SDN-C: " + requestDataResponseMessage, convertedCode)
-
- }
- }
- else {
- taskProcessor.logWarn('Expected response code 200 or 201 in ' + responseCodeVar + ', got \'' + responseCode + '\'')
- taskProcessor.workflowException(execution, errorResponse, responseCode)
- }
-
- if (response == null || response.trim().equals("")) {
- taskProcessor.logWarn(responseVar + ' is empty');
- taskProcessor.workflowException(execution, errorResponse, responseCode)
- }
-
- execution.setVariable(prefix+'sdncResponseSuccess', true)
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- taskProcessor.logError('Caught exception in ' + method, e)
- taskProcessor.workflowException(execution, 'Internal Error- Unable to validate SDNC Response ' + e.getMessage(), 500)
- }
- }
- /**
- * Validates a workflow response.
- * @param execution the execution
- * @param responseVar the execution variable in which the response is stored
- * @param workflowException the WorkflowException Object returned from sdnc call
- */
- public void validateSDNCResponse(Execution execution, String response, WorkflowException workflowException, boolean successIndicator){
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.utils.log("DEBUG", "SDNC Response is: " + response, isDebugLogEnabled)
- taskProcessor.utils.log("DEBUG", "SuccessIndicator is: " + successIndicator, isDebugLogEnabled)
-
- try {
- def prefix = execution.getVariable('prefix')
- execution.setVariable(prefix+'sdncResponseSuccess', false)
- taskProcessor.utils.log("DEBUG", "Response" + ' = ' + (response == null ? "" : System.lineSeparator()) + response, isDebugLogEnabled)
-
- if (successIndicator == true){
- if (response == null || response.trim().equals("")) {
- taskProcessor.utils.log("DEBUG", response + ' is empty');
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "SDNCAdapter Workflow Response is Empty")
- }else{
-
- // we need to peer into the request data for error
- def String sdncAdapterWorkflowResponse = taskProcessor.utils.getNodeXml(response, 'response-data', false)
- def String decodedXml = decodeXML(sdncAdapterWorkflowResponse).replace('<?xml version="1.0" encoding="UTF-8"?>', "")
-
- // change '&' to "&amp; (if present as data, ex: subscriber-name = 'FOUR SEASONS HEATING & COOLING_8310006378683'
- decodedXml = decodedXml.replace("&", "&amp;")
-
- taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
-
- int requestDataResponseCode = 200
- def String requestDataResponseMessage = ''
-
- try{
- if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
- requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
- } else if (taskProcessor.utils.nodeExists(decodedXml, "ResponseMessage")) {
- requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "ResponseMessage")
- }
- }catch(Exception e){
- taskProcessor.utils.log("DEBUG", 'Error caught while decoding resposne ' + e.getMessage(), isDebugLogEnabled)
- }
-
- if(taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
- taskProcessor.utils.log("DEBUG","response-code node Exist ", isDebugLogEnabled)
- String code = taskProcessor.utils.getNodeText1(decodedXml, "response-code")
- if(code.isEmpty() || code.equals("")){
- // if response-code is blank then Success
- taskProcessor.utils.log("DEBUG","response-code node is empty", isDebugLogEnabled)
- requestDataResponseCode = 0
- }else{
- requestDataResponseCode = code.toInteger()
- taskProcessor.utils.log("DEBUG","response-code is: " + requestDataResponseCode, isDebugLogEnabled)
- }
- }else if(taskProcessor.utils.nodeExists(decodedXml, "ResponseCode")){
- taskProcessor.utils.log("DEBUG","ResponseCode node Exist ", isDebugLogEnabled)
- String code = taskProcessor.utils.getNodeText1(decodedXml, "ResponseCode")
- if(code.isEmpty() || code.equals("")){
- // if ResponseCode blank then Success
- taskProcessor.utils.log("DEBUG","ResponseCode node is empty", isDebugLogEnabled)
- requestDataResponseCode = 0
- }else{
- requestDataResponseCode = code.toInteger()
- taskProcessor.utils.log("DEBUG","ResponseCode is: " + requestDataResponseCode, isDebugLogEnabled)
- }
- }else{
- taskProcessor.utils.log("DEBUG","A Response Code DOES NOT Exist.", isDebugLogEnabled)
- // if a response code does not exist then Success
- requestDataResponseCode = 0
- }
- try{
-
- // if a response code is 0 or 200 then Success
- if (requestDataResponseCode == 200 || requestDataResponseCode == 0) {
- execution.setVariable(prefix+'sdncResponseSuccess', true)
- taskProcessor.utils.log("DEBUG", "Setting sdncResponseSuccess to True ", isDebugLogEnabled)
- taskProcessor.utils.log("DEBUG", "Exited ValidateSDNCResponse Method", isDebugLogEnabled)
- }else{
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- String convertedCode = exceptionUtil.MapSDNCResponseCodeToErrorCode(requestDataResponseCode.toString())
- int convertedCodeInt = Integer.parseInt(convertedCode)
- exceptionUtil.buildAndThrowWorkflowException(execution, convertedCodeInt, "Received error from SDN-C: " + requestDataResponseMessage)
- }
-
- }catch(Exception e){
- //TODO proper handling of new, non numerical response codes in 1607 and new error handling for common API
- requestDataResponseCode = 500
- }
-
- taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
- taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
- }
-
- }else {
- taskProcessor.utils.log("DEBUG", 'SDNCAdapter Subflow did NOT complete Successfully. SuccessIndicator is False. ')
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }else{
- //TODO : what error code and error message use here
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - SDNCAdapter Subflow did NOT complete successfully.")
- }
- }
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- taskProcessor.utils.log("DEBUG", 'END of Validate SDNC Response', isDebugLogEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, 'Internal Error- Unable to validate SDNC Response ');
- }
- }
-
- /**
- * 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 validateL3BondingSDNCResp(Execution execution, String response, WorkflowException workflowException, boolean success) {
- def method = getClass().getSimpleName() + '.validateL3BondingSDNCResp(' +
- 'execution=' + execution.getId() +
- ', response=' + response +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
- def prefix = execution.getVariable('prefix')
- CommonExceptionUtil commonExceptionUtil = new CommonExceptionUtil()
-
- try {
- execution.setVariable(prefix+'sdncResponseSuccess', false)
-
- taskProcessor.utils.log("sdncAdapter Success Indicator is: " + success, isDebugLogEnabled)
- if (success == true) {
-
- // we need to look inside the request data for error
- def String callbackRequestData = taskProcessor.utils.getNodeXml(response, 'RequestData', false)
- def String decodedXml = decodeXML(callbackRequestData)
- taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
-
- def requestDataResponseCode = '200'
- def requestDataResponseMessage = ''
- int intDataResponseCode = 200
-
- if (taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
-
- requestDataResponseCode = ((String) taskProcessor.utils.getNodeText(decodedXml, "response-code"))
- if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
- requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
- }
- }else if(taskProcessor.utils.nodeExists(decodedXml, "ResponseCode")){
- requestDataResponseCode = ((String) taskProcessor.utils.getNodeText1(decodedXml, "ResponseCode")).toInteger()
- }else if(taskProcessor.utils.nodeExists(response, "ResponseCode")){
- requestDataResponseCode = ((String) taskProcessor.utils.getNodeText1(response, "ResponseCode")).toInteger()
- requestDataResponseMessage = taskProcessor.utils.getNodeText(response, "ResponseMessage")
- }
-
- taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
- taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
-
- // Get the AAI Status to determine if rollback is needed on ASSIGN
- def aai_status = ''
- if (taskProcessor.utils.nodeExists(decodedXml, "aai-status")) {
- aai_status = ((String) taskProcessor.utils.getNodeText(decodedXml, "aai-status"))
- taskProcessor.utils.log("DEBUG", "SDNC sent AAI STATUS code: " + aai_status, isDebugLogEnabled)
- }
- if (aai_status != null && !aai_status.equals("")) {
- execution.setVariable(prefix+"AaiStatus",aai_status)
- taskProcessor.utils.log("DEBUG", "Set variable " + prefix + "AaiStatus: " + execution.getVariable(prefix+"AaiStatus"), isDebugLogEnabled)
- }
-
- // Get the result string to determine if rollback is needed on ASSIGN in Add Bonding flow only
- def sdncResult = ''
- if (taskProcessor.utils.nodeExists(decodedXml, "result")) {
- sdncResult = ((String) taskProcessor.utils.getNodeText(decodedXml, "result"))
- taskProcessor.utils.log("DEBUG", "SDNC sent result: " + sdncResult, isDebugLogEnabled)
- }
- if (sdncResult != null && !sdncResult.equals("")) {
- execution.setVariable(prefix+"SdncResult",sdncResult)
- taskProcessor.utils.log("DEBUG", "Set variable " + prefix + "SdncResult: " + execution.getVariable(prefix+"SdncResult"), isDebugLogEnabled)
- }
-
- try{
- intDataResponseCode = Integer.parseInt(String.valueOf(requestDataResponseCode))
- }catch(Exception e){
- intDataResponseCode = 400
- }
-
- taskProcessor.utils.log("DEBUG", "intDataResponseCode " + intDataResponseCode , isDebugLogEnabled)
-
- // if response-code is not Success (200, 201, etc) we need to throw an exception
- if (intDataResponseCode != 200 && intDataResponseCode != 0) {
- execution.setVariable(prefix+'ResponseCode', intDataResponseCode)
- execution.setVariable("L3HLAB_rollback", true)
- def msg = commonExceptionUtil.mapSDNCAdapterExceptionToErrorResponse(response, execution)
- taskProcessor.commonWorkflowException(execution, intDataResponseCode, "Received error from SDN-C: " + msg)
-
- }
- }else {
- taskProcessor.logWarn('sdncAdapter did not complete successfully, sdncAdapter Success Indicator was false ')
- execution.setVariable("L3HLAB_rollback", true)
- def msg = commonExceptionUtil.mapSDNCAdapterExceptionToErrorResponse(response, execution)
- taskProcessor.commonWorkflowException(execution, responseCode, msg)
- }
-
- if (response == null || response.trim().equals("")) {
- taskProcessor.logWarn('sdncAdapter workflow response is empty');
- execution.setVariable("L3HLAB_rollback", true)
- def msg = commonExceptionUtil.buildException("Exception occurred while validating SDNC response " , execution)
- taskProcessor.commonWorkflowException(execution, intResponseCode, msg)
- }
-
- execution.setVariable(prefix+'sdncResponseSuccess', true)
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- taskProcessor.logError('Caught exception in ' + method, e)
- execution.setVariable(prefix+"ResponseCode",400)
- execution.setVariable("L3HLAB_rollback", true)
- def msg = commonExceptionUtil.buildException("Exception occurred while validating SDNC response: " + e.getMessage(), execution)
- taskProcessor.commonWorkflowException(execution, 400, msg)
- }
- }
-
- /**
- * Decode XML - replace &amp; &lt; and &gt; with '&', '<' and '>'
- * @param xml - the xml to be decoded
- */
- private String decodeXML(String xml) {
- def String decodedXml = xml.replaceAll("&amp;", "&")
- decodedXml = decodedXml.replaceAll("&lt;", "<")
- decodedXml = decodedXml.replaceAll("&gt;", ">")
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * @version 1.0
+ *
+ */
+class SDNCAdapterUtils {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ private AbstractServiceTaskProcessor taskProcessor
+
+ public SDNCAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
+ this.taskProcessor = taskProcessor
+ }
+
+ String SDNCAdapterFeatureRequest(Execution execution, String requestName, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
+ def utils=new MsoUtils()
+
+ def prefix = execution.getVariable('prefix')
+ def request = taskProcessor.getVariable(execution, requestName)
+ def requestInformation = utils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+ def featureInformation = utils.getNodeXml(request, 'feature-information', false)
+ def featureParameters = utils.getNodeXml(request, 'feature-parameters', false)
+
+ def requestId = execution.getVariable('testReqId') // for junits
+ if(requestId==null){
+ requestId = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ def svcInstanceId = execution.getVariable("mso-service-instance-id")
+
+ def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+ def nnsFeatureInformation = utils.removeXmlNamespaces(featureInformation)
+ def nnsFeatureParameters = utils.removeXmlNamespaces(featureParameters)
+
+ String sdncAdapterFeatureRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ ${nnsRequestInformation}
+ ${nnsServiceInformation}
+ ${nnsFeatureInformation}
+ ${nnsFeatureParameters}
+ </sdncadapterworkflow:SDNCRequestData>
+ <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncAdapterFeatureRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterFeatureRequest))
+ return sdncAdapterFeatureRequest
+ }
+
+ String SDNCAdapterActivateVnfRequest(Execution execution, String action, String callbackURL, String serviceOperation, String msoAction, String timeoutValueInMinutes) {
+ def utils=new MsoUtils()
+
+ def prefix = execution.getVariable('prefix')
+ def request = taskProcessor.getVariable(execution, prefix+'Request')
+ def requestInformation = utils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+ def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
+
+ def requestId = execution.getVariable('testReqId') // for junits
+ if(requestId==null){
+ requestId = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ def svcInstanceId = execution.getVariable("mso-service-instance-id")
+
+ def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+ def nnsVnfInformationList = utils.removeXmlNamespaces(vnfInformationList)
+
+ String sdncAdapterActivateVnfRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ ${nnsRequestInformation}
+ ${nnsServiceInformation}
+ ${nnsVnfInformationList}
+ </sdncadapterworkflow:SDNCRequestData>
+ <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncAdapterActivateVnfRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterActivateVnfRequest))
+ return sdncAdapterActivateVnfRequest
+ }
+
+ String SDNCAdapterL3ToHigherLayerRequest(Execution execution, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
+ def utils=new MsoUtils()
+
+ def prefix = execution.getVariable('prefix')
+ def request = taskProcessor.getVariable(execution, prefix+'Request')
+
+ def requestInformation = """<request-information>
+ <request-id>${execution.getVariable("mso-request-id")}</request-id>
+ <request-action>torepl</request-action>
+ <source>${execution.getVariable(prefix+"source")}</source>
+ <notification-url>${execution.getVariable(prefix+"notificationUrl")}</notification-url>
+ </request-information>"""
+
+ // Change the value of the 'request-information'.'request-action' element
+ def xml = new XmlSlurper().parseText(requestInformation)
+ if("assign".equalsIgnoreCase(action)){
+ xml.'request-action'.replaceBody('createTrinityBonding')
+ }else if("activate".equalsIgnoreCase(action)){
+ xml.'request-action'.replaceBody('activateTrinityBonding')
+ }else if("delete".equalsIgnoreCase(action)){
+ xml.'request-action'.replaceBody('deleteTrinityBonding')
+ }
+ requestInformation = utils.removeXmlPreamble(groovy.xml.XmlUtil.serialize(xml))
+ def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+
+ def requestId = execution.getVariable('testReqId') // for junits
+ if(requestId==null){
+ requestId = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ def svcInstanceId = execution.getVariable("mso-service-instance-id")
+
+ //Build Service Information
+ // Send serviceName from CANOPI to sdnc for service-type
+ def serviceInformation = """<service-information>
+ <service-type>${execution.getVariable(prefix+"serviceName")}</service-type>
+ <service-instance-id>${svcInstanceId}</service-instance-id>
+ <subscriber-name>${execution.getVariable(prefix+"subscriberName")}</subscriber-name>
+ <subscriber-global-id>${execution.getVariable(prefix+"subscriberGlobalId")}</subscriber-global-id>
+ </service-information>"""
+
+ //Build Additional Information - vpn or vni
+ // Send serviceType from CANOPI to SDNC for nbnc-request-information service-type
+ def service = execution.getVariable(prefix+"serviceType")
+ def customerId = execution.getVariable(prefix+"customerId")
+ def vpnId = execution.getVariable(prefix+"vpnId")
+ def vpnRt = execution.getVariable(prefix+"vpnRt")
+ def vpnService = execution.getVariable(prefix+"vpnService")
+ def vpnRegion = execution.getVariable(prefix+"vpnRegion")
+ def additionalInfo = ""
+ if("assign".equalsIgnoreCase(action)){
+ additionalInfo = """<vpn-data-list>
+ <vpn-id>${vpnId}</vpn-id>
+ <vpn-rt>${vpnRt}</vpn-rt>
+ <vpn-service>${vpnService}</vpn-service>
+ <vpn-region>${vpnRegion}</vpn-region>
+ </vpn-data-list>"""
+ }else if("activate".equalsIgnoreCase(action) || "delete".equalsIgnoreCase(action)){
+ def vniId = execution.getVariable(prefix+'vniId')
+ additionalInfo = "<vni-id>${vniId}</vni-id>"
+ }
+
+ //Set Interface Status
+ def interfaceStatus = "DISABLE"
+ if("activate".equalsIgnoreCase(action)){
+ interfaceStatus = "ENABLE"
+ }
+
+ //Build SDNC Adapter Request
+ String sdncAdapterL3ToHLRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ ${nnsRequestInformation}
+ ${serviceInformation}
+ <nbnc-request-information>
+ <service-type>${service}</service-type>
+ <customer-id>${customerId}</customer-id>
+ <interface-status>${interfaceStatus}</interface-status>
+ ${additionalInfo}
+ </nbnc-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncAdapterL3ToHLRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterL3ToHLRequest))
+
+ return sdncAdapterL3ToHLRequest
+ }
+
+
+
+ private void SDNCAdapterActivateRequest(Execution execution, String resultVar, String svcAction,
+ String svcOperation, String additionalData) {
+ def utils=new MsoUtils()
+
+ def prefix = execution.getVariable('prefix')
+ def request = taskProcessor.getVariable(execution, prefix+'Request')
+ def requestInformation = utils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+ def serviceParameters = utils.getNodeXml(request, 'service-parameters', false)
+
+ def requestId = execution.getVariable('testReqId') // for junits
+ if(requestId==null){
+ requestId = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ def svcInstanceId = execution.getVariable("mso-service-instance-id")
+ def msoAction = 'gammainternet'
+
+ def timeoutInMinutes = execution.getVariable('URN_mso_sdnc_timeout_firewall_minutes')
+
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (callbackUrl == null || callbackUrl.trim() == "") {
+ logError('mso:workflow:sdncadapter:callback URN is not set')
+ workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
+ }
+
+ def l2HomingInformation = utils.getNodeXml(serviceParameters, 'l2-homing-information', false)
+ def internetEvcAccessInformation = utils.getNodeXml(serviceParameters, 'internet-evc-access-information', false)
+ def vrLan = utils.getNodeXml(serviceParameters, 'vr-lan', false)
+ def upceVmsServiceInformation = utils.getNodeXml(serviceParameters, 'ucpe-vms-service-information', false)
+
+
+ def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+ def nnsl2HomingInformation = utils.removeXmlNamespaces(l2HomingInformation)
+ def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
+ def nnsVrLan = utils.removeXmlNamespaces(vrLan)
+ def nnsUpceVmsServiceInformation = utils.removeXmlNamespaces(upceVmsServiceInformation)
+
+ if (additionalData == null) {
+ additionalData = ""
+ }
+
+ String content = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${svcAction}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${svcOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ ${additionalData}
+ ${nnsRequestInformation}
+ ${nnsServiceInformation}
+ ${nnsl2HomingInformation}
+ ${nnsInternetEvcAccessInformation}
+ ${nnsVrLan}
+ ${nnsUpceVmsServiceInformation}
+ </sdncadapterworkflow:SDNCRequestData>
+ <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+
+ content = utils.removeXmlPreamble(utils.formatXML(content))
+ execution.setVariable(resultVar, content)
+ }
+
+ /**
+ * Builds an SDNC "reserve" 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 sdncReservePrep(Execution execution, String action, String resultVar) {
+ sdncPrep(execution, resultVar, action , 'service-configuration-operation', null, this.taskProcessor)
+ }
+
+ /**
+ * Builds a basic SDNC 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
+ * @param svcAction the svcAction element value
+ * @param svcOperation the svcOperation element value
+ * @param additionalData additional XML content to be inserted into the
+ * RequestData element (may be null)
+ */
+ public void sdncPrep(Execution execution, String resultVar, String svcAction,
+ String svcOperation, String additionalData, AbstractServiceTaskProcessor taskProcessor) {
+ def method = getClass().getSimpleName() + '.sdncPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ', svcAction=' + svcAction +
+ ', svcOperation=' + svcOperation +
+ ', additionalData=' + (additionalData == null ? "no" : "yes") +
+ ')'
+
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+ MsoUtils utils = taskProcessor.utils
+ try {
+ def prefix = execution.getVariable('prefix')
+ def request = taskProcessor.getVariable(execution, prefix+'Request')
+ def requestInformation = utils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+ def serviceParameters = utils.getChildNodes(request, 'service-parameters')
+ def requestAction = utils.getNodeText1(request, 'request-action')
+
+ def timeoutInMinutes = execution.getVariable('URN_mso_sdnc_timeout_firewall_minutes')
+
+ def requestId = execution.getVariable('testReqId') // for junits
+ if(requestId==null){
+ requestId = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
+ }
+
+ def svcInstanceId = execution.getVariable("mso-service-instance-id")
+ def msoAction = 'gammainternet'
+
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (callbackUrl == null || callbackUrl.trim() == "") {
+ taskProcessor.logError('mso:workflow:sdncadapter:callback URN is not set')
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
+ }
+
+ def l2HomingInformation = utils.getNodeXml(request, 'l2-homing-information', false)
+ def internetEvcAccessInformation = utils.getNodeXml(request, 'internet-evc-access-information', false)
+ def vrLan = utils.getNodeXml(request, 'vr-lan', false)
+ def upceVmsServiceInfo = utils.getNodeXml(request, 'ucpe-vms-service-information', false)
+ def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
+
+ def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+ def nnsl2HomingInformation = utils.removeXmlNamespaces(l2HomingInformation)
+ def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
+ def nnsVrLan = utils.removeXmlNamespaces(vrLan)
+ def nnsUpceVmsServiceInfo = utils.removeXmlNamespaces(upceVmsServiceInfo)
+ def nnsVnfInformationList = utils.removeXmlNamespaces(vrLan)
+ def nnsinternetSvcChangeDetails = ""
+
+ if(requestAction!=null && requestAction.equals("ChangeLayer3ServiceProvRequest")){
+ def internetSvcChangeDetails = utils.removeXmlNamespaces(serviceParameters)
+ nnsinternetSvcChangeDetails = """<internet-service-change-details>
+ ${internetSvcChangeDetails}
+ </internet-service-change-details>"""
+ }
+
+ if (additionalData == null) {
+ additionalData = ""
+ }
+
+ String content = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${svcAction}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>${svcOperation}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ ${additionalData}
+ ${nnsRequestInformation}
+ ${nnsServiceInformation}
+ ${nnsl2HomingInformation}
+ ${nnsInternetEvcAccessInformation}
+ ${nnsVrLan}
+ ${nnsUpceVmsServiceInfo}
+ ${nnsVnfInformationList}
+ ${nnsinternetSvcChangeDetails}
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+
+ content = utils.removeXmlPreamble(utils.formatXML(content))
+ execution.setVariable(resultVar, content)
+ taskProcessor.logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+
+ taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ taskProcessor.logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error")
+ }
+ }
+
+ /**
+ * Builds a topology SDNC request and return String request.
+ * As V2 will use 1607-style request, region instead of aic clli code
+ * @param execution, the execution
+ * @param requestXML, the incoming request for the flow
+ * @param serviceInstanceId, the serviceIntance (if available)
+ * @param callbackUrl, the call back url
+ * @param action, the action element value
+ * @param requestAction the svcOperation element value
+ * @param cloudRegionId the aai's cloud-region-id
+ * @param networkId the aai's network-id
+ * @param additionalData additional XML content to be inserted into the
+ * RequestData element (may be null)
+ */
+ public String sdncTopologyRequestV2 (Execution execution, String requestXML, String serviceInstanceId, String callbackUrl, String action, String requestAction, String cloudRegionId, networkId, String queryAAIResponse, String additionalData) {
+ def utils=new MsoUtils()
+
+ String requestId = ""
+ try {
+ requestId = execution.getVariable("mso-request-id")
+ } catch (Exception ex) {
+ requestId = utils.getNodeText1(requestXML, "request-id")
+ }
+
+ String aicCloudRegion = cloudRegionId
+ String tenantId = ""
+ if (utils.nodeExists(requestXML, "tenant-id")) {
+ tenantId = utils.getNodeText1(requestXML, "tenant-id")
+ }
+ String networkType = ""
+ if (utils.nodeExists(requestXML, "network-type")) {
+ networkType = utils.getNodeText1(requestXML, "network-type")
+ }
+
+ // Replace/Use the value of network-type from aai query (vs input) during Delete Network flows.
+ if (queryAAIResponse != null) {
+ networkType = utils.getNodeText1(queryAAIResponse, "network-type")
+ }
+
+ String serviceId = ""
+ if (utils.nodeExists(requestXML, "service-id")) {
+ serviceId = utils.getNodeText1(requestXML, "service-id")
+ }
+ String networkName = ""
+ if (utils.nodeExists(requestXML, "network-name")) {
+ networkName = utils.getNodeText1(requestXML, "network-name")
+ }
+ String source = ""
+ if (utils.nodeExists(requestXML, "source")) {
+ source = utils.getNodeText1(requestXML, "source")
+ }
+
+ // get resourceLink from subflow execution variable
+ String serviceType = ""
+ String subscriberName = ""
+ String siRelatedLink = execution.getVariable("GENGSI_siResourceLink")
+ if (siRelatedLink != null) {
+ // get service type
+ int serviceStart = siRelatedLink.indexOf("service-subscription/")
+ int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+ serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+ serviceType = UriUtils.decode(serviceType,"UTF-8")
+ // get subscriber name
+ int subscriberNameStart = siRelatedLink.indexOf("customers/customer/")
+ int subscriberNameEnd = siRelatedLink.indexOf("/service-subscriptions/")
+ subscriberName = siRelatedLink.substring(subscriberNameStart + 19, subscriberNameEnd)
+ subscriberName = UriUtils.decode(subscriberName,"UTF-8")
+ }
+
+ String content =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1"
+ xmlns:ns5="http://openecomp.com/mso/request/types/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>${requestAction}</request-action>
+ <source>${source}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <service-type>${serviceType}</service-type>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <subscriber-name>${subscriberName}</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>${networkId}</network-id>
+ <network-type>${networkType}</network-type>
+ <network-name>${networkName}</network-name>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ </network-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
+ return content
+ }
+
+ /**
+ * Builds a topology SDNC request and return String request.
+ * As V2 will use 1607-style request, region instead of aic clli code
+ * @param execution, the execution
+ * @param requestXML, the incoming request for the flow
+ * @param serviceInstanceId, the serviceIntance (if available)
+ * @param callbackUrl, the call back url
+ * @param action, the action element value
+ * @param requestAction the svcOperation element value
+ * @param cloudRegionId the aai's cloud-region-id
+ * @param networkId the aai's network-id
+ * @param additionalData additional XML content to be inserted into the
+ * RequestData element (may be null)
+ */
+ public String sdncTopologyRequestRsrc (Execution execution, String requestXML, String serviceInstanceId, String callbackUrl, String action, String requestAction, String cloudRegionId, networkId, String additionalData) {
+ def utils=new MsoUtils()
+
+ // SNDC is expecting request Id for header as unique each call.
+ String hdrRequestId = ""
+ String testHdrRequestId = execution.getVariable("testMessageId") // for test purposes.
+ if (testHdrRequestId == null) {
+ hdrRequestId = UUID.randomUUID() // generate unique
+ } else {
+ hdrRequestId = testHdrRequestId
+ }
+
+ String requestId = ""
+ String testRequestId = execution.getVariable("testMessageId") // for test purposes.
+ if (testRequestId == null) {
+ try {
+ requestId = execution.getVariable("mso-request-id")
+ } catch (Exception ex) {
+ requestId = utils.getNodeText1(requestXML, "request-id")
+ }
+ } else {
+ requestId = testRequestId
+ }
+
+ String aicCloudRegion = cloudRegionId
+ String tenantId = ""
+ if (utils.nodeExists(requestXML, "tenant-id")) {
+ tenantId = utils.getNodeText1(requestXML, "tenant-id")
+ }
+ String networkType = ""
+ if (utils.nodeExists(requestXML, "network-type")) {
+ networkType = utils.getNodeText1(requestXML, "network-type")
+ }
+
+ String subscriptionServiceType = ""
+ if (utils.nodeExists(requestXML, "subscription-service-type")) {
+ subscriptionServiceType = utils.getNodeText1(requestXML, "subscription-service-type")
+ }
+
+ String globalCustomerId = ""
+ if (utils.nodeExists(requestXML, "global-customer-id")) {
+ globalCustomerId = utils.getNodeText1(requestXML, "global-customer-id")
+ }
+
+ String serviceId = ""
+ if (utils.nodeExists(requestXML, "service-id")) {
+ serviceId = utils.getNodeText1(requestXML, "service-id")
+ }
+ String networkName = ""
+ if (utils.nodeExists(requestXML, "network-name")) {
+ networkName = utils.getNodeText1(requestXML, "network-name")
+ }
+ String source = ""
+ if (utils.nodeExists(requestXML, "source")) {
+ source = utils.getNodeText1(requestXML, "source")
+ }
+
+ // get resourceLink from subflow execution variable
+ String serviceType = ""
+ String subscriberName = ""
+ String siRelatedLink = execution.getVariable("GENGSI_siResourceLink")
+ if (siRelatedLink != null) {
+ // get service type
+ int serviceStart = siRelatedLink.indexOf("service-subscription/")
+ int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+ serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+ serviceType = UriUtils.decode(serviceType,"UTF-8")
+ // get subscriber name
+ int subscriberNameStart = siRelatedLink.indexOf("customers/customer/")
+ int subscriberNameEnd = siRelatedLink.indexOf("/service-subscriptions/")
+ subscriberName = siRelatedLink.substring(subscriberNameStart + 19, subscriberNameEnd)
+ subscriberName = UriUtils.decode(subscriberName,"UTF-8")
+ }
+
+ // network-information from 'networkModelInfo' // verify the DB Catalog response
+ String networkModelInfo = utils.getNodeXml(requestXML, "networkModelInfo", false).replace("tag0:","").replace(":tag0","")
+ String modelInvariantUuid = utils.getNodeText1(networkModelInfo, "modelInvariantUuid") !=null ?
+ utils.getNodeText1(networkModelInfo, "modelInvariantUuid") : ""
+ String modelCustomizationUuid = utils.getNodeText1(networkModelInfo, "modelCustomizationUuid") !=null ?
+ utils.getNodeText1(networkModelInfo, "modelCustomizationUuid") : ""
+ String modelUuid = utils.getNodeText1(networkModelInfo, "modelUuid") !=null ?
+ utils.getNodeText1(networkModelInfo, "modelUuid") : ""
+ String modelVersion = utils.getNodeText1(networkModelInfo, "modelVersion") !=null ?
+ utils.getNodeText1(networkModelInfo, "modelVersion") : ""
+ String modelName = utils.getNodeText1(networkModelInfo, "modelName") !=null ?
+ utils.getNodeText1(networkModelInfo, "modelName") : ""
+
+ // service-information from 'networkModelInfo' // verify the DB Catalog response
+ String serviceModelInfo = utils.getNodeXml(requestXML, "serviceModelInfo", false).replace("tag0:","").replace(":tag0","")
+ String serviceModelInvariantUuid = utils.getNodeText1(serviceModelInfo, "modelInvariantUuid") !=null ?
+ utils.getNodeText1(serviceModelInfo, "modelInvariantUuid") : ""
+ String serviceModelUuid = utils.getNodeText1(serviceModelInfo, "modelUuid") !=null ?
+ utils.getNodeText1(serviceModelInfo, "modelUuid") : ""
+ String serviceModelVersion = utils.getNodeText1(serviceModelInfo, "modelVersion") !=null ?
+ utils.getNodeText1(serviceModelInfo, "modelVersion") : ""
+ String serviceModelName = utils.getNodeText1(serviceModelInfo, "modelName") !=null ?
+ utils.getNodeText1(serviceModelInfo, "modelName") : ""
+
+
+ String content =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</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>${requestId}</request-id>
+ <request-action>${requestAction}</request-action>
+ <source>${source}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${subscriptionServiceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>
+ <model-uuid>${serviceModelUuid}</model-uuid>
+ <model-version>${serviceModelVersion}</model-version>
+ <model-name>${serviceModelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <global-customer-id>${globalCustomerId}</global-customer-id>
+ <subscriber-name>${subscriberName}</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>${networkId}</network-id>
+ <network-type>${networkType}</network-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid>
+ <model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>
+ <model-uuid>${modelUuid}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>${networkName}</network-name>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ <aic-clli></aic-clli>
+ <network-input-parameters/>
+ </network-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
+ return content
+ }
+
+ /**
+ * Validates a workflow response.
+ * @param execution the execution
+ * @param responseVar the execution variable in which the response is stored
+ * @param workflowException the WorkflowException Object returned from sdnc call
+ */
+ public void validateSDNCResponse(Execution execution, String response, WorkflowException workflowException, boolean successIndicator){
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ taskProcessor.utils.log("DEBUG", "SDNC Response is: " + response, isDebugLogEnabled)
+ taskProcessor.utils.log("DEBUG", "SuccessIndicator is: " + successIndicator, isDebugLogEnabled)
+
+ try {
+ def prefix = execution.getVariable('prefix')
+ execution.setVariable(prefix+'sdncResponseSuccess', false)
+ taskProcessor.utils.log("DEBUG", "Response" + ' = ' + (response == null ? "" : System.lineSeparator()) + response, isDebugLogEnabled)
+
+ if (successIndicator == true){
+ if (response == null || response.trim().equals("")) {
+ taskProcessor.utils.log("DEBUG", response + ' is empty');
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "SDNCAdapter Workflow Response is Empty")
+ }else{
+
+ // we need to peer into the request data for error
+ def String sdncAdapterWorkflowResponse = taskProcessor.utils.getNodeXml(response, 'response-data', false)
+ def String decodedXml = decodeXML(sdncAdapterWorkflowResponse).replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+
+ // change '&' to "&amp; (if present as data, ex: subscriber-name = 'FOUR SEASONS HEATING & COOLING_8310006378683'
+ decodedXml = decodedXml.replace("&", "&amp;")
+
+ taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
+
+ int requestDataResponseCode = 200
+ def String requestDataResponseMessage = ''
+
+ try{
+ if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
+ requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
+ } else if (taskProcessor.utils.nodeExists(decodedXml, "ResponseMessage")) {
+ requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "ResponseMessage")
+ }
+ }catch(Exception e){
+ taskProcessor.utils.log("DEBUG", 'Error caught while decoding resposne ' + e.getMessage(), isDebugLogEnabled)
+ }
+
+ if(taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
+ taskProcessor.utils.log("DEBUG","response-code node Exist ", isDebugLogEnabled)
+ String code = taskProcessor.utils.getNodeText1(decodedXml, "response-code")
+ if(code.isEmpty() || code.equals("")){
+ // if response-code is blank then Success
+ taskProcessor.utils.log("DEBUG","response-code node is empty", isDebugLogEnabled)
+ requestDataResponseCode = 0
+ }else{
+ requestDataResponseCode = code.toInteger()
+ taskProcessor.utils.log("DEBUG","response-code is: " + requestDataResponseCode, isDebugLogEnabled)
+ }
+ }else if(taskProcessor.utils.nodeExists(decodedXml, "ResponseCode")){
+ taskProcessor.utils.log("DEBUG","ResponseCode node Exist ", isDebugLogEnabled)
+ String code = taskProcessor.utils.getNodeText1(decodedXml, "ResponseCode")
+ if(code.isEmpty() || code.equals("")){
+ // if ResponseCode blank then Success
+ taskProcessor.utils.log("DEBUG","ResponseCode node is empty", isDebugLogEnabled)
+ requestDataResponseCode = 0
+ }else{
+ requestDataResponseCode = code.toInteger()
+ taskProcessor.utils.log("DEBUG","ResponseCode is: " + requestDataResponseCode, isDebugLogEnabled)
+ }
+ }else{
+ taskProcessor.utils.log("DEBUG","A Response Code DOES NOT Exist.", isDebugLogEnabled)
+ // if a response code does not exist then Success
+ requestDataResponseCode = 0
+ }
+ try{
+
+ // if a response code is 0 or 200 then Success
+ if (requestDataResponseCode == 200 || requestDataResponseCode == 0) {
+ execution.setVariable(prefix+'sdncResponseSuccess', true)
+ taskProcessor.utils.log("DEBUG", "Setting sdncResponseSuccess to True ", isDebugLogEnabled)
+ taskProcessor.utils.log("DEBUG", "Exited ValidateSDNCResponse Method", isDebugLogEnabled)
+ }else{
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ String convertedCode = exceptionUtil.MapSDNCResponseCodeToErrorCode(requestDataResponseCode.toString())
+ int convertedCodeInt = Integer.parseInt(convertedCode)
+ exceptionUtil.buildAndThrowWorkflowException(execution, convertedCodeInt, "Received error from SDN-C: " + requestDataResponseMessage)
+ }
+
+ }catch(Exception e){
+ //TODO proper handling of new, non numerical response codes in 1607 and new error handling for common API
+ requestDataResponseCode = 500
+ }
+
+ taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
+ taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
+ }
+
+ }else {
+ taskProcessor.utils.log("DEBUG", 'SDNCAdapter Subflow did NOT complete Successfully. SuccessIndicator is False. ')
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }else{
+ //TODO : what error code and error message use here
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - SDNCAdapter Subflow did NOT complete successfully.")
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ taskProcessor.utils.log("DEBUG", 'END of Validate SDNC Response', isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, 'Internal Error- Unable to validate SDNC Response ');
+ }
+ }
+
+ /**
+ * 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 validateL3BondingSDNCResp(Execution execution, String response, WorkflowException workflowException, boolean success) {
+ def method = getClass().getSimpleName() + '.validateL3BondingSDNCResp(' +
+ 'execution=' + execution.getId() +
+ ', response=' + response +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+ def prefix = execution.getVariable('prefix')
+ TrinityExceptionUtil trinityExceptionUtil = new TrinityExceptionUtil()
+
+ try {
+ execution.setVariable(prefix+'sdncResponseSuccess', false)
+
+ taskProcessor.utils.log("sdncAdapter Success Indicator is: " + success, isDebugLogEnabled)
+ if (success == true) {
+
+ // we need to look inside the request data for error
+ def String callbackRequestData = taskProcessor.utils.getNodeXml(response, 'RequestData', false)
+ def String decodedXml = decodeXML(callbackRequestData)
+ taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
+
+ def requestDataResponseCode = '200'
+ def requestDataResponseMessage = ''
+ int intDataResponseCode = 200
+
+ if (taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
+
+ requestDataResponseCode = ((String) taskProcessor.utils.getNodeText(decodedXml, "response-code"))
+ if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
+ requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
+ }
+ }else if(taskProcessor.utils.nodeExists(decodedXml, "ResponseCode")){
+ requestDataResponseCode = ((String) taskProcessor.utils.getNodeText1(decodedXml, "ResponseCode")).toInteger()
+ }else if(taskProcessor.utils.nodeExists(response, "ResponseCode")){
+ requestDataResponseCode = ((String) taskProcessor.utils.getNodeText1(response, "ResponseCode")).toInteger()
+ requestDataResponseMessage = taskProcessor.utils.getNodeText(response, "ResponseMessage")
+ }
+
+ taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
+ taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
+
+ // Get the AAI Status to determine if rollback is needed on ASSIGN
+ def aai_status = ''
+ if (taskProcessor.utils.nodeExists(decodedXml, "aai-status")) {
+ aai_status = ((String) taskProcessor.utils.getNodeText(decodedXml, "aai-status"))
+ taskProcessor.utils.log("DEBUG", "SDNC sent AAI STATUS code: " + aai_status, isDebugLogEnabled)
+ }
+ if (aai_status != null && !aai_status.equals("")) {
+ execution.setVariable(prefix+"AaiStatus",aai_status)
+ taskProcessor.utils.log("DEBUG", "Set variable " + prefix + "AaiStatus: " + execution.getVariable(prefix+"AaiStatus"), isDebugLogEnabled)
+ }
+
+ // Get the result string to determine if rollback is needed on ASSIGN in Add Bonding flow only
+ def sdncResult = ''
+ if (taskProcessor.utils.nodeExists(decodedXml, "result")) {
+ sdncResult = ((String) taskProcessor.utils.getNodeText(decodedXml, "result"))
+ taskProcessor.utils.log("DEBUG", "SDNC sent result: " + sdncResult, isDebugLogEnabled)
+ }
+ if (sdncResult != null && !sdncResult.equals("")) {
+ execution.setVariable(prefix+"SdncResult",sdncResult)
+ taskProcessor.utils.log("DEBUG", "Set variable " + prefix + "SdncResult: " + execution.getVariable(prefix+"SdncResult"), isDebugLogEnabled)
+ }
+
+ try{
+ intDataResponseCode = Integer.parseInt(String.valueOf(requestDataResponseCode))
+ }catch(Exception e){
+ intDataResponseCode = 400
+ }
+
+ taskProcessor.utils.log("DEBUG", "intDataResponseCode " + intDataResponseCode , isDebugLogEnabled)
+
+ // if response-code is not Success (200, 201, etc) we need to throw an exception
+ if (intDataResponseCode != 200 && intDataResponseCode != 0) {
+ execution.setVariable(prefix+'ResponseCode', intDataResponseCode)
+ execution.setVariable("L3HLAB_rollback", true)
+ def msg = trinityExceptionUtil.mapSDNCAdapterExceptionToErrorResponse(response, execution)
+ exceptionUtil.buildAndThrowWorkflowException(execution, intDataResponseCode, "Received error from SDN-C: " + msg)
+
+ }
+ }else {
+ taskProcessor.logWarn('sdncAdapter did not complete successfully, sdncAdapter Success Indicator was false ')
+ execution.setVariable("L3HLAB_rollback", true)
+ def msg = trinityExceptionUtil.mapSDNCAdapterExceptionToErrorResponse(response, execution)
+ exceptionUtil.buildAndThrowWorkflowException(execution, responseCode, msg)
+ }
+
+ if (response == null || response.trim().equals("")) {
+ taskProcessor.logWarn('sdncAdapter workflow response is empty');
+ execution.setVariable("L3HLAB_rollback", true)
+ def msg = trinityExceptionUtil.buildException("Exception occurred while validating SDNC response " , execution)
+ exceptionUtil.buildAndThrowWorkflowException(execution, intResponseCode, msg)
+ }
+
+ execution.setVariable(prefix+'sdncResponseSuccess', true)
+ taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ taskProcessor.logError('Caught exception in ' + method, e)
+ execution.setVariable(prefix+"ResponseCode",400)
+ execution.setVariable("L3HLAB_rollback", true)
+ def msg = trinityExceptionUtil.buildException("Exception occurred while validating SDNC response: " + e.getMessage(), execution)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 400, msg)
+ }
+ }
+
+ public String modelInfoToEcompModelInformation(String jsonModelInfo) {
+ String modelInvariantId = jsonUtil.getJsonValue(jsonModelInfo, "modelInvariantId")
+ String modelVersionId = jsonUtil.getJsonValue(jsonModelInfo, "modelVersionId")
+ if (modelVersionId == null) {
+ modelVersionId = ""
+ }
+ String modelCustomizationUuid = jsonUtil.getJsonValue(jsonModelInfo, "modelCustomizationId")
+ String modelCustomizationString = ""
+ if (modelCustomizationUuid != null) {
+ modelCustomizationString = "<model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>"
+ }
+ String modelVersion = jsonUtil.getJsonValue(jsonModelInfo, "modelVersion")
+ String modelName = jsonUtil.getJsonValue(jsonModelInfo, "modelName")
+ String ecompModelInformation =
+ """<ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantId}</model-invariant-uuid>
+ <model-uuid>${modelVersionId}</model-uuid>
+ ${modelCustomizationString}
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>"""
+
+ return ecompModelInformation
+ }
+
+ /**
+ * Decode XML - replace &amp; &lt; and &gt; with '&', '<' and '>'
+ * @param xml - the xml to be decoded
+ */
+ private String decodeXML(String xml) {
+ def String decodedXml = xml.replaceAll("&amp;", "&")
+ decodedXml = decodedXml.replaceAll("&lt;", "<")
+ decodedXml = decodedXml.replaceAll("&gt;", ">")
+ }
+
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ServiceTaskProcessor.groovy
index 27699ca1c2..975fdd3ae2 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ServiceTaskProcessor.groovy
@@ -1,32 +1,32 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import org.camunda.bpm.engine.runtime.Execution
-
-
-/**
- * @version 1.0
- *
- */
-public interface ServiceTaskProcessor {
- public void preProcessRequest(Execution execution);
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import org.camunda.bpm.engine.runtime.Execution
+
+
+/**
+ * @version 1.0
+ *
+ */
+public interface ServiceTaskProcessor {
+ public void preProcessRequest(Execution execution);
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtil.groovy
new file mode 100644
index 0000000000..03fa63e93b
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtil.groovy
@@ -0,0 +1,382 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+class TrinityExceptionUtil {
+
+
+
+ public static enum Error {
+ SVC_GENERAL_SERVICE_ERROR("SVC0001","Internal Error"),
+ SVC_BAD_PARAMETER("SVC0002", "Invalid input value for message part %1"),
+ SVC_NO_SERVER_RESOURCES("SVC1000", "No server resources available to process the request"),
+ SVC_DETAILED_SERVICE_ERROR("SVC2000", "The following service error occurred: %1. Error code is %2."),
+ POL_GENERAL_POLICY_ERROR("POL0001", "A policy error occurred."),
+ POL_USER_NOT_PROVISIONED("POL1009", "User has not been provisioned for service"),
+ POL_USER_SUSPENDED("POL1010", "User has been suspended from service"),
+ POL_DETAILED_POLICY_ERROR("POL2000", "The following policy error occurred: %1. Error code is %2."),
+ POL_MSG_SIZE_EXCEEDS_LIMIT("POL9003", "Message content size exceeds the allowable limit")
+
+
+ private final String msgId
+ private final String msgTxt
+
+ private Error(String msgId, String msgTxt) {
+ this.msgId = msgId
+ this.msgTxt = msgTxt
+ }
+
+ public String getMsgId() {
+ return msgId
+ }
+
+ public String getMsgTxt() {
+ return msgTxt
+ }
+
+ }
+
+
+
+
+ String mapAdapterExecptionToCommonException(String response, Execution execution)
+ {
+ def utils=new MsoUtils()
+ def method = getClass().getSimpleName() + '.mapAdapterExecptionToCommonException(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+
+
+ def errorCode
+
+
+ try {
+ errorCode = MapCategoryToErrorCode(utils.getNodeText(response, "category"))
+ execution.setVariable(prefix+"err",errorCode)
+ String message = buildException(response, execution)
+ utils.log("DEBUG","=========== End MapAdapterExecptionToWorkflowException ===========",isDebugLogEnabled)
+ return message
+ }catch (Exception ex) {
+ //Ignore the exception - cases include non xml payload
+ utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
+ utils.log("DEBUG","=========== End MapAdapterExecptionToWorkflowException ===========",isDebugLogEnabled)
+ return buildException(response, execution)
+ }
+ }
+
+ /**
+ * @param response
+ * @param execution
+ * @return mapped exception
+ */
+ String mapAOTSExecptionToCommonException(String response, Execution execution)
+ {
+ def utils=new MsoUtils()
+
+ def prefix=execution.getVariable("prefix")
+ def method = getClass().getSimpleName() + '.mapAOTSExecptionToCommonException(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+
+
+ try {
+ def errorCode = utils.getNodeText(response,"code")
+ def descr = utils.getNodeText(response, "description")
+ def mappedErr = mapErrorCodetoError(errorCode, descr)
+ if(mappedErr == Error.SVC_DETAILED_SERVICE_ERROR || mappedError == Error.POL_DETAILED_POLICY_ERROR){
+ ArrayList myVars = new ArrayList()
+ myVars.add(descr)
+ myVars.add(errorCode)
+ execution.setVariable(prefix+"errVariables", myVars)
+ }
+ execution.setVariable(prefix+"err",mappedErr)
+ def message = buildException("Received error from AOTS: " + descr, execution)
+ utils.log("DEBUG","=========== End MapAOTSExecptionToCommonException ===========",isDebugLogEnabled)
+ return message
+ }catch (Exception ex) {
+ //Ignore the exception - cases include non xml payload
+ utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
+ utils.log("DEBUG","=========== End MapAOTSExecptionToCommonException ===========",isDebugLogEnabled)
+ return buildException(response, execution)
+ }
+ }
+
+ String mapSDNCAdapterExceptionToErrorResponse(String sdncAdapterCallbackRequest, Execution execution) {
+ def utils=new MsoUtils()
+ def prefix=execution.getVariable("prefix")
+ def method = getClass().getSimpleName() + '.mapSDNCAdapterExceptionToErrorResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+
+ def sdncResponseCode
+ String responseCode = execution.getVariable(prefix+"ResponseCode")
+ utils.log("DEBUG",'responseCode to map: ' + responseCode, isDebugLogEnabled)
+ def errorMessage
+
+ try {
+
+ if(utils.nodeExists(sdncAdapterCallbackRequest, "RequestData")) {
+ def reqDataXml = StringEscapeUtils.unescapeXml(utils.getNodeXml(sdncAdapterCallbackRequest, "RequestData"))
+ errorMessage = utils.getNodeText(reqDataXml, "response-message")
+ sdncResponseCode = utils.getNodeText(reqDataXml, "response-code")
+ }else{
+ errorMessage = utils.getNodeText(sdncAdapterCallbackRequest, "ResponseMessage")
+ sdncResponseCode = responseCode
+ }
+ def mappedErr = mapErrorCodetoError(responseCode, errorMessage)
+ errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ def modifiedErrorMessage = "Received error from SDN-C: " + errorMessage
+ if(mappedErr == Error.SVC_DETAILED_SERVICE_ERROR || mappedErr == Error.POL_DETAILED_POLICY_ERROR){
+ ArrayList myVars = new ArrayList()
+ myVars.add(errorMessage)
+ myVars.add(sdncResponseCode)
+ execution.setVariable(prefix+"errVariables", myVars)
+ }
+ execution.setVariable(prefix+"err",mappedErr)
+ def message = buildException(modifiedErrorMessage, execution)
+
+
+ utils.log("DEBUG","=========== End MapSDNCAdapterException ===========",isDebugLogEnabled)
+ return message
+ }catch (Exception ex) {
+ //Ignore the exception - cases include non xml payload
+ utils.log("DEBUG","error mapping sdnc error, ignoring: " + ex,isDebugLogEnabled)
+ utils.log("DEBUG","=========== End MapSDNCAdapterException ===========",isDebugLogEnabled)
+ return null
+ }
+
+ }
+
+ /**
+ * @param response message from called component (ex: AAI)
+ * @param execution
+ * @return an error response conforming to the common
+ */
+ String mapAAIExceptionTCommonException(String response, Execution execution)
+ {
+ def utils=new MsoUtils()
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def prefix=execution.getVariable("prefix")
+ def method = getClass().getSimpleName() + '.mapAAIExceptionTCommonException(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+ def variables
+ def message
+ String errorCode = 'SVC0001'
+ utils.log("DEBUG","response: " + response, isDebugLogEnabled)
+ //they use the same format we do, pass their error along
+ //TODO add Received error from A&AI at beg of text
+ try {
+ message = utils.getNodeXml(response, "requestError")
+ message = utils.removeXmlNamespaces(message)
+ } catch (Exception ex) {
+ //Ignore the exception - cases include non xml payload
+ message = buildException("Received error from A&AI, unable to parse",execution)
+ utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
+ }
+
+ if(message != null) {
+ execution.setVariable(prefix+"ErrorResponse",message)
+ utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
+ return message
+ } else {
+
+ return null
+
+ }
+ }
+
+ /**
+ * @param execution
+ * @return an error response conforming to the common API with default text msg
+ */
+ String buildException(execution){
+ return buildException(null, execution)
+ }
+
+ /**
+ * @param response message from called component (ex: AAI)
+ * @param execution
+ * @return an error response conforming to the common
+ */
+ String buildException(response, execution){
+ def utils=new MsoUtils()
+ def method = getClass().getSimpleName() + '.buildException(' +
+ 'execution=' + execution.getId() +
+ ')'
+
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+ def prefix=execution.getVariable("prefix")
+ def responseCode = String.valueOf(execution.getVariable(prefix+"ResponseCode"))
+ def variables
+ utils.log("DEBUG","response: " + response, isDebugLogEnabled)
+
+ try {
+ utils.log("DEBUG","formatting error message" ,isDebugLogEnabled)
+ def msgVars = execution.getVariable(prefix+"errVariables")
+ def myErr = execution.getVariable(prefix+"err")
+ def messageTxt = execution.getVariable(prefix+"errTxt")
+ def messageId = null
+
+ if(myErr == null){
+ utils.log("DEBUG","mapping response code: " + responseCode, isDebugLogEnabled)
+ myErr = mapErrorCodetoError(responseCode, response)
+ if(myErr == null){
+ //not a service or policy error, just return error code
+ return ""
+ }
+ }
+ messageId = myErr.getMsgId()
+
+ if(messageTxt == null){
+ if(myErr!=null){
+ messageTxt = myErr.getMsgTxt()
+ }else{
+ messageTxt = response
+ }
+ }
+
+ if(msgVars==null && (myErr == Error.SVC_DETAILED_SERVICE_ERROR || myErr == Error.POL_DETAILED_POLICY_ERROR)){
+ msgVars = new ArrayList()
+ msgVars.add(response)
+ msgVars.add(responseCode)
+ }
+
+ def msgVarsXML=""
+ StringBuffer msgVarsBuff = new StringBuffer()
+ if(msgVars!=null){
+ for(String msgVar : msgVars){
+ msgVarsBuff.append(
+ """
+ <tns:variables>${msgVar}</tns:variables>""")
+ }
+
+ }
+ def message = ""
+ if(messageId.startsWith("SVC")){
+ message = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ <tns:serviceException>
+ <tns:messageId>${messageId}</tns:messageId>
+ <tns:text>${messageTxt}</tns:text>${msgVarsBuff}
+ </tns:serviceException>
+</tns:requestError>"""
+ }else{
+ message ="""<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ <tns:policyException>
+ <tns:messageId>${messageId}</tns:messageId>
+ <tns:text>${messageTxt}</tns:text>${msgVarsBuff}
+ </tns:policyException>
+</tns:requestError>"""
+ }
+ utils.log("DEBUG", "message " + message, isDebugLogEnabled)
+ execution.setVariable(prefix+"ErrorResponse",message)
+ execution.setVariable(prefix+"err", myErr)
+ execution.setVariable(prefix+"errTxt", messageTxt)
+ execution.setVariable(prefix+"errVariables", msgVars)
+ utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
+ return message
+ }catch(Exception ex) {
+ utils.log("DEBUG","error mapping error, return null: " + ex,isDebugLogEnabled)
+ return null
+ }
+
+ }
+
+ String parseError(Execution execution){
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ def utils=new MsoUtils()
+ def prefix=execution.getVariable("prefix")
+ def text = execution.getVariable(prefix+"errTxt")
+ def msgVars = execution.getVariable(prefix+"errVariables")
+ utils.log("DEBUG",'parsing message: ' + text, isDebugLogEnabled)
+ if(text == null){
+ return 'failed'
+ }
+ if(msgVars!=null && !msgVars.isEmpty()){
+ for(int i=0; i<msgVars.size(); i++){
+ text = text.replaceFirst("%"+(i+1), msgVars[i])
+ }
+ }
+ utils.log("DEBUG",'parsed message is: ' + text, isDebugLogEnabled)
+ return text
+ }
+
+
+
+ Error mapErrorCodetoError(responseCode, descr)
+ {
+
+ if(responseCode==null || responseCode=='0' || responseCode=='500' || responseCode =='408'){
+ return Error.SVC_NO_SERVER_RESOURCES
+ }else if(responseCode == '401' || responseCode == '405' || responseCode == '409' || responseCode == '503'){
+ return null
+ }else if(responseCode == '400'){
+ if(descr==null){
+ return Error.SVC_GENERAL_SERVICE_ERROR
+ }else{
+ return Error.SVC_DETAILED_SERVICE_ERROR
+ }
+ }else if(responseCode == '401'){
+ if(descr==null){
+ return Error.POL_GENERAL_POLICY_ERROR
+ }else{
+ return Error.POL_DETAILED_POLICY_ERROR
+ }
+ }else{
+ return Error.SVC_NO_SERVER_RESOURCES
+ }
+ }
+
+ String mapCategoryToErrorCode(String errorCategory)
+ {
+ if(errorCategory.equals('OPENSTACK'))
+ return Error.SVC_NO_SERVER_RESOURCES
+ else if (errorCategory.equals('IO'))
+ return Error.SVC_NO_SERVER_RESOURCES
+ else if (errorCategory.equals('INTERNAL'))
+ return Error.SVC_NO_SERVER_RESOURCES
+ else if (errorCategory.equals('USERDATA'))
+ return Error.SVC_GENERAL_SERVICE_ERROR
+ else
+ return Error.SVC_GENERAL_SERVICE_ERROR
+ }
+
+
+
+
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
index 16edaf1410..4838a67d36 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
@@ -1,330 +1,328 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.util.Node
-import groovy.util.XmlParser;
-import groovy.xml.QName
-
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.springframework.web.util.UriUtils
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-
-public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
-
- private XmlParser xmlParser = new XmlParser()
-
- /**
- * Initialize the flow's variables.
- *
- * @param execution The flow's execution instance.
- */
- public void initProcessVariables(Execution execution) {
- execution.setVariable('prefix', 'UAAIGenVnf_')
- execution.setVariable('UAAIGenVnf_vnfId', null)
- execution.setVariable('UAAIGenVnf_personaModelId', null)
- execution.setVariable('UAAIGenVnf_personaModelVersion', null)
- execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode' ,null)
- execution.setVariable('UAAIGenVnf_getGenericVnfResponse', '')
- execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', null)
- execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', '')
- }
-
- /**
- * Check for missing elements in the received request.
- *
- * @param execution The flow's execution instance.
- */
- public void preProcessRequest(Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def xml = execution.getVariable('UpdateAAIGenericVnfRequest')
- logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
- initProcessVariables(execution)
-
- def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
- execution.setVariable('UAAIGenVnf_vnfId', vnfId)
-
- def personaModelId = getRequiredNodeText(execution, xml,'persona-model-id')
- execution.setVariable('UAAIGenVnf_personaModelId', personaModelId)
-
- def personaModelVersion = getRequiredNodeText(execution, xml,'persona-model-version')
- execution.setVariable('UAAIGenVnf_personaModelVersion', personaModelVersion)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
- }
- }
-
- /**
- * Using the received vnfId, query AAI to get the corresponding Generic VNF.
- * A 200 response is expected with the VF Module in the response body.
- *
- * @param execution The flow's execution instance.
- */
- public void getGenericVnf(Execution execution) {
- def method = getClass().getSimpleName() + '.getGenericVnf(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('UAAIGenVnf_vnfId')
-
- // Construct endpoint
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
- String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8")
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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');
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
- APIResponse response = client.httpGet()
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode', response.getStatusCode())
- execution.setVariable('UAAIGenVnf_getGenericVnfResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
- execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode', 500)
- execution.setVariable('UAAIGenVnf_getGenericVnfResponse', 'AAI GET Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in getGenericVnf(): ' + e.getMessage())
- }
- }
-
- /**
- * Construct and send a PUT request to AAI to update the Generic VNF.
- *
- * @param execution The flow's execution instance.
- */
- public void updateGenericVnf(Execution execution) {
- def method = getClass().getSimpleName() + '.updateGenericVnf(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('UAAIGenVnf_vnfId')
- def genericVnf = execution.getVariable('UAAIGenVnf_getGenericVnfResponse')
- def origRequest = execution.getVariable('UpdateAAIGenericVnfRequest')
-
- // Confirm resource-version is in retrieved Generic VNF
- def Node genericVnfNode = xmlParser.parseText(genericVnf)
- if (utils.getChildNode(genericVnfNode, 'resource-version') == null) {
- def msg = 'Can\'t update Generic VNF ' + vnfId + ' since \'resource-version\' is missing'
- logError(msg)
- throw new Exception(msg)
- }
-
- // Handle persona-model-id/persona-model-version
- def String newPersonaModelId = execution.getVariable('UAAIGenVnf_personaModelId')
- def String newPersonaModelVersion = execution.getVariable('UAAIGenVnf_personaModelVersion')
-
- // Confirm "new" persona-model-id is same as "current" persona-model-id
- def Node currPersonaModelIdNode = utils.getChildNode(genericVnfNode, 'persona-model-id')
- def String currPersonaModelId = ''
- if (currPersonaModelIdNode != null) {
- currPersonaModelId = currPersonaModelIdNode.text()
- }
- if (!newPersonaModelId.equals(currPersonaModelId)) {
- def msg = 'Can\'t update Generic VNF ' + vnfId + ' since there is \'persona-model-id\' mismatch between the current and new values'
- logError(msg)
- throw new Exception(msg)
- }
-
- // Construct payload
- updateGenericVnfNode(origRequest, genericVnfNode, 'persona-model-version')
- def payload = utils.nodeToString(genericVnfNode)
-
- // Construct endpoint
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
- String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8")
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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');
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
- APIResponse response = client.httpPut(payload)
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', response.getStatusCode())
- execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(),isDebugLogEnabled)
- execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', 500)
- execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', 'AAI PUT Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in updateGenericVnf(): ' + e.getMessage())
- }
- }
-
- /**
- * Insert a new Node, replace the value of an existing Node, or delete an existing Node in the current
- * Generic VNF Node, as necessary.
- *
- * If the Node with the same name already exists in current Generic VNF, but is not being updated, then do
- * nothing. If the element is being updated and it already exists in the current Generic VNF, then check
- * the value specified in the original request. If the value is 'DELETE', remove that Node from the
- * current Generic VNF. Otherwise, change the value to the specified new value. If the element is
- * being updated but doesn't exist in the current Generic VNF, and the new value is not 'DELETE', then
- * create an appropriate new node and add it to the Generic VNF.
- *
- * @param origRequest Incoming update request with Generic VNF element(s) to be updated.
- * @param genericVnf Current Generic VNF retrieved from AAI.
- * @param element Name of element to be inserted.
- */
- public void updateGenericVnfNode(String origRequest, Node genericVnfNode, String elementName) {
-
- if (!utils.nodeExists(origRequest, elementName)) {
- return
- }
- def elementValue = utils.getNodeText(origRequest, elementName)
-
- def Node childNode = utils.getChildNode(genericVnfNode, elementName)
- if (childNode == null) {
- if (elementValue.equals('DELETE')) {
- // Element doesn't exist but is being deleted, so do nothing
- return
- }
- // Node doesn't exist, create a new Node as a child
- new Node(genericVnfNode, elementName, elementValue)
- } else {
- if (elementValue.equals('DELETE')) {
- // Node exists, but should be deleted
- genericVnfNode.remove(childNode)
- } else {
- // Node already exists, just give it a new value
- childNode.setValue(elementValue)
- }
- }
- }
-
- /**
- * Generates a WorkflowException if the AAI query returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleAAIQueryFailure(Execution execution) {
- def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to query AAI, Response Code ' +
- execution.getVariable('UAAIGenVnf_getGenericVnfResponseCode') + ', Error Response ' +
- execution.getVariable('UAAIGenVnf_getGenericVnfResponse'))
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable('UAAIGenVnf_getGenericVnfResponse'))
- execution.setVariable('WorkflowException', exception)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-
- /**
- * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleUpdateGenericVnfFailure(Execution execution) {
- def method = getClass().getSimpleName() + '.handleUpdateGenericVnfFailure(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to update Generic VNF in AAI, Response Code ' +
- execution.getVariable('UAAIGenVnf_updateGenericVnfResponseCode') + ', Error Response ' +
- execution.getVariable('UAAIGenVnf_updateGenericVnfResponse'))
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable('UAAIGenVnf_updateGenericVnfResponse'))
- execution.setVariable('WorkflowException', exception)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
+
+ private XmlParser xmlParser = new XmlParser()
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'UAAIGenVnf_')
+ execution.setVariable('UAAIGenVnf_vnfId', null)
+ execution.setVariable('UAAIGenVnf_personaModelId', null)
+ execution.setVariable('UAAIGenVnf_personaModelVersion', null)
+ execution.setVariable("UAAIGenVnf_ipv4OamAddress", null)
+ execution.setVariable('UAAIGenVnf_managementV6Address', null)
+ execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode' ,null)
+ execution.setVariable('UAAIGenVnf_getGenericVnfResponse', '')
+ execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', null)
+ execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', '')
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def xml = execution.getVariable('UpdateAAIGenericVnfRequest')
+ logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+ utils.logAudit("UpdateAAIGenericVnf Request XML: " + xml)
+ initProcessVariables(execution)
+
+ def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+ execution.setVariable('UAAIGenVnf_vnfId', vnfId)
+
+ def personaModelId = getNodeTextForce(xml,'persona-model-id')
+ if (personaModelId != null && !personaModelId.isEmpty()) {
+ execution.setVariable('UAAIGenVnf_personaModelId', personaModelId)
+ }
+
+ def personaModelVersion = getNodeTextForce(xml,'persona-model-version')
+ if (personaModelVersion != null && !personaModelVersion.isEmpty()) {
+ execution.setVariable('UAAIGenVnf_personaModelVersion', personaModelVersion)
+ }
+
+ def ipv4OamAddress = getNodeTextForce(xml, 'ipv4-oam-address')
+ if (ipv4OamAddress != null && !ipv4OamAddress.isEmpty()) {
+ execution.setVariable('UAAIGenVnf_ipv4OamAddress', ipv4OamAddress)
+ }
+
+ def managementV6Address = getNodeTextForce(xml, 'management-v6-address')
+ if (managementV6Address != null && !managementV6Address.isEmpty()) {
+ execution.setVariable('UAAIGenVnf_managementV6Address', managementV6Address)
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Using the received vnfId, query AAI to get the corresponding Generic VNF.
+ * A 200 response is expected with the VF Module in the response body.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void getGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.getGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('UAAIGenVnf_vnfId')
+
+ // Construct endpoint
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+
+ try {
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ utils.logAudit("Sending GET to AAI endpoint: " + endPoint)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+ def responseData = response.getResponseBodyAsString()
+ execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode', response.getStatusCode())
+ execution.setVariable('UAAIGenVnf_getGenericVnfResponse', responseData)
+ utils.logAudit("UpdateAAIGenericVnf Response data: " + responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode', 500)
+ execution.setVariable('UAAIGenVnf_getGenericVnfResponse', 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Construct and send a PUT request to AAI to update the Generic VNF.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void updateGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.updateGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('UAAIGenVnf_vnfId')
+ def genericVnf = execution.getVariable('UAAIGenVnf_getGenericVnfResponse')
+ def origRequest = execution.getVariable('UpdateAAIGenericVnfRequest')
+
+ utils.logAudit("UpdateGenericVnf Request: " + origRequest)
+ // Confirm resource-version is in retrieved Generic VNF
+ def Node genericVnfNode = xmlParser.parseText(genericVnf)
+ if (utils.getChildNode(genericVnfNode, 'resource-version') == null) {
+ def msg = 'Can\'t update Generic VNF ' + vnfId + ' since \'resource-version\' is missing'
+ logError(msg)
+ throw new Exception(msg)
+ }
+
+ // Handle persona-model-id/persona-model-version
+
+ def String newPersonaModelId = execution.getVariable('UAAIGenVnf_personaModelId')
+ def String newPersonaModelVersion = execution.getVariable('UAAIGenVnf_personaModelVersion')
+ def String personaModelVersionEntry = ""
+ if (newPersonaModelId != null || newPersonaModelVersion != null) {
+
+ // Confirm "new" persona-model-id is same as "current" persona-model-id
+ def Node currPersonaModelIdNode = utils.getChildNode(genericVnfNode, 'persona-model-id')
+ def String currPersonaModelId = ''
+ if (currPersonaModelIdNode != null) {
+ currPersonaModelId = currPersonaModelIdNode.text()
+ }
+ if (!newPersonaModelId.equals(currPersonaModelId)) {
+ def msg = 'Can\'t update Generic VNF ' + vnfId + ' since there is \'persona-model-id\' mismatch between the current and new values'
+ logError(msg)
+ throw new Exception(msg)
+ }
+
+ // Construct payload
+ personaModelVersionEntry = updateGenericVnfNode(origRequest, genericVnfNode, 'persona-model-version')
+ }
+
+ // Handle ipv4-oam-address
+ def String ipv4OamAddress = execution.getVariable('UAAIGenVnf_ipv4OamAddress')
+ def String ipv4OamAddressEntry = ""
+ if (ipv4OamAddress != null) {
+ // Construct payload
+ ipv4OamAddressEntry = updateGenericVnfNode(origRequest, genericVnfNode, 'ipv4-oam-address')
+ }
+
+ // Handle management-v6-address
+ def String managementV6Address = execution.getVariable('UAAIGenVnf_managementV6Address')
+ def String managementV6AddressEntry = ""
+ if (managementV6Address != null) {
+ // Construct payload
+ managementV6AddressEntry = updateGenericVnfNode(origRequest, genericVnfNode, 'management-v6-address')
+ }
+
+ def payload = """
+ { ${personaModelVersionEntry}
+ ${ipv4OamAddressEntry}
+ ${managementV6AddressEntry}
+ "vnf-id": "${vnfId}"
+ }
+ """
+
+ // Construct endpoint
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8")
+
+ try {
+ logDebug('sending PATCH to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+ utils.logAudit("Sending PATCH to AAI endpoint: " + endPoint)
+
+ APIResponse response = aaiUriUtil.executeAAIPatchCall(execution, endPoint, payload)
+ def responseData = response.getResponseBodyAsString()
+ execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', response.getStatusCode())
+ execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', responseData)
+ utils.logAudit("UpdateAAIGenericVnf Response Data: " + responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI PATCH:' + ex.getMessage(),isDebugLogEnabled)
+ execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', 500)
+ execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', 'AAI PATCH Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in updateGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Sets up json attributes for PATCH request for Update
+ *
+ * @param origRequest Incoming update request with Generic VNF element(s) to be updated.
+ * @param genericVnf Current Generic VNF retrieved from AAI.
+ * @param element Name of element to be inserted.
+ */
+ public String updateGenericVnfNode(String origRequest, Node genericVnfNode, String elementName) {
+
+ if (!utils.nodeExists(origRequest, elementName)) {
+ return ""
+ }
+ def elementValue = utils.getNodeText(origRequest, elementName)
+
+ if (elementValue.equals('DELETE')) {
+ // Set the element being deleted to null
+ return """"${elementName}": null,"""
+ }
+ else {
+ return """"${elementName}": "${elementValue}","""
+ }
+
+ }
+
+ /**
+ * Generates a WorkflowException if the AAI query returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleAAIQueryFailure(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to query AAI, Response Code ' +
+ execution.getVariable('UAAIGenVnf_getGenericVnfResponseCode') + ', Error Response ' +
+ execution.getVariable('UAAIGenVnf_getGenericVnfResponse'))
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable('UAAIGenVnf_getGenericVnfResponse'))
+ execution.setVariable('WorkflowException', exception)
+
+ utils.logAudit("Workflow Exception occurred when handling Quering AAI: " + exception.getErrorMessage())
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+
+ /**
+ * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleUpdateGenericVnfFailure(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleUpdateGenericVnfFailure(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to update Generic VNF in AAI, Response Code ' +
+ execution.getVariable('UAAIGenVnf_updateGenericVnfResponseCode') + ', Error Response ' +
+ execution.getVariable('UAAIGenVnf_updateGenericVnfResponse'))
+
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable('UAAIGenVnf_updateGenericVnfResponse'))
+ execution.setVariable('WorkflowException', exception)
+
+ utils.logAudit("Workflow Exception occurred when Updating GenericVnf: " + exception.getErrorMessage())
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/UpdateAAIVfModule.groovy
index b8b8b8baa2..7283a3ecfc 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/UpdateAAIVfModule.groovy
@@ -1,416 +1,378 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.util.Node
-import groovy.util.XmlParser;
-import groovy.xml.QName
-
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.springframework.web.util.UriUtils
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-
-public class UpdateAAIVfModule extends AbstractServiceTaskProcessor {
-
- private XmlParser xmlParser = new XmlParser()
-
- /**
- * Initialize the flow's variables.
- *
- * @param execution The flow's execution instance.
- */
- public void initProcessVariables(Execution execution) {
- execution.setVariable('prefix', 'UAAIVfMod_')
- execution.setVariable('UAAIVfMod_vnfId', null)
- execution.setVariable('UAAIVfMod_vfModuleId', null)
- execution.setVariable('UAAIVfMod_orchestrationStatus', null)
- execution.setVariable('UAAIVfMod_heatStackId', null)
- execution.setVariable('UAAIVfMod_volumeGroupId', null)
- execution.setVariable('UAAIVfMod_getVfModuleResponseCode' ,null)
- execution.setVariable('UAAIVfMod_getVfModuleResponse', '')
- execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', null)
- execution.setVariable('UAAIVfMod_updateVfModuleResponse', '')
- }
-
- /**
- * Check for missing elements in the received request.
- *
- * @param execution The flow's execution instance.
- */
- public void preProcessRequest(Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def xml = execution.getVariable('UpdateAAIVfModuleRequest')
- logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
- initProcessVariables(execution)
-
- def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
- execution.setVariable('UAAIVfMod_vnfId', vnfId)
-
- def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
- execution.setVariable('UAAIVfMod_vfModuleId', vfModuleId)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
- }
- }
-
- /**
- * Using the received vnfId and vfModuleId, query AAI to get the corresponding VF Module.
- * A 200 response is expected with the VF Module in the response body.
- *
- * @param execution The flow's execution instance.
- */
- public void getVfModule(Execution execution) {
- def method = getClass().getSimpleName() + '.getVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('UAAIVfMod_vnfId')
- def vfModuleId = execution.getVariable('UAAIVfMod_vfModuleId')
-
- // Construct endpoint
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
- String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + UriUtils.encode(vfModuleId, "UTF-8")
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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');
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
- APIResponse response = client.httpGet()
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable('UAAIVfMod_getVfModuleResponseCode', response.getStatusCode())
- execution.setVariable('UAAIVfMod_getVfModuleResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
- execution.setVariable('UAAIVfMod_getVfModuleResponseCode', 500)
- execution.setVariable('UAAIVfMod_getVfModuleResponse', 'AAI GET Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in getVfModule(): ' + e.getMessage())
- }
- }
-
- /**
- * Construct and send a PUT request to AAI to update the VF Module.
- *
- * @param execution The flow's execution instance.
- */
- public void updateVfModule(Execution execution) {
- def method = getClass().getSimpleName() + '.updateVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('UAAIVfMod_vnfId')
- def vfModuleId = execution.getVariable('UAAIVfMod_vfModuleId')
- def vfModule = execution.getVariable('UAAIVfMod_getVfModuleResponse')
- def origRequest = execution.getVariable('UpdateAAIVfModuleRequest')
- def Node vfModuleNode = xmlParser.parseText(vfModule)
-
- // Confirm resource-version is in retrieved VF Module
- if (utils.getChildNode(vfModuleNode, 'resource-version') == null) {
- def msg = 'Can\'t update VF Module ' + vfModuleId + ' since \'resource-version\' is missing'
- logError(msg)
- throw new Exception(msg)
- }
-
- // TEMPORARY!!! Disable Volume Group Check
- // Check volume-group-id conditions
- //def checkVgiResult = checkVolumeGroupId(origRequest, vfModuleNode, isDebugLogEnabled)
- //if (checkVgiResult != null) {
- // def msg = 'Can\'t update VF Module ' + vfModuleId + ': ' + checkVgiResult
- // logError(msg)
- // throw new Exception(msg)
- //}
-
- // Handle persona-model-id/persona-model-version
- def boolean doPersonaModelVersion = true
- def String newPersonaModelId = utils.getNodeText1(origRequest, 'persona-model-id')
- def String newPersonaModelVersion = utils.getNodeText1(origRequest, 'persona-model-version')
- if ((newPersonaModelId == null) || (newPersonaModelVersion == null)) {
- doPersonaModelVersion = false
- } else {
- // Confirm "new" persona-model-id is same as "current" persona-model-id
- def String currPersonaModelId = utils.getChildNodeText(vfModuleNode, 'persona-model-id')
- if (currPersonaModelId == null) {
- currPersonaModelId = ''
- }
- if (!newPersonaModelId.equals(currPersonaModelId)) {
- def msg = 'Can\'t update VF Module ' + vfModuleId + ' since there is \'persona-model-id\' mismatch between the current and new values'
- logError(msg)
- throw new Exception(msg)
- }
- }
-
- // Construct payload
- updateVfModuleNode(origRequest, vfModuleNode, 'orchestration-status')
- updateVfModuleNode(origRequest, vfModuleNode, 'heat-stack-id')
- if (doPersonaModelVersion) {
- updateVfModuleNode(origRequest, vfModuleNode, 'persona-model-version')
- }
- updateVfModuleNode(origRequest, vfModuleNode, 'contrail-service-instance-fqdn')
- def payload = utils.nodeToString(vfModuleNode)
-
- // Construct endpoint
- AaiUtil aaiUriUtil = new AaiUtil(this)
- def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
- String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + UriUtils.encode(vfModuleId, "UTF-8")
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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');
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
- APIResponse response = client.httpPut(payload)
-
- responseData = response.getResponseBodyAsString()
- execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', response.getStatusCode())
- execution.setVariable('UAAIVfMod_updateVfModuleResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(),isDebugLogEnabled)
- execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', 500)
- execution.setVariable('UAAIVfMod_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
- }
- }
-
- /**
- * Insert a new Node, replace the value of an existing Node, or delete an existing Node in the current
- * VF Module Node, as necessary.
- *
- * If the Node with the same name already exists in current VF Module, but is not being updated, then do
- * nothing. If the element is being updated and it already exists in the current VF Module, then check
- * the value specified in the original request. If the value is 'DELETE', remove that Node from the
- * current VF Module. Otherwise, change the value to the specified new value. If the element is
- * being updated but doesn't exist in the current VF Module, and the new value is not 'DELETE', then
- * create an appropriate new node and add it to the VF Module.
- *
- * @param origRequest Incoming update request with VF Module elements to be updated.
- * @param vfModule Current VF Module retrieved from AAI.
- * @param element Name of element to be inserted.
- */
- private void updateVfModuleNode(String origRequest, Node vfModuleNode, String elementName) {
-
- if (!utils.nodeExists(origRequest, elementName)) {
- return
- }
- def elementValue = utils.getNodeText(origRequest, elementName)
-
- def Node childNode = utils.getChildNode(vfModuleNode, elementName)
- if (childNode == null) {
- if (elementValue.equals('DELETE')) {
- // Element doesn't exist but is being deleted, so do nothing
- return
- }
- // Node doesn't exist, create a new Node as a child
- new Node(vfModuleNode, elementName, elementValue)
- } else {
- if (elementValue.equals('DELETE')) {
- // Node exists, but should be deleted
- vfModuleNode.remove(childNode)
- } else {
- // Node already exists, just give it a new value
- childNode.setValue(elementValue)
- }
- }
- }
-
- /**
- * Check the Volume Group ID from the incoming update request against the Volume Group ID from the
- * given VF Module. If they are equal or if they are both 'null', then that is acceptable and 'null'
- * is returned. Otherwise a message describing how the values are unacceptable/incompatible is returned.
- *
- * @param origRequest Incoming update request with VF Module elements to be updated.
- * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
- * @param isDebugLogEnabled Is DEBUG log enabled?
- * @return 'null' if the Volume Group IDs are acceptable. Otherwise return a message describing how the
- * values are unacceptable/incompatible.
- */
- private String checkVolumeGroupId(String origRequest, Node vfModuleNode, String isDebugLogEnabled) {
- def requestVolumeGroupId = utils.getNodeText1(origRequest, 'volume-group-id')
- def currVolumeGroupId = getCurrVolumeGroupId(vfModuleNode)
-
- logDebug('Check volume-group-id: volume-group-id in original request is \'' + requestVolumeGroupId +
- '\', volume-group-id from VF Module is \'' + currVolumeGroupId + '\'', isDebugLogEnabled)
-
- def result = null
-
- if (requestVolumeGroupId == null) {
- if (currVolumeGroupId == null) {
- // This is OK
- } else {
- result = 'Cannot detach a volume group from an existing VF Module'
- }
- } else {
- if (currVolumeGroupId == null) {
- result = 'Cannot add a volume gruop to an existing VF Module'
- } else {
- if (!requestVolumeGroupId.equals(currVolumeGroupId)) {
- result = 'Cannot change the volume group on an existing VF Module'
- }
- }
- }
-
- return result
- }
-
- /**
- * Find and return the value of the Volume Group ID for the specified VF Module. If
- * the value of the Volume Group ID cannot be found for any reason, 'null' is returned.
- *
- * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
- * @return the value of the Volume Group ID for the specified VF Module. If the
- * value of the Volume Group ID cannot be found for any reason, 'null' is returned.
- */
- private String getCurrVolumeGroupId(Node vfModuleNode) {
- def Node relationshipList = utils.getChildNode(vfModuleNode, 'relationship-list')
- if (relationshipList == null) {
- return null
- }
- def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
- for (Node relationshipNode in relationships) {
- def String relatedTo = utils.getChildNodeText(relationshipNode, 'related-to')
- if ((relatedTo != null) && relatedTo.equals('volume-group')) {
- def NodeList relationshipDataList = utils.getIdenticalChildren(relationshipNode, 'relationship-data')
- for (Node relationshipDataNode in relationshipDataList) {
- def String relationshipKey = utils.getChildNodeText(relationshipDataNode, 'relationship-key')
- if ((relationshipKey != null) && relationshipKey.equals('volume-group.volume-group-id')) {
- return utils.getChildNodeText(relationshipDataNode, 'relationship-value')
- }
- }
- }
- }
- return null
- }
-
- /**
- * Generates a WorkflowException if the AAI query returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleAAIQueryFailure(Execution execution) {
- def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to query AAI, Response Code ' +
- execution.getVariable('UAAIVfMod_getVfModuleResponseCode') + ', Error Response ' +
- execution.getVariable('UAAIVfMod_getVfModuleResponse'))
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable('UAAIVfMod_getVfModuleResponse'))
- execution.setVariable('WorkflowException', exception)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-
- /**
- * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
- *
- * @param execution The flow's execution instance.
- */
- public void handleUpdateVfModuleFailure(Execution execution) {
- def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
- execution.getVariable('UAAIVfMod_updateVfModuleResponseCode') + ', Error Response ' +
- execution.getVariable('UAAIVfMod_updateVfModuleResponse'))
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable('UAAIVfMod_updateVfModuleResponse'))
- execution.setVariable('WorkflowException', exception)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+
+public class UpdateAAIVfModule extends AbstractServiceTaskProcessor {
+
+ private XmlParser xmlParser = new XmlParser()
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution execution) {
+ execution.setVariable('prefix', 'UAAIVfMod_')
+ execution.setVariable('UAAIVfMod_vnfId', null)
+ execution.setVariable('UAAIVfMod_vfModuleId', null)
+ execution.setVariable('UAAIVfMod_orchestrationStatus', null)
+ execution.setVariable('UAAIVfMod_heatStackId', null)
+ execution.setVariable('UAAIVfMod_volumeGroupId', null)
+ execution.setVariable('UAAIVfMod_getVfModuleResponseCode' ,null)
+ execution.setVariable('UAAIVfMod_getVfModuleResponse', '')
+ execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', null)
+ execution.setVariable('UAAIVfMod_updateVfModuleResponse', '')
+ }
+
+ /**
+ * Check for missing elements in the received request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def xml = execution.getVariable('UpdateAAIVfModuleRequest')
+ logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+ utils.logAudit("UpdateAAIVfModule Request XML: " + xml)
+ initProcessVariables(execution)
+
+ def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+ execution.setVariable('UAAIVfMod_vnfId', vnfId)
+
+ def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
+ execution.setVariable('UAAIVfMod_vfModuleId', vfModuleId)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Using the received vnfId and vfModuleId, query AAI to get the corresponding VF Module.
+ * A 200 response is expected with the VF Module in the response body.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void getVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('UAAIVfMod_vnfId')
+ def vfModuleId = execution.getVariable('UAAIVfMod_vfModuleId')
+
+ // Construct endpoint
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + UriUtils.encode(vfModuleId, "UTF-8")
+
+ try {
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ utils.logAudit("UpdateAAIVfModule sending GET to AAI endpoint: " + endPoint)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+ def responseData = response.getResponseBodyAsString()
+ execution.setVariable('UAAIVfMod_getVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('UAAIVfMod_getVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ utils.logAudit("UpdateAAIVfModule response data: " + responseData)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ execution.setVariable('UAAIVfMod_getVfModuleResponseCode', 500)
+ execution.setVariable('UAAIVfMod_getVfModuleResponse', 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Construct and send a PUT request to AAI to update the VF Module.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void updateVfModule(Execution execution) {
+ def method = getClass().getSimpleName() + '.updateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('UAAIVfMod_vnfId')
+ def vfModuleId = execution.getVariable('UAAIVfMod_vfModuleId')
+ def vfModule = execution.getVariable('UAAIVfMod_getVfModuleResponse')
+ def origRequest = execution.getVariable('UpdateAAIVfModuleRequest')
+ def Node vfModuleNode = xmlParser.parseText(vfModule)
+
+ utils.logAudit("UpdateAAIVfModule request: " + origRequest)
+ // Confirm resource-version is in retrieved VF Module
+ if (utils.getChildNode(vfModuleNode, 'resource-version') == null) {
+ def msg = 'Can\'t update VF Module ' + vfModuleId + ' since \'resource-version\' is missing'
+ logError(msg)
+ throw new Exception(msg)
+ }
+
+ // TEMPORARY!!! Disable Volume Group Check
+ // Check volume-group-id conditions
+ //def checkVgiResult = checkVolumeGroupId(origRequest, vfModuleNode, isDebugLogEnabled)
+ //if (checkVgiResult != null) {
+ // def msg = 'Can\'t update VF Module ' + vfModuleId + ': ' + checkVgiResult
+ // logError(msg)
+ // throw new Exception(msg)
+ //}
+
+ // Handle persona-model-id/persona-model-version
+ def boolean doPersonaModelVersion = true
+ def String newPersonaModelId = utils.getNodeText1(origRequest, 'persona-model-id')
+ def String newPersonaModelVersion = utils.getNodeText1(origRequest, 'persona-model-version')
+ if ((newPersonaModelId == null) || (newPersonaModelVersion == null)) {
+ doPersonaModelVersion = false
+ } else {
+ // Confirm "new" persona-model-id is same as "current" persona-model-id
+ def String currPersonaModelId = utils.getChildNodeText(vfModuleNode, 'persona-model-id')
+ if (currPersonaModelId == null) {
+ currPersonaModelId = ''
+ }
+ if (!newPersonaModelId.equals(currPersonaModelId)) {
+ def msg = 'Can\'t update VF Module ' + vfModuleId + ' since there is \'persona-model-id\' mismatch between the current and new values'
+ logError(msg)
+ throw new Exception(msg)
+ }
+ }
+
+ // Construct payload
+ String orchestrationStatusEntry = updateVfModuleNode(origRequest, vfModuleNode, 'orchestration-status')
+ String heatStackIdEntry = updateVfModuleNode(origRequest, vfModuleNode, 'heat-stack-id')
+ String personaModelVersionEntry = ""
+ if (doPersonaModelVersion) {
+ personaModelVersionEntry = updateVfModuleNode(origRequest, vfModuleNode, 'persona-model-version')
+ }
+ String contrailServiceInstanceFqdnEntry = updateVfModuleNode(origRequest, vfModuleNode, 'contrail-service-instance-fqdn')
+ def payload = """
+ { ${orchestrationStatusEntry}
+ ${heatStackIdEntry}
+ ${personaModelVersionEntry}
+ ${contrailServiceInstanceFqdnEntry}
+ "vf-module-id": "${vfModuleId}"
+ }
+ """
+
+
+ // Construct endpoint
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+ String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + UriUtils.encode(vfModuleId, "UTF-8")
+
+ try {
+ logDebug('sending PATCH to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+ utils.logAudit("Sending PATCH to AAI endpoint: " + endPoint)
+
+ APIResponse response = aaiUriUtil.executeAAIPatchCall(execution, endPoint, payload)
+ def responseData = response.getResponseBodyAsString()
+ execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('UAAIVfMod_updateVfModuleResponse', responseData)
+ utils.logAudit("UpdateAAIVfModule Response data: " + responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI PATCH:' + ex.getMessage(),isDebugLogEnabled)
+ execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', 500)
+ execution.setVariable('UAAIVfMod_updateVfModuleResponse', 'AAI PATCH Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Sets up json attributes for PATCH request for Update
+ *
+ * @param origRequest Incoming update request with VF Module elements to be updated.
+ * @param vfModule Current VF Module retrieved from AAI.
+ * @param element Name of element to be inserted.
+ */
+ private String updateVfModuleNode(String origRequest, Node vfModuleNode, String elementName) {
+
+ if (!utils.nodeExists(origRequest, elementName)) {
+ return ""
+ }
+ def elementValue = utils.getNodeText(origRequest, elementName)
+
+ if (elementValue.equals('DELETE')) {
+ // Set the element being deleted to null
+ return """"${elementName}": null,"""
+ }
+ else {
+ return """"${elementName}": "${elementValue}","""
+ }
+ }
+
+
+ /**
+ * Check the Volume Group ID from the incoming update request against the Volume Group ID from the
+ * given VF Module. If they are equal or if they are both 'null', then that is acceptable and 'null'
+ * is returned. Otherwise a message describing how the values are unacceptable/incompatible is returned.
+ *
+ * @param origRequest Incoming update request with VF Module elements to be updated.
+ * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
+ * @param isDebugLogEnabled Is DEBUG log enabled?
+ * @return 'null' if the Volume Group IDs are acceptable. Otherwise return a message describing how the
+ * values are unacceptable/incompatible.
+ */
+ private String checkVolumeGroupId(String origRequest, Node vfModuleNode, String isDebugLogEnabled) {
+ def requestVolumeGroupId = utils.getNodeText1(origRequest, 'volume-group-id')
+ def currVolumeGroupId = getCurrVolumeGroupId(vfModuleNode)
+
+ logDebug('Check volume-group-id: volume-group-id in original request is \'' + requestVolumeGroupId +
+ '\', volume-group-id from VF Module is \'' + currVolumeGroupId + '\'', isDebugLogEnabled)
+
+ def result = null
+
+ if (requestVolumeGroupId == null) {
+ if (currVolumeGroupId == null) {
+ // This is OK
+ } else {
+ result = 'Cannot detach a volume group from an existing VF Module'
+ }
+ } else {
+ if (currVolumeGroupId == null) {
+ result = 'Cannot add a volume gruop to an existing VF Module'
+ } else {
+ if (!requestVolumeGroupId.equals(currVolumeGroupId)) {
+ result = 'Cannot change the volume group on an existing VF Module'
+ }
+ }
+ }
+
+ return result
+ }
+
+ /**
+ * Find and return the value of the Volume Group ID for the specified VF Module. If
+ * the value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+ *
+ * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
+ * @return the value of the Volume Group ID for the specified VF Module. If the
+ * value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+ */
+ private String getCurrVolumeGroupId(Node vfModuleNode) {
+ def Node relationshipList = utils.getChildNode(vfModuleNode, 'relationship-list')
+ if (relationshipList == null) {
+ return null
+ }
+ def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (Node relationshipNode in relationships) {
+ def String relatedTo = utils.getChildNodeText(relationshipNode, 'related-to')
+ if ((relatedTo != null) && relatedTo.equals('volume-group')) {
+ def NodeList relationshipDataList = utils.getIdenticalChildren(relationshipNode, 'relationship-data')
+ for (Node relationshipDataNode in relationshipDataList) {
+ def String relationshipKey = utils.getChildNodeText(relationshipDataNode, 'relationship-key')
+ if ((relationshipKey != null) && relationshipKey.equals('volume-group.volume-group-id')) {
+ return utils.getChildNodeText(relationshipDataNode, 'relationship-value')
+ }
+ }
+ }
+ }
+ return null
+ }
+
+ /**
+ * Generates a WorkflowException if the AAI query returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleAAIQueryFailure(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to query AAI, Response Code ' +
+ execution.getVariable('UAAIVfMod_getVfModuleResponseCode') + ', Error Response ' +
+ execution.getVariable('UAAIVfMod_getVfModuleResponse'))
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable('UAAIVfMod_getVfModuleResponse'))
+ execution.setVariable('WorkflowException', exception)
+ utils.logAudit("UpdateAAIVfModule query failure: " + exception.getErrorMessage())
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+
+ /**
+ * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void handleUpdateVfModuleFailure(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
+ execution.getVariable('UAAIVfMod_updateVfModuleResponseCode') + ', Error Response ' +
+ execution.getVariable('UAAIVfMod_updateVfModuleResponse'))
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable('UAAIVfMod_updateVfModuleResponse'))
+ execution.setVariable('WorkflowException', exception)
+
+ utils.logAudit("UpdateAAIVfModule failure: " + exception.getErrorMessage())
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VfModule.groovy
index 98452810eb..f45d779139 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VfModule.groovy
@@ -1,95 +1,87 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import groovy.util.Node;
-
-import java.util.concurrent.ExecutionException;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-public class VfModule implements Serializable {
-
- /**
- * Class representing a VF Module Node. Fields of this class include indicators
- * as to whether the VF Module is the only VF Module in its containing Generic VNF
- * and whether the VF Module is the base VF Module in its containing Generic VNF.
- */
-
- private Node node
- private Boolean onlyVfModule
- private Boolean baseVfModule
-
- /**
- * Constructor.
- *
- * @param node Node representing the VF Module xml.
- * @param onlyVfModule Is this VF Module the only VF Module in its containing Generic VNF?
- */
- public VfModule(Node node, boolean onlyVfModule) {
- this.node = node
- this.onlyVfModule = onlyVfModule
- this.baseVfModule = getElementText('is-base-vf-module').equals('true')
- }
-
- /**
- * Get the Node representing the VF Module xml.
- *
- * @return the Node representing the VF Module xml.
- */
- public Node getNode() {
- return node
- }
-
- public String getElementText(String childNodeName) {
- def Node childNode = (new MsoUtils()).getChildNode(node, childNodeName)
- if (childNode == null) {
- return ''
- } else {
- return childNode.text()
- }
- }
-
- /**
- * Is this VF Module the only VF Module in its containing Generic VNF?
- *
- * @return true if this VF Module is the only VF Module in its containing Generic VNF;
- * false otherwise.
- */
- public boolean isOnlyVfModule() {
- return onlyVfModule
- }
-
- /**
- * Is this VF Module the base VF Module in its containing Generic VNF?
- *
- * @return true if this VF Module is the base VF Module in its containing Generic VNF;
- * false otherwise.
- */
- public boolean isBaseVfModule() {
- return baseVfModule
- }
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import org.apache.commons.lang3.*
+
+public class VfModule implements Serializable {
+
+ /**
+ * Class representing a VF Module Node. Fields of this class include indicators
+ * as to whether the VF Module is the only VF Module in its containing Generic VNF
+ * and whether the VF Module is the base VF Module in its containing Generic VNF.
+ */
+
+ private Node node
+ private Boolean onlyVfModule
+ private Boolean baseVfModule
+
+ /**
+ * Constructor.
+ *
+ * @param node Node representing the VF Module xml.
+ * @param onlyVfModule Is this VF Module the only VF Module in its containing Generic VNF?
+ */
+ public VfModule(Node node, boolean onlyVfModule) {
+ this.node = node
+ this.onlyVfModule = onlyVfModule
+ this.baseVfModule = getElementText('is-base-vf-module').equals('true')
+ }
+
+ /**
+ * Get the Node representing the VF Module xml.
+ *
+ * @return the Node representing the VF Module xml.
+ */
+ public Node getNode() {
+ return node
+ }
+
+ public String getElementText(String childNodeName) {
+ def Node childNode = (new MsoUtils()).getChildNode(node, childNodeName)
+ if (childNode == null) {
+ return ''
+ } else {
+ return childNode.text()
+ }
+ }
+
+ /**
+ * Is this VF Module the only VF Module in its containing Generic VNF?
+ *
+ * @return true if this VF Module is the only VF Module in its containing Generic VNF;
+ * false otherwise.
+ */
+ public boolean isOnlyVfModule() {
+ return onlyVfModule
+ }
+
+ /**
+ * Is this VF Module the base VF Module in its containing Generic VNF?
+ *
+ * @return true if this VF Module is the base VF Module in its containing Generic VNF;
+ * false otherwise.
+ */
+ public boolean isBaseVfModule() {
+ return baseVfModule
+ }
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VfModuleBase.groovy
index ba920cec72..d48ae8f84e 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VfModuleBase.groovy
@@ -1,586 +1,998 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-//import groovy.util.Node;
-
-import java.util.concurrent.ExecutionException;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-
-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 org.openecomp.mso.bpmn.core.WorkflowException
-
-
-public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
-
- protected XmlParser xmlParser = new XmlParser()
-
- /**
- * Get the XmlParser.
- *
- * @return the XmlParser.
- */
- protected XmlParser getXmlParser() {
- return xmlParser
- }
-
- /**
- * Find the VF Module with specified ID in the specified Generic VF. If no such
- * VF Module is found, null is returned.
- *
- * @param genericVnf The Generic VNF in which to search for the specified VF Moduel.
- * @param vfModuleId The ID of the VF Module for which to search.
- * @return a VFModule object for the found VF Module or null if no VF Module is found.
- */
- protected VfModule findVfModule(String genericVnf, String vfModuleId) {
-
- def genericVnfNode = xmlParser.parseText(genericVnf)
- def vfModulesNode = utils.getChildNode(genericVnfNode, 'vf-modules')
- if (vfModulesNode == null) {
- return null
- }
- def vfModuleList = utils.getIdenticalChildren(vfModulesNode, 'vf-module')
- for (vfModuleNode in vfModuleList) {
- def vfModuleIdNode = utils.getChildNode(vfModuleNode, 'vf-module-id')
- if ((vfModuleIdNode != null) && (vfModuleIdNode.text().equals(vfModuleId))) {
- return new VfModule(vfModuleNode, (vfModuleList.size() == 1))
- }
- }
- return null
- }
-
- /**
- * Transform all '*_network' parameter specifications from the incoming '*-params' root
- * element to a corresponding list of 'vnf-networks' specifications (typically used when
- * invoking the VNF Rest Adpater). Each element in '*-params' whose name attribute ends
- * with '_network' is used to create an 'vnf-networks' element.
- *
- * @param paramsNode A Node representing a '*-params' element.
- * @return a String of 'vnf-networks' elements, one for each 'param' element whose name
- * attribute ends with '_network'.
- */
- protected String transformNetworkParamsToVnfNetworks(String paramsRootXml) {
- if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
- return ''
- }
- def String vnfNetworks = ''
- try {
- paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
- def paramsNode = xmlParser.parseText(paramsRootXml)
- def params = utils.getIdenticalChildren(paramsNode, 'param')
- for (param in params) {
- def String attrName = (String) param.attribute('name')
- if (attrName.endsWith('_network')) {
- def networkRole = attrName.substring(0, (attrName.length()-'_network'.length()))
- def networkName = param.text()
- String vnfNetwork = """
- <vnf-networks>
- <network-role>${networkRole}</network-role>
- <network-name>${networkName}</network-name>
- </vnf-networks>
- """
- vnfNetworks = vnfNetworks + vnfNetwork
- }
- }
- } catch (Exception e) {
- logWarn('Exception transforming \'_network\' params to vnfNetworks', e)
- }
- return vnfNetworks
- }
-
- /**
- * Transform the parameter specifications from the incoming '*-params' root element to
- * a corresponding list of 'entry's (typically used when invoking the VNF Rest Adpater).
- * Each element in '*-params' is used to create an 'entry' element.
- *
- * @param paramsNode A Node representing a '*-params' element.
- * @return a String of 'entry' elements, one for each 'param' element.
- */
- protected String transformParamsToEntries(String paramsRootXml) {
- if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
- return ''
- }
- def String entries = ''
- try {
- paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
- def paramsNode = xmlParser.parseText(paramsRootXml)
- def params = utils.getIdenticalChildren(paramsNode, 'param')
- for (param in params) {
- def key = (String) param.attribute('name')
- if (key == null) {
- key = ''
- }
- def value = (String) param.text()
- String entry = """
- <entry>
- <key>${key}</key>
- <value>${value}</value>
- </entry>
- """
- entries = entries + entry
- }
- } catch (Exception e) {
- logWarn('Exception transforming params to entries', e)
- }
- return entries
- }
-
- /**
- * Transform the parameter specifications from the incoming '*-params' root element to
- * a corresponding list of 'entry's (typically used when invoking the VNF Rest Adpater).
- * Each element in '*-params' is used to create an 'entry' element.
- *
- * @param paramsNode A Node representing a '*-params' element.
- * @return a String of 'entry' elements, one for each 'param' element.
- */
- protected String transformVolumeParamsToEntries(String paramsRootXml) {
- if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
- return ''
- }
- def String entries = ''
- try {
- paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
- def paramsNode = xmlParser.parseText(paramsRootXml)
- def params = utils.getIdenticalChildren(paramsNode, 'param')
- for (param in params) {
- def key = (String) param.attribute('name')
- if (key == null) {
- key = ''
- }
- if ( !(key in ['vnf_id', 'vnf_name', 'vf_module_id', 'vf_module_name'])) {
- def value = (String) param.text()
- String entry = """
- <entry>
- <key>${key}</key>
- <value>${value}</value>
- </entry>
- """
- entries = entries + entry
- }
- }
- } catch (Exception e) {
- logWarn('Exception transforming params to entries', e)
- }
- return entries
- }
-
- /**
- * 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.
- */
- protected String getTenantIdFromVolumeGroup(String volumeGroupXml) {
- def groovy.util.Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
- def groovy.util.Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
- if (relationshipList != null) {
- def groovy.util.NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
- for (groovy.util.Node relationship in relationships) {
- def groovy.util.Node relatedTo = utils.getChildNode(relationship, 'related-to')
- if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
- def groovy.util.NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
- for (groovy.util.Node relationshipData in relationshipDataList) {
- def groovy.util.Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
- if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
- def groovy.util.Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
- if (relationshipValue != null) {
- return relationshipValue.text()
- }
- }
- }
- }
- }
- }
- return null
- }
-
-
- /*
- * Parses VNF parameters passed in on the incoming requests and SDNC parameters returned from SDNC get response
- * and puts them into the format expected by VNF adapter.
- * @param vnfParamsMap - map of VNF parameters passed in the request body
- * @param sdncGetResponse - response string from SDNC GET topology request
- * @param vnfId
- * @param vnfName
- * @param vfModuleId
- * @param vfModuleName
- * @return a String of key/value entries for vfModuleParams
- */
-
-
- protected String buildVfModuleParams(String vnfParams, String sdncGetResponse, String vnfId, String vnfName,
- String vfModuleId, String vfModuleName) {
-
- //Get SDNC Response Data
-
- String data = utils.getNodeXml(sdncGetResponse, "response-data")
- data = data.replaceAll("&lt;", "<")
- data = data.replaceAll("&gt;", ">")
-
- String serviceData = utils.getNodeXml(data, "service-data")
- serviceData = utils.removeXmlPreamble(serviceData)
- serviceData = utils.removeXmlNamespaces(serviceData)
- String vnfRequestInfo = utils.getNodeXml(serviceData, "vnf-request-information")
- String oldVnfId = utils.getNodeXml(vnfRequestInfo, "vnf-id")
- oldVnfId = utils.removeXmlPreamble(oldVnfId)
- oldVnfId = utils.removeXmlNamespaces(oldVnfId)
- serviceData = serviceData.replace(oldVnfId, "")
- def vnfId1 = utils.getNodeText1(serviceData, "vnf-id")
-
- // Add-on data
- String vnfInfo =
- """<entry>
- <key>vnf_id</key>
- <value>${vnfId}</value>
- </entry>
- <entry>
- <key>vnf_name</key>
- <value>${vnfName}</value>
- </entry>
- <entry>
- <key>vf_module_id</key>
- <value>${vfModuleId}</value>
- </entry>
- <entry>
- <key>vf_module_name</key>
- <value>${vfModuleName}</value>
- </entry>"""
-
- utils.logAudit("vnfInfo: " + vnfInfo)
- InputSource source = new InputSource(new StringReader(data));
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- docFactory.setNamespaceAware(true)
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
- Document responseXml = docBuilder.parse(source)
-
-
- // Availability Zones Data
- String aZones = ""
- StringBuilder sbAZone = new StringBuilder()
- NodeList aZonesList = responseXml.getElementsByTagNameNS("*", "availability-zones")
- String aZonePosition = "0"
- for (int z = 0; z < aZonesList.getLength(); z++) {
- Node node = aZonesList.item(z)
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- String aZoneValue = utils.getElementText(eElement, "availability-zone")
- aZonePosition = z.toString()
- String aZoneXml =
- """<entry>
- <key>availability_zone_${aZonePosition}</key>
- <value>${aZoneValue}</value>
- </entry>"""
- aZones = sbAZone.append(aZoneXml)
- }
- }
-
- // VNF Networks Data
- String vnfNetworkNetId = ""
- String vnfNetworkNetName = ""
- String vnfNetworkSubNetId = ""
- String vnfNetworkV6SubNetId = ""
- String vnfNetworkNetFqdn = ""
- StringBuilder sbNet = new StringBuilder()
- StringBuilder sbNet2 = new StringBuilder()
- StringBuilder sbNet3 = new StringBuilder()
- StringBuilder sbNet4 = new StringBuilder()
- StringBuilder sbNet5 = new StringBuilder()
- NodeList vnfNetworkList = responseXml.getElementsByTagNameNS("*", "vnf-networks")
- for (int x = 0; x < vnfNetworkList.getLength(); x++) {
- Node node = vnfNetworkList.item(x)
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- String vnfNetworkKey = utils.getElementText(eElement, "network-role")
- String vnfNetworkNeutronIdValue = utils.getElementText(eElement, "neutron-id")
- String vnfNetworkNetNameValue = utils.getElementText(eElement, "network-name")
- String vnfNetworkSubNetIdValue = utils.getElementText(eElement, "subnet-id")
- String vnfNetworkV6SubNetIdValue = utils.getElementText(eElement, "ipv6-subnet-id")
- String vnfNetworkNetFqdnValue = utils.getElementText(eElement, "contrail-network-fqdn")
- String vnfNetworkNetIdXml =
- """<entry>
- <key>${vnfNetworkKey}_net_id</key>
- <value>${vnfNetworkNeutronIdValue}</value>
- </entry>"""
- vnfNetworkNetId = sbNet.append(vnfNetworkNetIdXml)
- String vnfNetworkNetNameXml =
- """<entry>
- <key>${vnfNetworkKey}_net_name</key>
- <value>${vnfNetworkNetNameValue}</value>
- </entry>"""
- vnfNetworkNetName = sbNet2.append(vnfNetworkNetNameXml)
- String vnfNetworkSubNetIdXml =
- """<entry>
- <key>${vnfNetworkKey}_subnet_id</key>
- <value>${vnfNetworkSubNetIdValue}</value>
- </entry>"""
- vnfNetworkSubNetId = sbNet3.append(vnfNetworkSubNetIdXml)
- String vnfNetworkV6SubNetIdXml =
- """<entry>
- <key>${vnfNetworkKey}_v6_subnet_id</key>
- <value>${vnfNetworkV6SubNetIdValue}</value>
- </entry>"""
- vnfNetworkV6SubNetId = sbNet5.append(vnfNetworkV6SubNetIdXml)
- String vnfNetworkNetFqdnXml =
- """<entry>
- <key>${vnfNetworkKey}_net_fqdn</key>
- <value>${vnfNetworkNetFqdnValue}</value>
- </entry>"""
- vnfNetworkNetFqdn = sbNet4.append(vnfNetworkNetFqdnXml)
- }
- }
-
- // VNF-VMS Data
- String vnfVMS = ""
- String vnfVMSPositions = ""
- String vmNetworks = ""
- String vmNetworksPositions = ""
- String vmNetworksPositionsV6 = ""
- String interfaceRoutePrefixes = ""
- def key
- def value
- def networkKey
- def networkValue
- def floatingIPKey
- def floatingIPKeyValue
- def floatingIPV6Key
- def floatingIPV6KeyValue
- StringBuilder sb = new StringBuilder()
- StringBuilder sbPositions = new StringBuilder()
- StringBuilder sbVmNetworks = new StringBuilder()
- StringBuilder sbNetworksPositions = new StringBuilder()
- StringBuilder sbInterfaceRoutePrefixes = new StringBuilder()
- StringBuilder sbNetworksPositionsV6 = new StringBuilder()
-
- NodeList vmsList = responseXml.getElementsByTagNameNS("*","vnf-vms")
- for (int x = 0; x < vmsList.getLength(); x++) {
- Node node = vmsList.item(x)
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- key = utils.getElementText(eElement, "vm-type")
- String values
- String position = "0"
- StringBuilder sb1 = new StringBuilder()
- NodeList valueList = eElement.getElementsByTagNameNS("*","vm-names")
- NodeList vmNetworksList = eElement.getElementsByTagNameNS("*","vm-networks")
- for(int i = 0; i < valueList.getLength(); i++){
- Node node1 = valueList.item(i)
- if (node1.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement1 = (Element) node1
- value = utils.getElementText(eElement1, "vm-name")
- if (i != valueList.getLength() - 1) {
- values = sb1.append(value + ",")
- }
- else {
- values = sb1.append(value);
- }
- position = i.toString()
- String vnfPositionXml =
- """<entry>
- <key>${key}_name_${position}</key>
- <value>${value}</value>
- </entry>"""
- vnfVMSPositions = sbPositions.append(vnfPositionXml)
- }
- }
- for(int n = 0; n < vmNetworksList.getLength(); n++){
- String floatingIpKeyValueStr = ""
- String floatingIpV6KeyValueStr = ""
- Node nodeNetworkKey = vmNetworksList.item(n)
- if (nodeNetworkKey.getNodeType() == Node.ELEMENT_NODE) {
- Element eElementNetworkKey = (Element) nodeNetworkKey
- String ipAddressValues
- String ipV6AddressValues
- String networkPosition = "0"
- StringBuilder sb2 = new StringBuilder()
- StringBuilder sb3 = new StringBuilder()
- StringBuilder sb4 = new StringBuilder()
- networkKey = utils.getElementText(eElementNetworkKey, "network-role")
- floatingIPKey = key + '_' + networkKey + '_floating_ip'
- floatingIPKeyValue = utils.getElementText(eElementNetworkKey, "floating-ip")
- if(!floatingIPKeyValue.isEmpty()){
- floatingIpKeyValueStr = """<entry>
- <key>$floatingIPKey</key>
- <value>$floatingIPKeyValue</value>
- </entry>"""
- }
- floatingIPV6Key = key + '_' + networkKey + '_floating_v6_ip'
- floatingIPV6KeyValue = utils.getElementText(eElementNetworkKey, "floating-ip-v6")
- if(!floatingIPV6KeyValue.isEmpty()){
- floatingIpV6KeyValueStr = """<entry>
- <key>$floatingIPV6Key</key>
- <value>$floatingIPV6KeyValue</value>
- </entry>"""
- }
- NodeList networkIpsList = eElementNetworkKey.getElementsByTagNameNS("*","network-ips")
- for(int a = 0; a < networkIpsList.getLength(); a++){
- Node ipAddress = networkIpsList.item(a)
- if (ipAddress.getNodeType() == Node.ELEMENT_NODE) {
- Element eElementIpAddress = (Element) ipAddress
- String ipAddressValue = utils.getElementText(eElementIpAddress, "ip-address")
- if (a != networkIpsList.getLength() - 1) {
- ipAddressValues = sb2.append(ipAddressValue + ",")
- }
- else {
- ipAddressValues = sb2.append(ipAddressValue);
- }
- networkPosition = a.toString()
- String vmNetworksPositionsXml =
- """<entry>
- <key>${key}_${networkKey}_ip_${networkPosition}</key>
- <value>${ipAddressValue}</value>
- </entry>"""
- vmNetworksPositions = sbNetworksPositions.append(vmNetworksPositionsXml)
- }
- }
- vmNetworksPositions = sbNetworksPositions.append(floatingIpKeyValueStr).append(floatingIpV6KeyValueStr)
-
- String vmNetworksXml =
- """<entry>
- <key>${key}_${networkKey}_ips</key>
- <value>${ipAddressValues}</value>
- </entry>"""
- vmNetworks = sbVmNetworks.append(vmNetworksXml)
-
- NodeList interfaceRoutePrefixesList = eElementNetworkKey.getElementsByTagNameNS("*","interface-route-prefixes")
- String interfaceRoutePrefixValues = sb3.append("[")
-
- for(int a = 0; a < interfaceRoutePrefixesList.getLength(); a++){
- Node interfaceRoutePrefix = interfaceRoutePrefixesList.item(a)
- if (interfaceRoutePrefix.getNodeType() == Node.ELEMENT_NODE) {
- Element eElementInterfaceRoutePrefix = (Element) interfaceRoutePrefix
- String interfaceRoutePrefixValue = utils.getElementText(eElementInterfaceRoutePrefix, "interface-route-prefix")
- if (a != interfaceRoutePrefixesList.getLength() - 1) {
- interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}" + ",")
- }
- else {
- interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}")
- }
- }
- }
- interfaceRoutePrefixValues = sb3.append("]")
- if (interfaceRoutePrefixesList.getLength() > 0) {
- String interfaceRoutePrefixesXml =
- """<entry>
- <key>${key}_${networkKey}_route_prefixes</key>
- <value>${interfaceRoutePrefixValues}</value>
- </entry>"""
- interfaceRoutePrefixes = sbInterfaceRoutePrefixes.append(interfaceRoutePrefixesXml)
- }
-
- NodeList networkIpsV6List = eElementNetworkKey.getElementsByTagNameNS("*","network-ips-v6")
- for(int a = 0; a < networkIpsV6List.getLength(); a++){
- Node ipV6Address = networkIpsV6List.item(a)
- if (ipV6Address.getNodeType() == Node.ELEMENT_NODE) {
- Element eElementIpV6Address = (Element) ipV6Address
- String ipV6AddressValue = utils.getElementText(eElementIpV6Address, "ip-address-ipv6")
- if (a != networkIpsV6List.getLength() - 1) {
- ipV6AddressValues = sb4.append(ipV6AddressValue + ",")
- }
- else {
- ipV6AddressValues = sb4.append(ipV6AddressValue);
- }
- networkPosition = a.toString()
- String vmNetworksPositionsV6Xml =
- """<entry>
- <key>${key}_${networkKey}_v6_ip_${networkPosition}</key>
- <value>${ipV6AddressValue}</value>
- </entry>"""
- vmNetworksPositionsV6 = sbNetworksPositionsV6.append(vmNetworksPositionsV6Xml)
- }
- }
- String vmNetworksV6Xml =
- """<entry>
- <key>${key}_${networkKey}_v6_ips</key>
- <value>${ipV6AddressValues}</value>
- </entry>"""
- vmNetworks = sbVmNetworks.append(vmNetworksV6Xml)
- }
- }
- String vnfXml =
- """<entry>
- <key>${key}_names</key>
- <value>${values}</value>
- </entry>"""
- vnfVMS = sb.append(vnfXml)
- }
- }
- //SDNC Response Params
- String sdncResponseParams = ""
- List<String> sdncResponseParamsToSkip = ["vnf_id", "vf_module_id", "vnf_name", "vf_module_name"]
- String vnfParamsChildNodes = utils.getChildNodes(data, "vnf-parameters")
- if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
- // No SDNC params
- }else{
- 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")
- if (!sdncResponseParamsToSkip.contains(vnfParameterName)) {
- String vnfParameterValue = utils.getElementText(eElement, "vnf-parameter-value")
- String paraEntry =
- """<entry>
- <key>${vnfParameterName}</key>
- <value>${vnfParameterValue}</value>
- </entry>"""
- sdncResponseParams = sb.append(paraEntry)
- }
- }
- }
-
-
- def vfModuleParams = """
- ${vnfInfo}
- ${aZones}
- ${vnfNetworkNetId}
- ${vnfNetworkNetName}
- ${vnfNetworkSubNetId}
- ${vnfNetworkV6SubNetId}
- ${vnfNetworkNetFqdn}
- ${vnfVMS}
- ${vnfVMSPositions}
- ${vmNetworks}
- ${vmNetworksPositions}
- ${vmNetworksPositionsV6}
- ${interfaceRoutePrefixes}
- ${vnfParams}
- ${sdncResponseParams}"""
-
- return vfModuleParams
-
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+//import groovy.util.Node;
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.runtime.Execution
+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
+
+
+public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
+
+ protected XmlParser xmlParser = new XmlParser()
+
+ /**
+ * Get the XmlParser.
+ *
+ * @return the XmlParser.
+ */
+ protected XmlParser getXmlParser() {
+ return xmlParser
+ }
+
+ /**
+ * Find the VF Module with specified ID in the specified Generic VF. If no such
+ * VF Module is found, null is returned.
+ *
+ * @param genericVnf The Generic VNF in which to search for the specified VF Moduel.
+ * @param vfModuleId The ID of the VF Module for which to search.
+ * @return a VFModule object for the found VF Module or null if no VF Module is found.
+ */
+ protected VfModule findVfModule(String genericVnf, String vfModuleId) {
+
+ def genericVnfNode = xmlParser.parseText(genericVnf)
+ def vfModulesNode = utils.getChildNode(genericVnfNode, 'vf-modules')
+ if (vfModulesNode == null) {
+ return null
+ }
+ def vfModuleList = utils.getIdenticalChildren(vfModulesNode, 'vf-module')
+ for (vfModuleNode in vfModuleList) {
+ def vfModuleIdNode = utils.getChildNode(vfModuleNode, 'vf-module-id')
+ if ((vfModuleIdNode != null) && (vfModuleIdNode.text().equals(vfModuleId))) {
+ return new VfModule(vfModuleNode, (vfModuleList.size() == 1))
+ }
+ }
+ return null
+ }
+
+ /**
+ * Transform all '*_network' parameter specifications from the incoming '*-params' root
+ * element to a corresponding list of 'vnf-networks' specifications (typically used when
+ * invoking the VNF Rest Adpater). Each element in '*-params' whose name attribute ends
+ * with '_network' is used to create an 'vnf-networks' element.
+ *
+ * @param paramsNode A Node representing a '*-params' element.
+ * @return a String of 'vnf-networks' elements, one for each 'param' element whose name
+ * attribute ends with '_network'.
+ */
+ protected String transformNetworkParamsToVnfNetworks(String paramsRootXml) {
+ if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
+ return ''
+ }
+ def String vnfNetworks = ''
+ try {
+ paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
+ def paramsNode = xmlParser.parseText(paramsRootXml)
+ def params = utils.getIdenticalChildren(paramsNode, 'param')
+ for (param in params) {
+ def String attrName = (String) param.attribute('name')
+ if (attrName.endsWith('_network')) {
+ def networkRole = attrName.substring(0, (attrName.length()-'_network'.length()))
+ def networkName = param.text()
+ String vnfNetwork = """
+ <vnf-networks>
+ <network-role>${networkRole}</network-role>
+ <network-name>${networkName}</network-name>
+ </vnf-networks>
+ """
+ vnfNetworks = vnfNetworks + vnfNetwork
+ }
+ }
+ } catch (Exception e) {
+ logWarn('Exception transforming \'_network\' params to vnfNetworks', e)
+ }
+ return vnfNetworks
+ }
+
+ /**
+ * Transform the parameter specifications from the incoming '*-params' root element to
+ * a corresponding list of 'entry's (typically used when invoking the VNF Rest Adpater).
+ * Each element in '*-params' is used to create an 'entry' element.
+ *
+ * @param paramsNode A Node representing a '*-params' element.
+ * @return a String of 'entry' elements, one for each 'param' element.
+ */
+ protected String transformParamsToEntries(String paramsRootXml) {
+ if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
+ return ''
+ }
+ def String entries = ''
+ try {
+ paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
+ def paramsNode = xmlParser.parseText(paramsRootXml)
+ def params = utils.getIdenticalChildren(paramsNode, 'param')
+ for (param in params) {
+ def key = (String) param.attribute('name')
+ if (key == null) {
+ key = ''
+ }
+ def value = (String) param.text()
+ String entry = """
+ <entry>
+ <key>${key}</key>
+ <value>${value}</value>
+ </entry>
+ """
+ entries = entries + entry
+ }
+ } catch (Exception e) {
+ logWarn('Exception transforming params to entries', e)
+ }
+ return entries
+ }
+
+ /**
+ * Transform the parameter specifications from the incoming '*-params' root element to
+ * a corresponding list of 'entry's (typically used when invoking the VNF Rest Adpater).
+ * Each element in '*-params' is used to create an 'entry' element.
+ *
+ * @param paramsNode A Node representing a '*-params' element.
+ * @return a String of 'entry' elements, one for each 'param' element.
+ */
+ protected String transformVolumeParamsToEntries(String paramsRootXml) {
+ if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
+ return ''
+ }
+ def String entries = ''
+ try {
+ paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
+ def paramsNode = xmlParser.parseText(paramsRootXml)
+ def params = utils.getIdenticalChildren(paramsNode, 'param')
+ for (param in params) {
+ def key = (String) param.attribute('name')
+ if (key == null) {
+ key = ''
+ }
+ if ( !(key in ['vnf_id', 'vnf_name', 'vf_module_id', 'vf_module_name'])) {
+ def value = (String) param.text()
+ String entry = """
+ <entry>
+ <key>${key}</key>
+ <value>${value}</value>
+ </entry>
+ """
+ entries = entries + entry
+ }
+ }
+ } catch (Exception e) {
+ logWarn('Exception transforming params to entries', e)
+ }
+ return entries
+ }
+
+ /**
+ * 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.
+ */
+ protected String getTenantIdFromVolumeGroup(String volumeGroupXml) {
+ def groovy.util.Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+ def groovy.util.Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+ if (relationshipList != null) {
+ def groovy.util.NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+ for (groovy.util.Node relationship in relationships) {
+ def groovy.util.Node relatedTo = utils.getChildNode(relationship, 'related-to')
+ if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
+ def groovy.util.NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
+ for (groovy.util.Node relationshipData in relationshipDataList) {
+ def groovy.util.Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
+ if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
+ def groovy.util.Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
+ if (relationshipValue != null) {
+ return relationshipValue.text()
+ }
+ }
+ }
+ }
+ }
+ }
+ return null
+ }
+
+
+ /*
+ * Parses VNF parameters passed in on the incoming requests and SDNC parameters returned from SDNC get response
+ * and puts them into the format expected by VNF adapter.
+ * @param vnfParamsMap - map of VNF parameters passed in the request body
+ * @param sdncGetResponse - response string from SDNC GET topology request
+ * @param vnfId
+ * @param vnfName
+ * @param vfModuleId
+ * @param vfModuleName
+ * @param vfModuleIndex - can be null
+ * @return a String of key/value entries for vfModuleParams
+ */
+
+
+ protected String buildVfModuleParams(String vnfParams, String sdncGetResponse, String vnfId, String vnfName,
+ String vfModuleId, String vfModuleName, String vfModuleIndex) {
+
+ //Get SDNC Response Data
+
+ String data = utils.getNodeXml(sdncGetResponse, "response-data")
+ data = data.replaceAll("&lt;", "<")
+ data = data.replaceAll("&gt;", ">")
+
+ String serviceData = utils.getNodeXml(data, "service-data")
+ serviceData = utils.removeXmlPreamble(serviceData)
+ serviceData = utils.removeXmlNamespaces(serviceData)
+ String vnfRequestInfo = utils.getNodeXml(serviceData, "vnf-request-information")
+ String oldVnfId = utils.getNodeXml(vnfRequestInfo, "vnf-id")
+ oldVnfId = utils.removeXmlPreamble(oldVnfId)
+ oldVnfId = utils.removeXmlNamespaces(oldVnfId)
+ serviceData = serviceData.replace(oldVnfId, "")
+ def vnfId1 = utils.getNodeText1(serviceData, "vnf-id")
+ String vfModuleIndexParam = ""
+
+ if (vfModuleIndex != null) {
+ vfModuleIndexParam = """<entry>
+ <key>vf_module_index</key>
+ <value>${vfModuleIndex}</value>
+ </entry>"""
+ }
+
+ // Add-on data
+ String vnfInfo =
+ """<entry>
+ <key>vnf_id</key>
+ <value>${vnfId}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${vnfName}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${vfModuleId}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${vfModuleName}</value>
+ </entry>
+ ${vfModuleIndexParam}"""
+
+ utils.logAudit("vnfInfo: " + vnfInfo)
+ InputSource source = new InputSource(new StringReader(data));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document responseXml = docBuilder.parse(source)
+
+
+ // Availability Zones Data
+ String aZones = ""
+ StringBuilder sbAZone = new StringBuilder()
+
+ NodeList aZonesList = responseXml.getElementsByTagNameNS("*", "availability-zones")
+ String aZonePosition = "0"
+ for (int z = 0; z < aZonesList.getLength(); z++) {
+ Node node = aZonesList.item(z)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ String aZoneValue = utils.getElementText(eElement, "availability-zone")
+ aZonePosition = z.toString()
+ String aZoneXml =
+ """<entry>
+ <key>availability_zone_${aZonePosition}</key>
+ <value>${aZoneValue}</value>
+ </entry>"""
+ aZones = sbAZone.append(aZoneXml)
+ }
+ }
+
+ // VNF Networks Data
+ String vnfNetworkNetId = ""
+ String vnfNetworkNetName = ""
+ String vnfNetworkSubNetId = ""
+ String vnfNetworkV6SubNetId = ""
+ String vnfNetworkNetFqdn = ""
+ String vnfNetworksSriovVlanFilters = ""
+ StringBuilder sbNet = new StringBuilder()
+ StringBuilder sbNet2 = new StringBuilder()
+ StringBuilder sbNet3 = new StringBuilder()
+ StringBuilder sbNet4 = new StringBuilder()
+ StringBuilder sbNet5 = new StringBuilder()
+ StringBuilder sbNet6 = new StringBuilder()
+ NodeList vnfNetworkList = responseXml.getElementsByTagNameNS("*", "vnf-networks")
+ for (int x = 0; x < vnfNetworkList.getLength(); x++) {
+ Node node = vnfNetworkList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ String vnfNetworkKey = utils.getElementText(eElement, "network-role")
+ String vnfNetworkNeutronIdValue = utils.getElementText(eElement, "neutron-id")
+ String vnfNetworkNetNameValue = utils.getElementText(eElement, "network-name")
+ String vnfNetworkSubNetIdValue = utils.getElementText(eElement, "subnet-id")
+ String vnfNetworkV6SubNetIdValue = utils.getElementText(eElement, "ipv6-subnet-id")
+ String vnfNetworkNetFqdnValue = utils.getElementText(eElement, "contrail-network-fqdn")
+ String vnfNetworkNetIdXml =
+ """<entry>
+ <key>${vnfNetworkKey}_net_id</key>
+ <value>${vnfNetworkNeutronIdValue}</value>
+ </entry>"""
+ vnfNetworkNetId = sbNet.append(vnfNetworkNetIdXml)
+ String vnfNetworkNetNameXml =
+ """<entry>
+ <key>${vnfNetworkKey}_net_name</key>
+ <value>${vnfNetworkNetNameValue}</value>
+ </entry>"""
+ vnfNetworkNetName = sbNet2.append(vnfNetworkNetNameXml)
+ String vnfNetworkSubNetIdXml =
+ """<entry>
+ <key>${vnfNetworkKey}_subnet_id</key>
+ <value>${vnfNetworkSubNetIdValue}</value>
+ </entry>"""
+ vnfNetworkSubNetId = sbNet3.append(vnfNetworkSubNetIdXml)
+ String vnfNetworkV6SubNetIdXml =
+ """<entry>
+ <key>${vnfNetworkKey}_v6_subnet_id</key>
+ <value>${vnfNetworkV6SubNetIdValue}</value>
+ </entry>"""
+ vnfNetworkV6SubNetId = sbNet5.append(vnfNetworkV6SubNetIdXml)
+ String vnfNetworkNetFqdnXml =
+ """<entry>
+ <key>${vnfNetworkKey}_net_fqdn</key>
+ <value>${vnfNetworkNetFqdnValue}</value>
+ </entry>"""
+ vnfNetworkNetFqdn = sbNet4.append(vnfNetworkNetFqdnXml)
+
+ NodeList sriovVlanFilterList = eElement.getElementsByTagNameNS("*","sriov-vlan-filter-list")
+ StringBuffer sriovFilterBuf = new StringBuffer()
+ String values = ""
+ for(int i = 0; i < sriovVlanFilterList.getLength(); i++){
+ Node node1 = sriovVlanFilterList.item(i)
+ if (node1.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement1 = (Element) node1
+ String value = utils.getElementText(eElement1, "sriov-vlan-filter")
+ if (i != sriovVlanFilterList.getLength() - 1) {
+ values = sriovFilterBuf.append(value + ",")
+ }
+ else {
+ values = sriovFilterBuf.append(value);
+ }
+ }
+ }
+ if (!values.isEmpty()) {
+ String vnfNetworkSriovVlanFilterXml =
+ """<entry>
+ <key>${vnfNetworkKey}_ATT_VF_VLAN_FILTER</key>
+ <value>${values}</value>
+ </entry>"""
+ vnfNetworksSriovVlanFilters = sbNet6.append(vnfNetworkSriovVlanFilterXml)
+ }
+ }
+ }
+
+ // VNF-VMS Data
+ String vnfVMS = ""
+ String vnfVMSPositions = ""
+ String vmNetworks = ""
+ String vmNetworksPositions = ""
+ String vmNetworksPositionsV6 = ""
+ String interfaceRoutePrefixes = ""
+ def key
+ def value
+ def networkKey
+ def networkValue
+ def floatingIPKey
+ def floatingIPKeyValue
+ def floatingIPV6Key
+ def floatingIPV6KeyValue
+ StringBuilder sb = new StringBuilder()
+ StringBuilder sbPositions = new StringBuilder()
+ StringBuilder sbVmNetworks = new StringBuilder()
+ StringBuilder sbNetworksPositions = new StringBuilder()
+ StringBuilder sbInterfaceRoutePrefixes = new StringBuilder()
+ StringBuilder sbNetworksPositionsV6 = new StringBuilder()
+
+ NodeList vmsList = responseXml.getElementsByTagNameNS("*","vnf-vms")
+ for (int x = 0; x < vmsList.getLength(); x++) {
+ Node node = vmsList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ key = utils.getElementText(eElement, "vm-type")
+ String values
+ String position = "0"
+ StringBuilder sb1 = new StringBuilder()
+ NodeList valueList = eElement.getElementsByTagNameNS("*","vm-names")
+ NodeList vmNetworksList = eElement.getElementsByTagNameNS("*","vm-networks")
+ for(int i = 0; i < valueList.getLength(); i++){
+ Node node1 = valueList.item(i)
+ if (node1.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement1 = (Element) node1
+ value = utils.getElementText(eElement1, "vm-name")
+ if (i != valueList.getLength() - 1) {
+ values = sb1.append(value + ",")
+ }
+ else {
+ values = sb1.append(value);
+ }
+ position = i.toString()
+ String vnfPositionXml =
+ """<entry>
+ <key>${key}_name_${position}</key>
+ <value>${value}</value>
+ </entry>"""
+ vnfVMSPositions = sbPositions.append(vnfPositionXml)
+ }
+ }
+ for(int n = 0; n < vmNetworksList.getLength(); n++){
+ String floatingIpKeyValueStr = ""
+ String floatingIpV6KeyValueStr = ""
+ Node nodeNetworkKey = vmNetworksList.item(n)
+ if (nodeNetworkKey.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementNetworkKey = (Element) nodeNetworkKey
+ String ipAddressValues
+ String ipV6AddressValues
+ String networkPosition = "0"
+ StringBuilder sb2 = new StringBuilder()
+ StringBuilder sb3 = new StringBuilder()
+ StringBuilder sb4 = new StringBuilder()
+ networkKey = utils.getElementText(eElementNetworkKey, "network-role")
+ floatingIPKey = key + '_' + networkKey + '_floating_ip'
+ floatingIPKeyValue = utils.getElementText(eElementNetworkKey, "floating-ip")
+ if(!floatingIPKeyValue.isEmpty()){
+ floatingIpKeyValueStr = """<entry>
+ <key>$floatingIPKey</key>
+ <value>$floatingIPKeyValue</value>
+ </entry>"""
+ }
+ floatingIPV6Key = key + '_' + networkKey + '_floating_v6_ip'
+ floatingIPV6KeyValue = utils.getElementText(eElementNetworkKey, "floating-ip-v6")
+ if(!floatingIPV6KeyValue.isEmpty()){
+ floatingIpV6KeyValueStr = """<entry>
+ <key>$floatingIPV6Key</key>
+ <value>$floatingIPV6KeyValue</value>
+ </entry>"""
+ }
+ NodeList networkIpsList = eElementNetworkKey.getElementsByTagNameNS("*","network-ips")
+ for(int a = 0; a < networkIpsList.getLength(); a++){
+ Node ipAddress = networkIpsList.item(a)
+ if (ipAddress.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementIpAddress = (Element) ipAddress
+ String ipAddressValue = utils.getElementText(eElementIpAddress, "ip-address")
+ if (a != networkIpsList.getLength() - 1) {
+ ipAddressValues = sb2.append(ipAddressValue + ",")
+ }
+ else {
+ ipAddressValues = sb2.append(ipAddressValue);
+ }
+ networkPosition = a.toString()
+ String vmNetworksPositionsXml =
+ """<entry>
+ <key>${key}_${networkKey}_ip_${networkPosition}</key>
+ <value>${ipAddressValue}</value>
+ </entry>"""
+ vmNetworksPositions = sbNetworksPositions.append(vmNetworksPositionsXml)
+ }
+ }
+ vmNetworksPositions = sbNetworksPositions.append(floatingIpKeyValueStr).append(floatingIpV6KeyValueStr)
+
+ String vmNetworksXml =
+ """<entry>
+ <key>${key}_${networkKey}_ips</key>
+ <value>${ipAddressValues}</value>
+ </entry>"""
+ vmNetworks = sbVmNetworks.append(vmNetworksXml)
+
+ NodeList interfaceRoutePrefixesList = eElementNetworkKey.getElementsByTagNameNS("*","interface-route-prefixes")
+ String interfaceRoutePrefixValues = sb3.append("[")
+
+ for(int a = 0; a < interfaceRoutePrefixesList.getLength(); a++){
+ Node interfaceRoutePrefix = interfaceRoutePrefixesList.item(a)
+ if (interfaceRoutePrefix.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementInterfaceRoutePrefix = (Element) interfaceRoutePrefix
+ String interfaceRoutePrefixValue = utils.getElementText(eElementInterfaceRoutePrefix, "interface-route-prefix-cidr")
+ if (interfaceRoutePrefixValue == null || interfaceRoutePrefixValue.isEmpty()) {
+ interfaceRoutePrefixValue = utils.getElementText(eElementInterfaceRoutePrefix, "interface-route-prefix")
+ }
+ if (a != interfaceRoutePrefixesList.getLength() - 1) {
+ interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}" + ",")
+ }
+ else {
+ interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}")
+ }
+ }
+ }
+ interfaceRoutePrefixValues = sb3.append("]")
+ if (interfaceRoutePrefixesList.getLength() > 0) {
+ String interfaceRoutePrefixesXml =
+ """<entry>
+ <key>${key}_${networkKey}_route_prefixes</key>
+ <value>${interfaceRoutePrefixValues}</value>
+ </entry>"""
+ interfaceRoutePrefixes = sbInterfaceRoutePrefixes.append(interfaceRoutePrefixesXml)
+ }
+
+ NodeList networkIpsV6List = eElementNetworkKey.getElementsByTagNameNS("*","network-ips-v6")
+ for(int a = 0; a < networkIpsV6List.getLength(); a++){
+ Node ipV6Address = networkIpsV6List.item(a)
+ if (ipV6Address.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementIpV6Address = (Element) ipV6Address
+ String ipV6AddressValue = utils.getElementText(eElementIpV6Address, "ip-address-ipv6")
+ if (a != networkIpsV6List.getLength() - 1) {
+ ipV6AddressValues = sb4.append(ipV6AddressValue + ",")
+ }
+ else {
+ ipV6AddressValues = sb4.append(ipV6AddressValue);
+ }
+ networkPosition = a.toString()
+ String vmNetworksPositionsV6Xml =
+ """<entry>
+ <key>${key}_${networkKey}_v6_ip_${networkPosition}</key>
+ <value>${ipV6AddressValue}</value>
+ </entry>"""
+ vmNetworksPositionsV6 = sbNetworksPositionsV6.append(vmNetworksPositionsV6Xml)
+ }
+ }
+ String vmNetworksV6Xml =
+ """<entry>
+ <key>${key}_${networkKey}_v6_ips</key>
+ <value>${ipV6AddressValues}</value>
+ </entry>"""
+ vmNetworks = sbVmNetworks.append(vmNetworksV6Xml)
+ }
+ }
+ String vnfXml =
+ """<entry>
+ <key>${key}_names</key>
+ <value>${values}</value>
+ </entry>"""
+ vnfVMS = sb.append(vnfXml)
+ }
+ }
+ //SDNC Response Params
+ String sdncResponseParams = ""
+ List<String> sdncResponseParamsToSkip = ["vnf_id", "vf_module_id", "vnf_name", "vf_module_name"]
+ String vnfParamsChildNodes = utils.getChildNodes(data, "vnf-parameters")
+ if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
+ // No SDNC params
+ }else{
+ 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")
+ if (!sdncResponseParamsToSkip.contains(vnfParameterName)) {
+ String vnfParameterValue = utils.getElementText(eElement, "vnf-parameter-value")
+ String paraEntry =
+ """<entry>
+ <key>${vnfParameterName}</key>
+ <value>${vnfParameterValue}</value>
+ </entry>"""
+ sdncResponseParams = sb.append(paraEntry)
+ }
+ }
+ }
+
+
+ def vfModuleParams = """
+ ${vnfInfo}
+ ${aZones}
+ ${vnfNetworkNetId}
+ ${vnfNetworkNetName}
+ ${vnfNetworkSubNetId}
+ ${vnfNetworkV6SubNetId}
+ ${vnfNetworkNetFqdn}
+ ${vnfNetworksSriovVlanFilters}
+ ${vnfVMS}
+ ${vnfVMSPositions}
+ ${vmNetworks}
+ ${vmNetworksPositions}
+ ${vmNetworksPositionsV6}
+ ${interfaceRoutePrefixes}
+ ${vnfParams}
+ ${sdncResponseParams}"""
+
+ return vfModuleParams
+
+ }
+
+
+ /*
+ * VBNG specific method that parses VNF parameters passed in on the
+ * incoming requests and SDNC parameters returned from SDNC get response
+ * and puts them into the format expected by VNF adapter.
+ * @param vnfParamsMap - map of VNF parameters passed in the request body
+ * @param sdncGetResponse - response string from SDNC GET topology request
+ * @param vnfId
+ * @param vnfName
+ * @param vfModuleId
+ * @param vfModuleName
+ * @return a String of key/value entries for vfModuleParams
+ */
+
+ protected String buildVfModuleParamsVbng(String vnfParams, String sdncGetResponse, String vnfId, String vnfName,
+ String vfModuleId, String vfModuleName) {
+
+ //Get SDNC Response Data
+
+ String data = utils.getNodeXml(sdncGetResponse, "response-data")
+ data = data.replaceAll("&lt;", "<")
+ data = data.replaceAll("&gt;", ">")
+
+
+
+ // Add-on data
+ String vnfInfo =
+ """<entry>
+ <key>vnf_id</key>
+ <value>${vnfId}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${vnfName}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${vfModuleId}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${vfModuleName}</value>
+ </entry>"""
+
+ utils.logAudit("vnfInfo: " + vnfInfo)
+ InputSource source = new InputSource(new StringReader(data));
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ docFactory.setNamespaceAware(true)
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+ Document responseXml = docBuilder.parse(source)
+
+
+ // Availability Zones Data
+ String aZones = ""
+ StringBuilder sbAZone = new StringBuilder()
+ NodeList aZonesList = responseXml.getElementsByTagNameNS("*", "availability-zones")
+ String aZonePosition = "0"
+ for (int z = 0; z < aZonesList.getLength(); z++) {
+ Node node = aZonesList.item(z)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ String aZoneValue = utils.getElementText(eElement, "availability-zone")
+ aZonePosition = z.toString()
+ String aZoneXml =
+ """<entry>
+ <key>availability_zone_${aZonePosition}</key>
+ <value>${aZoneValue}</value>
+ </entry>"""
+ aZones = sbAZone.append(aZoneXml)
+ }
+ }
+
+ // VNF Networks Data
+ String vnfNetworkNetId = ""
+ String vnfNetworkNetName = ""
+ String vnfNetworkSubNetId = ""
+ String vnfNetworkV6SubNetId = ""
+ String vnfNetworkNetFqdn = ""
+ String vnfNetworksSriovVlanFilters = ""
+ StringBuilder sbNet = new StringBuilder()
+ StringBuilder sbNet2 = new StringBuilder()
+ StringBuilder sbNet3 = new StringBuilder()
+ StringBuilder sbNet4 = new StringBuilder()
+ StringBuilder sbNet5 = new StringBuilder()
+ StringBuilder sbNet6 = new StringBuilder()
+ NodeList vnfNetworkList = responseXml.getElementsByTagNameNS("*", "vnf-networks")
+ for (int x = 0; x < vnfNetworkList.getLength(); x++) {
+ Node node = vnfNetworkList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ String vnfNetworkKey = utils.getElementText(eElement, "network-role")
+ String vnfNetworkNeutronIdValue = utils.getElementText(eElement, "neutron-id")
+ String vnfNetworkNetNameValue = utils.getElementText(eElement, "network-name")
+ String vnfNetworkSubNetIdValue = utils.getElementText(eElement, "subnet-id")
+ String vnfNetworkV6SubNetIdValue = utils.getElementText(eElement, "ipv6-subnet-id")
+ String vnfNetworkNetFqdnValue = utils.getElementText(eElement, "contrail-network-fqdn")
+ String vnfNetworkNetIdXml =
+ """<entry>
+ <key>${vnfNetworkKey}_net_id</key>
+ <value>${vnfNetworkNeutronIdValue}</value>
+ </entry>"""
+ vnfNetworkNetId = sbNet.append(vnfNetworkNetIdXml)
+ String vnfNetworkNetNameXml =
+ """<entry>
+ <key>${vnfNetworkKey}_net_name</key>
+ <value>${vnfNetworkNetNameValue}</value>
+ </entry>"""
+ vnfNetworkNetName = sbNet2.append(vnfNetworkNetNameXml)
+ String vnfNetworkSubNetIdXml =
+ """<entry>
+ <key>${vnfNetworkKey}_subnet_id</key>
+ <value>${vnfNetworkSubNetIdValue}</value>
+ </entry>"""
+ vnfNetworkSubNetId = sbNet3.append(vnfNetworkSubNetIdXml)
+ String vnfNetworkV6SubNetIdXml =
+ """<entry>
+ <key>${vnfNetworkKey}_v6_subnet_id</key>
+ <value>${vnfNetworkV6SubNetIdValue}</value>
+ </entry>"""
+ vnfNetworkV6SubNetId = sbNet5.append(vnfNetworkV6SubNetIdXml)
+ String vnfNetworkNetFqdnXml =
+ """<entry>
+ <key>${vnfNetworkKey}_net_fqdn</key>
+ <value>${vnfNetworkNetFqdnValue}</value>
+ </entry>"""
+ vnfNetworkNetFqdn = sbNet4.append(vnfNetworkNetFqdnXml)
+
+ NodeList sriovVlanFilterList = eElement.getElementsByTagNameNS("*","sriov-vlan-filter-list")
+ StringBuffer sriovFilterBuf = new StringBuffer()
+ String values = ""
+ for(int i = 0; i < sriovVlanFilterList.getLength(); i++){
+ Node node1 = sriovVlanFilterList.item(i)
+ if (node1.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement1 = (Element) node1
+ String value = utils.getElementText(eElement1, "sriov-vlan-filter")
+ if (i != sriovVlanFilterList.getLength() - 1) {
+ values = sriovFilterBuf.append(value + ",")
+ }
+ else {
+ values = sriovFilterBuf.append(value);
+ }
+ }
+ }
+ if (!values.isEmpty()) {
+ String vnfNetworkSriovVlanFilterXml =
+ """<entry>
+ <key>${vnfNetworkKey}_ATT_VF_VLAN_FILTER</key>
+ <value>${values}</value>
+ </entry>"""
+ vnfNetworksSriovVlanFilters = sbNet6.append(vnfNetworkSriovVlanFilterXml)
+ }
+ }
+ }
+
+ // VNF-VMS Data
+ String vnfVMS = ""
+ String vnfVMSPositions = ""
+ String vmNetworks = ""
+ String vmNetworksPositions = ""
+ String vmNetworksPositionsV6 = ""
+ String interfaceRoutePrefixes = ""
+ def key
+ def value
+ def networkKey
+ def networkValue
+ def floatingIPKey
+ def floatingIPKeyValue
+ def floatingIPV6Key
+ def floatingIPV6KeyValue
+ StringBuilder sb = new StringBuilder()
+ StringBuilder sbPositions = new StringBuilder()
+ StringBuilder sbVmNetworks = new StringBuilder()
+ StringBuilder sbNetworksPositions = new StringBuilder()
+ StringBuilder sbInterfaceRoutePrefixes = new StringBuilder()
+ StringBuilder sbNetworksPositionsV6 = new StringBuilder()
+
+ NodeList vmsList = responseXml.getElementsByTagNameNS("*","vnf-vms")
+ for (int x = 0; x < vmsList.getLength(); x++) {
+ Node node = vmsList.item(x)
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement = (Element) node
+ key = utils.getElementText(eElement, "vm-type")
+ String values
+ String position = "0"
+ StringBuilder sb1 = new StringBuilder()
+ NodeList valueList = eElement.getElementsByTagNameNS("*","vm-names")
+ NodeList vmNetworksList = eElement.getElementsByTagNameNS("*","vm-networks")
+ for(int i = 0; i < valueList.getLength(); i++){
+ Node node1 = valueList.item(i)
+ if (node1.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElement1 = (Element) node1
+ value = utils.getElementText(eElement1, "vm-name")
+ if (i != valueList.getLength() - 1) {
+ values = sb1.append(value + ",")
+ }
+ else {
+ values = sb1.append(value);
+ }
+ position = i.toString()
+ String vnfPositionXml =
+ """<entry>
+ <key>${key}_name_${position}</key>
+ <value>${value}</value>
+ </entry>"""
+ vnfVMSPositions = sbPositions.append(vnfPositionXml)
+ }
+ }
+ for(int n = 0; n < vmNetworksList.getLength(); n++){
+ String floatingIpKeyValueStr = ""
+ String floatingIpV6KeyValueStr = ""
+ Node nodeNetworkKey = vmNetworksList.item(n)
+ if (nodeNetworkKey.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementNetworkKey = (Element) nodeNetworkKey
+ String ipAddressValues
+ String ipV6AddressValues
+ String networkPosition = "0"
+ StringBuilder sb2 = new StringBuilder()
+ StringBuilder sb3 = new StringBuilder()
+ StringBuilder sb4 = new StringBuilder()
+ networkKey = utils.getElementText(eElementNetworkKey, "network-role")
+ floatingIPKey = key + '_' + networkKey + '_floating_ip'
+ floatingIPKeyValue = utils.getElementText(eElementNetworkKey, "floating-ip")
+ if(!floatingIPKeyValue.isEmpty()){
+ floatingIpKeyValueStr = """<entry>
+ <key>$floatingIPKey</key>
+ <value>$floatingIPKeyValue</value>
+ </entry>"""
+ }
+ floatingIPV6Key = key + '_' + networkKey + '_floating_v6_ip'
+ floatingIPV6KeyValue = utils.getElementText(eElementNetworkKey, "floating-ip-v6")
+ if(!floatingIPV6KeyValue.isEmpty()){
+ floatingIpV6KeyValueStr = """<entry>
+ <key>$floatingIPV6Key</key>
+ <value>$floatingIPV6KeyValue</value>
+ </entry>"""
+ }
+ NodeList networkIpsList = eElementNetworkKey.getElementsByTagNameNS("*","network-ips")
+ for(int a = 0; a < networkIpsList.getLength(); a++){
+ Node ipAddress = networkIpsList.item(a)
+ if (ipAddress.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementIpAddress = (Element) ipAddress
+ String ipAddressValue = utils.getElementText(eElementIpAddress, "ip-address")
+ if (a != networkIpsList.getLength() - 1) {
+ ipAddressValues = sb2.append(ipAddressValue + ",")
+ }
+ else {
+ ipAddressValues = sb2.append(ipAddressValue);
+ }
+ networkPosition = a.toString()
+ String vmNetworksPositionsXml =
+ """<entry>
+ <key>${key}_${networkKey}_ip_${networkPosition}</key>
+ <value>${ipAddressValue}</value>
+ </entry>"""
+ vmNetworksPositions = sbNetworksPositions.append(vmNetworksPositionsXml)
+ }
+ }
+ vmNetworksPositions = sbNetworksPositions.append(floatingIpKeyValueStr).append(floatingIpV6KeyValueStr)
+
+ String vmNetworksXml =
+ """<entry>
+ <key>${key}_${networkKey}_ips</key>
+ <value>${ipAddressValues}</value>
+ </entry>"""
+ vmNetworks = sbVmNetworks.append(vmNetworksXml)
+
+ NodeList interfaceRoutePrefixesList = eElementNetworkKey.getElementsByTagNameNS("*","interface-route-prefixes")
+ String interfaceRoutePrefixValues = sb3.append("[")
+
+ for(int a = 0; a < interfaceRoutePrefixesList.getLength(); a++){
+ Node interfaceRoutePrefix = interfaceRoutePrefixesList.item(a)
+ if (interfaceRoutePrefix.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementInterfaceRoutePrefix = (Element) interfaceRoutePrefix
+ String interfaceRoutePrefixValue = utils.getElementText(eElementInterfaceRoutePrefix, "interface-route-prefix-cidr")
+ if (interfaceRoutePrefixValue == null || interfaceRoutePrefixValue.isEmpty()) {
+ interfaceRoutePrefixValue = utils.getElementText(eElementInterfaceRoutePrefix, "interface-route-prefix")
+ }
+ if (a != interfaceRoutePrefixesList.getLength() - 1) {
+ interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}" + ",")
+ }
+ else {
+ interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}")
+ }
+ }
+ }
+ interfaceRoutePrefixValues = sb3.append("]")
+ if (interfaceRoutePrefixesList.getLength() > 0) {
+ String interfaceRoutePrefixesXml =
+ """<entry>
+ <key>${key}_${networkKey}_route_prefixes</key>
+ <value>${interfaceRoutePrefixValues}</value>
+ </entry>"""
+ interfaceRoutePrefixes = sbInterfaceRoutePrefixes.append(interfaceRoutePrefixesXml)
+ }
+
+ NodeList networkIpsV6List = eElementNetworkKey.getElementsByTagNameNS("*","network-ips-v6")
+ for(int a = 0; a < networkIpsV6List.getLength(); a++){
+ Node ipV6Address = networkIpsV6List.item(a)
+ if (ipV6Address.getNodeType() == Node.ELEMENT_NODE) {
+ Element eElementIpV6Address = (Element) ipV6Address
+ String ipV6AddressValue = utils.getElementText(eElementIpV6Address, "ip-address-ipv6")
+ if (a != networkIpsV6List.getLength() - 1) {
+ ipV6AddressValues = sb4.append(ipV6AddressValue + ",")
+ }
+ else {
+ ipV6AddressValues = sb4.append(ipV6AddressValue);
+ }
+ networkPosition = a.toString()
+ String vmNetworksPositionsV6Xml =
+ """<entry>
+ <key>${key}_${networkKey}_v6_ip_${networkPosition}</key>
+ <value>${ipV6AddressValue}</value>
+ </entry>"""
+ vmNetworksPositionsV6 = sbNetworksPositionsV6.append(vmNetworksPositionsV6Xml)
+ }
+ }
+ String vmNetworksV6Xml =
+ """<entry>
+ <key>${key}_${networkKey}_v6_ips</key>
+ <value>${ipV6AddressValues}</value>
+ </entry>"""
+ vmNetworks = sbVmNetworks.append(vmNetworksV6Xml)
+ }
+ }
+ String vnfXml =
+ """<entry>
+ <key>${key}_names</key>
+ <value>${values}</value>
+ </entry>"""
+ vnfVMS = sb.append(vnfXml)
+ }
+ }
+ //SDNC Response Params
+ String sdncResponseParams = ""
+ List<String> sdncResponseParamsToSkip = ["vnf_id", "vf_module_id", "vnf_name", "vf_module_name"]
+ String vnfParamsChildNodes = utils.getChildNodes(data, "vnf-parameters")
+ if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
+ // No SDNC params
+ }else{
+ 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")
+ if (!sdncResponseParamsToSkip.contains(vnfParameterName)) {
+ String vnfParameterValue = utils.getElementText(eElement, "vnf-parameter-value")
+ String paraEntry =
+ """<entry>
+ <key>${vnfParameterName}</key>
+ <value>${vnfParameterValue}</value>
+ </entry>"""
+ sdncResponseParams = sb.append(paraEntry)
+ }
+ }
+ }
+
+
+ def vfModuleParams = """
+ ${vnfInfo}
+ ${aZones}
+ ${vnfNetworkNetId}
+ ${vnfNetworkNetName}
+ ${vnfNetworkSubNetId}
+ ${vnfNetworkV6SubNetId}
+ ${vnfNetworkNetFqdn}
+ ${vnfNetworksSriovVlanFilters}
+ ${vnfVMS}
+ ${vnfVMSPositions}
+ ${vmNetworks}
+ ${vmNetworksPositions}
+ ${vmNetworksPositionsV6}
+ ${interfaceRoutePrefixes}
+ ${vnfParams}
+ ${sdncResponseParams}"""
+
+ return vfModuleParams
+
+ }
+
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VidUtils.groovy
index 364c586325..022a00c192 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VidUtils.groovy
@@ -1,362 +1,550 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import org.json.JSONObject;
-import org.json.XML;
-
-import org.openecomp.mso.bpmn.core.xml.XmlTool;
-
-import groovy.json.JsonBuilder
-import groovy.json.JsonSlurper
-import groovy.util.slurpersupport.GPathResult
-import groovy.xml.QName
-
-class VidUtils {
-
- public MsoUtils utils = new MsoUtils()
- private AbstractServiceTaskProcessor taskProcessor
-
- public VidUtils(AbstractServiceTaskProcessor taskProcessor) {
- this.taskProcessor = taskProcessor
- }
-
- /**
- * Create a volume-request XML using a JSON string
- * @param jsonReq - JSON request from VID
- * @param action
- * @return
- */
- public String createXmlVolumeRequest(String jsonReq, String action, String serviceInstanceId) {
- def jsonSlurper = new JsonSlurper()
- try{
- Map reqMap = jsonSlurper.parseText(jsonReq)
- return createXmlVolumeRequest(reqMap, action, serviceInstanceId)
- }
- catch(Exception e) {
- throw e
- }
- }
-
- /**
- * Create a volume-request XML using a map
- * @param requestMap - map created from VID JSON
- * @param action
- * @param serviceInstanceId
- * @return
- */
- public String createXmlVolumeRequest(Map requestMap, String action, String serviceInstanceId) {
- createXmlVolumeRequest(requestMap, action, serviceInstanceId, '')
- }
-
-
- /**
- * Create a volume-request XML using a map
- * @param requestMap
- * @param action
- * @param serviceInstanceId
- * @param volumeGroupId
- * @return
- */
- public String createXmlVolumeRequest(Map requestMap, String action, String serviceInstanceId, String volumeGroupId) {
- def vnfType = ''
- def serviceName = ''
- def modelCustomizationName = ''
- def asdcServiceModelVersion = ''
-
- def suppressRollback = requestMap.requestDetails.requestInfo.suppressRollback
- def rollbackEnabled = true
- if(suppressRollback != null && suppressRollback == true) {
- rollbackEnabled = false
- }
-
- def volGrpName = requestMap.requestDetails.requestInfo?.instanceName ?: ''
- def serviceId = requestMap.requestDetails.requestParameters?.serviceId ?: ''
- 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
- }
- }
-
- vnfType = serviceName + '/' + modelCustomizationName
-
- def userParams = requestMap.requestDetails?.requestParameters?.userParams
- def userParamsNode = ''
- if(userParams != null) {
- userParamsNode = buildUserParams(userParams)
- }
- def xmlReq = """
- <volume-request xmlns="http://www.w3.org/2001/XMLSchema">
- <request-info>
- <action>${action}</action>
- <source>${requestMap.requestDetails.requestInfo.source}</source>
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- </request-info>
- <volume-inputs>
- <volume-group-id>${volumeGroupId}</volume-group-id>
- <volume-group-name>${volGrpName}</volume-group-name>
- <vnf-type>${vnfType}</vnf-type>
- <vf-module-model-name>${requestMap.requestDetails.modelInfo.modelName}</vf-module-model-name>
- <asdc-service-model-version>${asdcServiceModelVersion}</asdc-service-model-version>
- <aic-cloud-region>${requestMap.requestDetails.cloudConfiguration.lcpCloudRegionId}</aic-cloud-region>
- <tenant-id>${requestMap.requestDetails.cloudConfiguration.tenantId}</tenant-id>
- <service-id>${serviceId}</service-id>
- <backout-on-failure>${rollbackEnabled}</backout-on-failure>
- </volume-inputs>
- <volume-params>
- $userParamsNode
- </volume-params>
- </volume-request>
- """
- // return a pretty-print of the volume-request xml without the preamble
- return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
- }
-
- /**
- * A common method that can be used to build volume-params node from a map.
- * @param Map userParams
- * @return
- */
- public String buildUserParams(userParams) {
- if (userParams == null) return ""
- def xml = ""
- def key = ""
- def value = ""
- userParams.each {it ->
- key = it.name.replaceAll(/\B[A-Z]/) { '_' + it }.toLowerCase()
- value = it.value
- xml += "<param name=\"${key}\">${value}</param>"
- }
-
- return xml
- }
-
- /**
- * A common method that can be used to extract 'requestDetails'
- * @param String json
- * @return String json requestDetails
- */
- @Deprecated
- public getJsonRequestDetails(String jsonInput) {
- String rtn = ""
- if (jsonInput.isEmpty() || jsonInput == null) {
- return rtn
- } else {
- def jsonMapObject = new JsonSlurper().parseText(jsonInput)
- if (jsonMapObject instanceof Map) {
- String jsonString = new JsonBuilder(jsonMapObject.requestDetails)
- rtn = '{'+"requestDetails"+":"+jsonString+'}'
- return rtn
- } else {
- return rtn
- }
- }
- }
-
- /**
- * A common method that can be used to extract 'requestDetails' in Xml
- * @param String json
- * @return String xml requestDetails
- */
- @Deprecated
- public getJsonRequestDetailstoXml(String jsonInput) {
- String rtn = null
- def jsonString = getJsonRequestDetails(jsonInput)
- if (jsonString == null) {
- return rtn
- } else {
- JSONObject jsonObj = new JSONObject(jsonString)
- return XmlTool.normalize(XML.toString(jsonObj))
- }
- }
-
- /**
- * Create a network-request XML using a map
- * @param execution
- * @param xmlRequestDetails - requestDetails in xml
- * @return
- */
- public String createXmlNetworkRequestInfra(execution, def networkJsonIncoming) {
-
- def requestId = execution.getVariable("requestId")
- def serviceInstanceId = execution.getVariable("serviceInstanceId")
- def requestAction = execution.getVariable("requestAction")
- def networkId = (execution.getVariable("networkId")) != null ? execution.getVariable("networkId") : ""
-
- def jsonSlurper = new JsonSlurper()
- try {
- Map reqMap = jsonSlurper.parseText(networkJsonIncoming)
- def instanceName = reqMap.requestDetails.requestInfo.instanceName
- def modelName = reqMap.requestDetails.modelInfo.modelName
- def lcpCloudRegionId = reqMap.requestDetails.cloudConfiguration.lcpCloudRegionId
- def tenantId = reqMap.requestDetails.cloudConfiguration.tenantId
- def serviceId = reqMap.requestDetails.requestInfo.productFamilyId
- def backoutOnFailure = reqMap.requestDetails.requestInfo.suppressRollback
-
- //def userParams = reqMap.requestDetails.requestParameters.userParams
- //def userParamsNode = buildUserParams(userParams)
- def userParams = reqMap.requestDetails?.requestParameters?.userParams
- def userParamsNode = ''
- if(userParams != null) {
- userParamsNode = buildUserParams(userParams)
- }
-
- def xmlReq = """
- <network-request xmlns="http://www.w3.org/2001/XMLSchema">
- <request-info>
- <request-id>${requestId}</request-id>
- <action>${requestAction}</action>
- <source>VID</source>
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- </request-info>
- <network-inputs>
- <network-id>${networkId}</network-id>
- <network-name>${instanceName}</network-name>
- <network-type>${modelName}</network-type>
- <aic-cloud-region>${lcpCloudRegionId}</aic-cloud-region>
- <tenant-id>${tenantId}</tenant-id>
- <service-id>${serviceId}</service-id>
- <backout-on-failure>${backoutOnFailure}</backout-on-failure>
- </network-inputs>
- <network-params>
- ${userParamsNode}
- </network-params>
- </network-request>
- """
- // return a pretty-print of the volume-request xml without the preamble
- return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
-
- } catch(Exception e) {
- throw e
- }
- }
-
- /**
- * Create a vnf-request XML using a map
- * @param requestMap - map created from VID JSON
- * @param action
- * @return
- */
- public String createXmlVfModuleRequest(execution, Map requestMap, String action, String serviceInstanceId) {
-
- //def relatedInstanceList = requestMap.requestDetails.relatedInstanceList
-
- //relatedInstanceList.each {
- // if (it.relatedInstance.modelInfo.modelType == 'vnf') {
- // vnfType = it.relatedInstance.modelInfo.modelName
- // vnfId = it.relatedInstance.modelInfo.modelInvariantId
- // }
- //}
-
- def vnfName = ''
- def asdcServiceModelInfo = ''
-
- def relatedInstanceList = requestMap.requestDetails?.relatedInstanceList
-
-
- if (relatedInstanceList != null) {
- relatedInstanceList.each {
- if (it.relatedInstance.modelInfo?.modelType == 'service') {
- asdcServiceModelInfo = it.relatedInstance.modelInfo?.modelVersion
- }
- if (it.relatedInstance.modelInfo.modelType == 'vnf') {
- vnfName = it.relatedInstance.instanceName ?: ''
- }
- }
- }
-
- def vnfType = execution.getVariable('vnfType')
- def vnfId = execution.getVariable('vnfId')
-
- def vfModuleId = execution.getVariable('vfModuleId')
- def volumeGroupId = execution.getVariable('volumeGroupId')
- def userParams = requestMap.requestDetails?.requestParameters?.userParams
-
-
- def userParamsNode = ''
- if(userParams != null) {
- userParamsNode = buildUserParams(userParams)
- }
-
- def isBaseVfModule = "false"
- if (execution.getVariable('isBaseVfModule') == true) {
- isBaseVfModule = "true"
- }
-
- def requestId = execution.getVariable("att-mso-request-id")
- def vfModuleName = requestMap.requestDetails?.requestInfo?.instanceName ?: ''
- def vfModuleModelName = requestMap.requestDetails?.modelInfo?.modelName ?: ''
- def suppressRollback = requestMap.requestDetails?.requestInfo?.suppressRollback
- def backoutOnFailure = "true"
- if(suppressRollback != null && suppressRollback == true) {
- backoutOnFailure = "false"
- }
-
- def serviceId = requestMap.requestDetails?.requestParameters?.serviceId ?: ''
- def aicCloudRegion = requestMap.requestDetails?.cloudConfiguration?.lcpCloudRegionId ?: ''
- def tenantId = requestMap.requestDetails?.cloudConfiguration?.tenantId ?: ''
- def personaModelId = requestMap.requestDetails?.modelInfo?.modelInvariantId ?: ''
- def personaModelVersion = requestMap.requestDetails?.modelInfo?.modelVersion ?: ''
-
- def xmlReq = """
- <vnf-request>
- <request-info>
- <request-id>${requestId}</request-id>
- <action>${action}</action>
- <source>VID</source>
- <!-- new 1610 field -->
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- </request-info>
- <vnf-inputs>
- <!-- not in use in 1610 -->
- <vnf-name>${vnfName}</vnf-name>
- <vnf-type>${vnfType}</vnf-type>
- <vnf-id>${vnfId}</vnf-id>
- <volume-group-id>${volumeGroupId}</volume-group-id>
- <vf-module-id>${vfModuleId}</vf-module-id>
- <vf-module-name>${vfModuleName}</vf-module-name>
- <vf-module-model-name>${vfModuleModelName}</vf-module-model-name>
- <is-base-vf-module>${isBaseVfModule}</is-base-vf-module>
- <asdc-service-model-version>${asdcServiceModelInfo}</asdc-service-model-version>
- <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
- <tenant-id>${tenantId}</tenant-id>
- <service-id>${serviceId}</service-id>
- <backout-on-failure>${backoutOnFailure}</backout-on-failure>
- <persona-model-id>${personaModelId}</persona-model-id>
- <persona-model-version>${personaModelVersion}</persona-model-version>
- </vnf-inputs>
- <vnf-params>
- $userParamsNode
- </vnf-params>
- </vnf-request>
- """
-
- // return a pretty-print of the volume-request xml without the preamble
- return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import groovy.json.JsonBuilder
+import groovy.json.JsonSlurper
+
+import org.json.JSONObject
+import org.json.XML
+import org.openecomp.mso.bpmn.core.xml.XmlTool
+
+class VidUtils {
+
+ public MsoUtils utils = new MsoUtils()
+ private AbstractServiceTaskProcessor taskProcessor
+
+ public VidUtils(AbstractServiceTaskProcessor taskProcessor) {
+ this.taskProcessor = taskProcessor
+ }
+
+ /**
+ * Create a volume-request XML using a JSON string
+ * @param jsonReq - JSON request from VID
+ * @param action
+ * @return
+ */
+ public String createXmlVolumeRequest(String jsonReq, String action, String serviceInstanceId) {
+ def jsonSlurper = new JsonSlurper()
+ try{
+ Map reqMap = jsonSlurper.parseText(jsonReq)
+ return createXmlVolumeRequest(reqMap, action, serviceInstanceId)
+ }
+ catch(Exception e) {
+ throw e
+ }
+ }
+
+ /**
+ * Create a volume-request XML using a map
+ * @param requestMap - map created from VID JSON
+ * @param action
+ * @param serviceInstanceId
+ * @return
+ */
+ public String createXmlVolumeRequest(Map requestMap, String action, String serviceInstanceId) {
+ createXmlVolumeRequest(requestMap, action, serviceInstanceId, '')
+ }
+
+
+ /**
+ * Create a volume-request XML using a map
+ * @param requestMap
+ * @param action
+ * @param serviceInstanceId
+ * @param volumeGroupId
+ * @return
+ */
+ public String createXmlVolumeRequest(Map requestMap, String action, String serviceInstanceId, String volumeGroupId) {
+ def vnfType = ''
+ def serviceName = ''
+ def modelCustomizationName = ''
+ def asdcServiceModelVersion = ''
+
+ def suppressRollback = requestMap.requestDetails.requestInfo.suppressRollback
+
+ def backoutOnFailure = ""
+ if(suppressRollback != null){
+ if ( suppressRollback == true) {
+ backoutOnFailure = "false"
+ } else if ( suppressRollback == false) {
+ backoutOnFailure = "true"
+ }
+ }
+
+ def volGrpName = requestMap.requestDetails.requestInfo?.instanceName ?: ''
+ def serviceId = requestMap.requestDetails.requestParameters?.serviceId ?: ''
+ 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
+ }
+ }
+
+ vnfType = serviceName + '/' + modelCustomizationName
+
+ def userParams = requestMap.requestDetails?.requestParameters?.userParams
+ def userParamsNode = ''
+ if(userParams != null) {
+ userParamsNode = buildUserParams(userParams)
+ }
+ def modelCustomizationId = requestMap.requestDetails?.modelInfo?.modelCustomizationId ?: ''
+
+ def xmlReq = """
+ <volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>${action}</action>
+ <source>${requestMap.requestDetails.requestInfo.source}</source>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ </request-info>
+ <volume-inputs>
+ <volume-group-id>${volumeGroupId}</volume-group-id>
+ <volume-group-name>${volGrpName}</volume-group-name>
+ <vnf-type>${vnfType}</vnf-type>
+ <vf-module-model-name>${requestMap.requestDetails.modelInfo.modelName}</vf-module-model-name>
+ <asdc-service-model-version>${asdcServiceModelVersion}</asdc-service-model-version>
+ <aic-cloud-region>${requestMap.requestDetails.cloudConfiguration.lcpCloudRegionId}</aic-cloud-region>
+ <tenant-id>${requestMap.requestDetails.cloudConfiguration.tenantId}</tenant-id>
+ <service-id>${serviceId}</service-id>
+ <backout-on-failure>${backoutOnFailure}</backout-on-failure>
+ <model-customization-id>${modelCustomizationId}</model-customization-id>
+ </volume-inputs>
+ <volume-params>
+ $userParamsNode
+ </volume-params>
+ </volume-request>
+ """
+ // return a pretty-print of the volume-request xml without the preamble
+ return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
+ }
+
+ /**
+ * A common method that can be used to build volume-params node from a map.
+ * @param Map userParams
+ * @return
+ */
+ public String buildUserParams(userParams) {
+ if (userParams == null) return ""
+ def xml = ""
+ def key = ""
+ def value = ""
+ userParams.each {it ->
+ key = it.name.replaceAll(/\B[A-Z]/) { '_' + it }.toLowerCase()
+ value = it.value
+ xml += "<param name=\"${key}\">${value}</param>"
+ }
+
+ return xml
+ }
+
+ /**
+ * A common method that can be used to extract 'requestDetails'
+ * @param String json
+ * @return String json requestDetails
+ */
+ @Deprecated
+ public getJsonRequestDetails(String jsonInput) {
+ String rtn = ""
+ if (jsonInput.isEmpty() || jsonInput == null) {
+ return rtn
+ } else {
+ def jsonMapObject = new JsonSlurper().parseText(jsonInput)
+ if (jsonMapObject instanceof Map) {
+ String jsonString = new JsonBuilder(jsonMapObject.requestDetails)
+ rtn = '{'+"requestDetails"+":"+jsonString+'}'
+ return rtn
+ } else {
+ return rtn
+ }
+ }
+ }
+
+ /**
+ * A common method that can be used to extract 'requestDetails' in Xml
+ * @param String json
+ * @return String xml requestDetails
+ */
+ @Deprecated
+ public getJsonRequestDetailstoXml(String jsonInput) {
+ String rtn = null
+ def jsonString = getJsonRequestDetails(jsonInput)
+ if (jsonString == null) {
+ return rtn
+ } else {
+ JSONObject jsonObj = new JSONObject(jsonString)
+ return XmlTool.normalize(XML.toString(jsonObj))
+ }
+ }
+
+ /**
+ * Create a network-request XML using a map
+ * @param execution
+ * @param xmlRequestDetails - requestDetails in xml
+ * @return
+ * Note: See latest version: createXmlNetworkRequestInstance()
+ */
+ public String createXmlNetworkRequestInfra(execution, def networkJsonIncoming) {
+
+ def requestId = execution.getVariable("requestId")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ def requestAction = execution.getVariable("requestAction")
+ def networkId = (execution.getVariable("networkId")) != null ? execution.getVariable("networkId") : ""
+
+ def jsonSlurper = new JsonSlurper()
+ try {
+ Map reqMap = jsonSlurper.parseText(networkJsonIncoming)
+ def instanceName = reqMap.requestDetails.requestInfo.instanceName
+ def modelName = reqMap.requestDetails.modelInfo.modelName
+ def lcpCloudRegionId = reqMap.requestDetails.cloudConfiguration.lcpCloudRegionId
+ def tenantId = reqMap.requestDetails.cloudConfiguration.tenantId
+ def serviceId = reqMap.requestDetails.requestInfo.productFamilyId
+ def suppressRollback = reqMap.requestDetails.requestInfo.suppressRollback.toString()
+ def backoutOnFailure = "true"
+ if(suppressRollback != null){
+ if (suppressRollback == true || suppressRollback == "true") {
+ backoutOnFailure = "false"
+ } else if (suppressRollback == false || suppressRollback == "false") {
+ backoutOnFailure = "true"
+ }
+ }
+
+ //def userParams = reqMap.requestDetails.requestParameters.userParams
+ //def userParamsNode = buildUserParams(userParams)
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+ def userParamsNode = ''
+ if(userParams != null) {
+ userParamsNode = buildUserParams(userParams)
+ }
+
+ //'sdncVersion' = current, '1610' (non-RPC SDNC) or '1702' (RPC SDNC)
+ def sdncVersion = execution.getVariable("sdncVersion")
+
+ def xmlReq = """
+ <network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>${requestAction}</action>
+ <source>VID</source>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>${networkId}</network-id>
+ <network-name>${instanceName}</network-name>
+ <network-type>${modelName}</network-type>
+ <aic-cloud-region>${lcpCloudRegionId}</aic-cloud-region>
+ <tenant-id>${tenantId}</tenant-id>
+ <service-id>${serviceId}</service-id>
+ <backout-on-failure>${backoutOnFailure}</backout-on-failure>
+ <sdncVersion>${sdncVersion}</sdncVersion>
+ </network-inputs>
+ <network-params>
+ ${userParamsNode}
+ </network-params>
+ </network-request>
+ """
+ // return a pretty-print of the volume-request xml without the preamble
+ return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
+
+ } catch(Exception e) {
+ throw e
+ }
+ }
+
+ /**
+ * Create a network-request XML using a map,
+ * @param execution
+ * @return
+ */
+ public String createXmlNetworkRequestInstance(execution) {
+
+ def networkModelVersionId = ""
+ def networkModelName = ""
+ def networkModelType = ""
+ def networkModelVersion = ""
+ def networkModelCustomizationId = ""
+ def networkModelInvariantId = ""
+
+ // verify the DB Catalog response JSON structure
+ def networkModelInfo = execution.getVariable("networkModelInfo")
+ def jsonSlurper = new JsonSlurper()
+ if (networkModelInfo != null) {
+ try {
+ Map modelMap = jsonSlurper.parseText(networkModelInfo)
+ if (modelMap != null) {
+ if (networkModelInfo.contains("modelVersionId")) {
+ networkModelVersionId = modelMap.modelVersionId !=null ? modelMap.modelVersionId : ""
+ }
+ if (networkModelInfo.contains("modelName")) {
+ networkModelName = modelMap.modelName !=null ? modelMap.modelName : ""
+ }
+ if (networkModelInfo.contains("modelType")) {
+ networkModelType = modelMap.modelType !=null ? modelMap.modelType : ""
+ }
+ if (networkModelInfo.contains("modelVersion")) {
+ networkModelVersion = modelMap.modelVersion !=null ? modelMap.modelVersion : ""
+ }
+ if (networkModelInfo.contains("modelCustomizationId")) {
+ networkModelCustomizationId = modelMap.modelCustomizationId !=null ? modelMap.modelCustomizationId : ""
+ }
+ if (networkModelInfo.contains("modelInvariantId")) {
+ networkModelInvariantId = modelMap.modelInvariantId !=null ? modelMap.modelInvariantId : ""
+ }
+ }
+ } catch (Exception ex) {
+ throw ex
+ }
+ }
+
+ def serviceModelVersionId = ""
+ def serviceModelName = ""
+ def serviceModelType = ""
+ def serviceModelVersion = ""
+ def serviceModelCustomizationId = ""
+ def serviceModelInvariantId = ""
+
+ // verify the DB Catalog response JSON structure
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ def jsonServiceSlurper = new JsonSlurper()
+ if (serviceModelInfo != null) {
+ try {
+ Map modelMap = jsonServiceSlurper.parseText(serviceModelInfo)
+ if (modelMap != null) {
+ if (serviceModelInfo.contains("modelVersionId")) {
+ serviceModelVersionId = modelMap.modelVersionId !=null ? modelMap.modelVersionId : ""
+ }
+ if (serviceModelInfo.contains("modelName")) {
+ serviceModelName = modelMap.modelName !=null ? modelMap.modelName : ""
+ }
+ if (serviceModelInfo.contains("modelType")) {
+ serviceModelType = modelMap.modelType !=null ? modelMap.modelType : ""
+ }
+ if (serviceModelInfo.contains("modelVersion")) {
+ serviceModelVersion = modelMap.modelVersion !=null ? modelMap.modelVersion : ""
+ }
+ if (serviceModelInfo.contains("modelCustomizationId")) {
+ serviceModelCustomizationId = modelMap.modelCustomizationId !=null ? modelMap.modelCustomizationId : ""
+ }
+ if (serviceModelInfo.contains("modelInvariantId")) {
+ serviceModelInvariantId = modelMap.modelInvariantId !=null ? modelMap.modelInvariantId : ""
+ }
+ }
+ } catch (Exception ex) {
+ throw ex
+ }
+ }
+
+
+ def subscriptionServiceType = execution.getVariable("subscriptionServiceType") != null ? execution.getVariable("subscriptionServiceType") : ""
+ def globalSubscriberId = execution.getVariable("globalSubscriberId") != null ? execution.getVariable("globalSubscriberId") : ""
+ def requestId = execution.getVariable("msoRequestId")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId") != null ? execution.getVariable("serviceInstanceId") : ""
+ def networkId = (execution.getVariable("networkId")) != null ? execution.getVariable("networkId") : "" // optional
+ def networkName = execution.getVariable("networkName") != null ? execution.getVariable("networkName") : "" // optional
+ def aicCloudReqion = execution.getVariable("lcpCloudRegionId") != null ? execution.getVariable("lcpCloudRegionId") : ""
+ def tenantId = execution.getVariable("tenantId") != null ? execution.getVariable("tenantId") : ""
+ def serviceId = execution.getVariable("productFamilyId") != null ? execution.getVariable("productFamilyId") : ""
+ def failIfExist = execution.getVariable("failIfExists") != null ? execution.getVariable("failIfExists") : ""
+ def suppressRollback = execution.getVariable("disableRollback")
+ def backoutOnFailure = "true"
+ if(suppressRollback != null){
+ if (suppressRollback == true || suppressRollback == "true") {
+ backoutOnFailure = "false"
+ } else if (suppressRollback == false || suppressRollback == "false") {
+ backoutOnFailure = "true"
+ }
+ }
+
+ //'sdncVersion' = current, '1610' (non-RPC SDNC) or '1702' (RPC SDNC)
+ def sdncVersion = execution.getVariable("sdncVersion")
+
+ def source = "VID"
+ def action = execution.getVariable("action")
+
+ def userParamsNode = ""
+ def userParams = execution.getVariable("networkInputParams")
+ if(userParams != null) {
+ userParamsNode = buildUserParams(userParams)
+ }
+
+ def xmlReq = """
+ <network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>${action}</action>
+ <source>${source}</source>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>${networkId}</network-id>
+ <network-name>${networkName}</network-name>
+ <network-type>${networkModelType}</network-type>
+ <subscription-service-type>${subscriptionServiceType}</subscription-service-type>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ <aic-cloud-region>${aicCloudReqion}</aic-cloud-region>
+ <tenant-id>${tenantId}</tenant-id>
+ <service-id>${serviceId}</service-id>
+ <backout-on-failure>${backoutOnFailure}</backout-on-failure>
+ <failIfExist>${failIfExist}</failIfExist>
+ <networkModelInfo>
+ <modelName>${networkModelName}</modelName>
+ <modelUuid>${networkModelVersionId}</modelUuid>
+ <modelInvariantUuid>${networkModelInvariantId}</modelInvariantUuid>
+ <modelVersion>${networkModelVersion}</modelVersion>
+ <modelCustomizationUuid>${networkModelCustomizationId}</modelCustomizationUuid>
+ <modelType>${networkModelType}</modelType>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName>${serviceModelName}</modelName>
+ <modelUuid>${serviceModelVersionId}</modelUuid>
+ <modelInvariantUuid>${serviceModelInvariantId}</modelInvariantUuid>
+ <modelVersion>${serviceModelVersion}</modelVersion>
+ <modelCustomizationUuid>${serviceModelCustomizationId}</modelCustomizationUuid>
+ <modelType>${serviceModelType}</modelType>
+ </serviceModelInfo>
+ <sdncVersion>${sdncVersion}</sdncVersion>
+ </network-inputs>
+ <network-params>
+ ${userParamsNode}
+ </network-params>
+ </network-request>
+ """
+ // return a pretty-print of the volume-request xml without the preamble
+ return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
+
+ }
+
+ /**
+ * Create a vnf-request XML using a map
+ * @param requestMap - map created from VID JSON
+ * @param action
+ * @return
+ */
+ public String createXmlVfModuleRequest(execution, Map requestMap, String action, String serviceInstanceId) {
+
+ //def relatedInstanceList = requestMap.requestDetails.relatedInstanceList
+
+ //relatedInstanceList.each {
+ // if (it.relatedInstance.modelInfo.modelType == 'vnf') {
+ // vnfType = it.relatedInstance.modelInfo.modelName
+ // vnfId = it.relatedInstance.modelInfo.modelInvariantId
+ // }
+ //}
+
+ def vnfName = ''
+ def asdcServiceModelInfo = ''
+
+ def relatedInstanceList = requestMap.requestDetails?.relatedInstanceList
+
+
+ if (relatedInstanceList != null) {
+ relatedInstanceList.each {
+ if (it.relatedInstance.modelInfo?.modelType == 'service') {
+ asdcServiceModelInfo = it.relatedInstance.modelInfo?.modelVersion
+ }
+ if (it.relatedInstance.modelInfo.modelType == 'vnf') {
+ vnfName = it.relatedInstance.instanceName ?: ''
+ }
+ }
+ }
+
+ def vnfType = execution.getVariable('vnfType')
+ def vnfId = execution.getVariable('vnfId')
+
+ def vfModuleId = execution.getVariable('vfModuleId')
+ def volumeGroupId = execution.getVariable('volumeGroupId')
+ def userParams = requestMap.requestDetails?.requestParameters?.userParams
+
+
+ def userParamsNode = ''
+ if(userParams != null) {
+ userParamsNode = buildUserParams(userParams)
+ }
+
+ def isBaseVfModule = "false"
+ if (execution.getVariable('isBaseVfModule') == true) {
+ isBaseVfModule = "true"
+ }
+
+ def requestId = execution.getVariable("mso-request-id")
+ def vfModuleName = requestMap.requestDetails?.requestInfo?.instanceName ?: ''
+ def vfModuleModelName = requestMap.requestDetails?.modelInfo?.modelName ?: ''
+ def suppressRollback = requestMap.requestDetails?.requestInfo?.suppressRollback
+
+ def backoutOnFailure = ""
+ if(suppressRollback != null){
+ if ( suppressRollback == true) {
+ backoutOnFailure = "false"
+ } else if ( suppressRollback == false) {
+ backoutOnFailure = "true"
+ }
+ }
+
+ def serviceId = requestMap.requestDetails?.requestParameters?.serviceId ?: ''
+ def aicCloudRegion = requestMap.requestDetails?.cloudConfiguration?.lcpCloudRegionId ?: ''
+ def tenantId = requestMap.requestDetails?.cloudConfiguration?.tenantId ?: ''
+ def personaModelId = requestMap.requestDetails?.modelInfo?.modelInvariantId ?: ''
+ def personaModelVersion = requestMap.requestDetails?.modelInfo?.modelVersion ?: ''
+ def modelCustomizationId = requestMap.requestDetails?.modelInfo?.modelCustomizationId ?: ''
+
+ def xmlReq = """
+ <vnf-request>
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>${action}</action>
+ <source>VID</source>
+ <!-- new 1610 field -->
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ </request-info>
+ <vnf-inputs>
+ <!-- not in use in 1610 -->
+ <vnf-name>${vnfName}</vnf-name>
+ <vnf-type>${vnfType}</vnf-type>
+ <vnf-id>${vnfId}</vnf-id>
+ <volume-group-id>${volumeGroupId}</volume-group-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <vf-module-name>${vfModuleName}</vf-module-name>
+ <vf-module-model-name>${vfModuleModelName}</vf-module-model-name>
+ <model-customization-id>${modelCustomizationId}</model-customization-id>
+ <is-base-vf-module>${isBaseVfModule}</is-base-vf-module>
+ <asdc-service-model-version>${asdcServiceModelInfo}</asdc-service-model-version>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ <tenant-id>${tenantId}</tenant-id>
+ <service-id>${serviceId}</service-id>
+ <backout-on-failure>${backoutOnFailure}</backout-on-failure>
+ <persona-model-id>${personaModelId}</persona-model-id>
+ <persona-model-version>${personaModelVersion}</persona-model-version>
+ </vnf-inputs>
+ <vnf-params>
+ $userParamsNode
+ </vnf-params>
+ </vnf-request>
+ """
+
+ // return a pretty-print of the volume-request xml without the preamble
+ return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VnfAdapterRestV1.groovy
index f952bee165..0ec9c93862 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VnfAdapterRestV1.groovy
@@ -1,417 +1,404 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.xml.XmlUtil
-
-import java.text.SimpleDateFormat
-import java.net.URLEncoder
-
-import org.apache.commons.codec.binary.Base64
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- // VNF Response Processing
- public void preProcessRequest (Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- def prefix="VNFREST_"
- execution.setVariable("prefix", prefix)
- setSuccessIndicator(execution, false)
-
- try {
- String request = validateRequest(execution, "att-mso-request-id")
-
- // Get the request type (the name of the root element) from the request
-
- Node root = new XmlParser().parseText(request)
- String requestType = root.name()
- execution.setVariable(prefix + 'requestType', requestType)
- logDebug(getProcessKey(execution) + ': ' + prefix + 'requestType = ' + requestType, isDebugLogEnabled)
-
- utils.logAudit('VnfAdapterRestV1, request: ' + request)
- // Get the messageId from the request
-
- String messageId = getChildText(root, 'messageId')
-
- if (messageId == null || messageId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no messageId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- execution.setVariable(prefix + 'messageId', messageId)
- logDebug(getProcessKey(execution) + ': ' + prefix + 'messageId = ' + messageId, isDebugLogEnabled)
-
- // Get the notificationUrl from the request
-
- String notificationUrl = getChildText(root, 'notificationUrl')
-
- if (notificationUrl == null || notificationUrl.isEmpty()) {
- String msg = getProcessKey(execution) + ': no notificationUrl in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- execution.setVariable(prefix + 'notificationUrl', notificationUrl)
- logDebug(getProcessKey(execution) + ': ' + prefix + 'notificationUrl = ' + notificationUrl, isDebugLogEnabled)
-
- // Determine the VnfAdapter endpoint
-
- String vnfAdapterEndpoint = execution.getVariable("URN_mso_adapters_vnf_rest_endpoint")
-
- if (vnfAdapterEndpoint == null || vnfAdapterEndpoint.isEmpty()) {
- String msg = getProcessKey(execution) + ': mso:adapters:vnf:rest:endpoint URN mapping is not defined'
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- while (vnfAdapterEndpoint.endsWith('/')) {
- vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, vnfAdapterEndpoint.length()-1)
- }
-
- String vnfAdapterMethod = null
- String vnfAdapterUrl = null
- String vnfAdapterRequest = request
-
- if ('createVfModuleRequest'.equals(requestType)) {
- String vnfId = getChildText(root, 'vnfId')
-
- if (vnfId == null || vnfId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- vnfAdapterMethod = 'POST'
- vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') + '/vf-modules'
-
- } else if ('updateVfModuleRequest'.equals(requestType)) {
- String vnfId = getChildText(root, 'vnfId')
-
- if (vnfId == null || vnfId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- String vfModuleId = getChildText(root, 'vfModuleId')
-
- if (vfModuleId == null || vfModuleId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- vnfAdapterMethod = 'PUT'
- vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
- '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8')
-
- } else if ('deleteVfModuleRequest'.equals(requestType)) {
- String vnfId = getChildText(root, 'vnfId')
-
- if (vnfId == null || vnfId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- String vfModuleId = getChildText(root, 'vfModuleId')
-
- if (vfModuleId == null || vfModuleId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- vnfAdapterMethod = 'DELETE'
- vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
- '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8')
-
- } else if ('rollbackVfModuleRequest'.equals(requestType)) {
- Node vfModuleRollbackNode = getChild(root, 'vfModuleRollback')
-
- if (vfModuleRollbackNode == null) {
- String msg = getProcessKey(execution) + ': no vfModuleRollback in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- String vnfId = getChildText(vfModuleRollbackNode, 'vnfId')
-
- if (vnfId == null || vnfId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- String vfModuleId = getChildText(vfModuleRollbackNode, 'vfModuleId')
-
- if (vfModuleId == null || vfModuleId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- vnfAdapterMethod = 'DELETE'
- vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
- '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8') + '/rollback'
-
- } else if ('createVolumeGroupRequest'.equals(requestType)) {
- vnfAdapterMethod = 'POST'
- if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
- vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
- }
- vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups'
-
- } else if ('updateVolumeGroupRequest'.equals(requestType)) {
- String volumeGroupId = getChildText(root, 'volumeGroupId')
-
- if (volumeGroupId == null || volumeGroupId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- vnfAdapterMethod = 'PUT'
- if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
- vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
- }
- vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')
-
- } else if ('deleteVolumeGroupRequest'.equals(requestType)) {
- String volumeGroupId = getChildText(root, 'volumeGroupId')
-
- if (volumeGroupId == null || volumeGroupId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- vnfAdapterMethod = 'DELETE'
- if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
- vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
- }
- vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')
-
- } else if ('rollbackVolumeGroupRequest'.equals(requestType)) {
- String volumeGroupId = getChildText(root, 'volumeGroupId')
-
- if (volumeGroupId == null || volumeGroupId.isEmpty()) {
- String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
- logError(msg)
- createWorkflowException(execution, 2000, msg)
- }
-
- vnfAdapterMethod = 'DELETE'
- if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
- vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
- }
- vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8') + '/rollback'
-
- } else {
- String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- execution.setVariable(prefix + 'vnfAdapterMethod', vnfAdapterMethod)
- logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterMethod = ' + vnfAdapterMethod, isDebugLogEnabled)
- execution.setVariable(prefix + 'vnfAdapterUrl', vnfAdapterUrl)
- logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterUrl = ' + vnfAdapterUrl, isDebugLogEnabled)
- execution.setVariable(prefix + 'vnfAdapterRequest', vnfAdapterRequest)
- logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterRequest = \n' + vnfAdapterRequest, isDebugLogEnabled)
-
- // Get the Basic Auth credentials for the VnfAdapter
-
- String basicAuthValue = execution.getVariable("URN_mso_adapters_po_auth")
-
- if (basicAuthValue == null || basicAuthValue.isEmpty()) {
- logError(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
- } else {
- logDebug(getProcessKey(execution) + ": Obtained BasicAuth credentials for VnfAdapter:" +
- basicAuthValue, isDebugLogEnabled)
- try {
- def encodedString = utils.getBasicAuth(basicAuthValue, execution.getVariable("URN_mso_msoKey"))
- execution.setVariable(prefix + 'basicAuthHeaderValue', encodedString)
- } catch (IOException ex) {
- logError(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for VnfAdapter")
- }
- }
-
- } catch (BpmnError e) {
- logDebug(" Rethrowing MSOWorkflowException", isDebugLogEnabled)
- throw e
- } catch (Exception e) {
- String msg = 'Caught exception in ' + method + ": " + e
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
- }
-
- /**
- * This method is used instead of an HTTP Connector task because the
- * connector does not allow DELETE with a body.
- */
- public void sendRequestToVnfAdapter(Execution execution) {
- def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- String prefix = execution.getVariable('prefix')
-
- try {
- String vnfAdapterMethod = execution.getVariable(prefix + 'vnfAdapterMethod')
- String vnfAdapterUrl = execution.getVariable(prefix + 'vnfAdapterUrl')
- String vnfAdapterRequest = execution.getVariable(prefix + 'vnfAdapterRequest')
-
- RESTConfig config = new RESTConfig(vnfAdapterUrl)
- RESTClient client = new RESTClient(config).
- addHeader("Content-Type", "application/xml").
- addAuthorizationHeader(execution.getVariable(prefix + "basicAuthHeaderValue"));
-
- APIResponse response;
-
- if ("GET".equals(vnfAdapterMethod)) {
- response = client.httpGet()
- } else if ("PUT".equals(vnfAdapterMethod)) {
- response = client.httpPut(vnfAdapterRequest)
- } else if ("POST".equals(vnfAdapterMethod)) {
- response = client.httpPost(vnfAdapterRequest)
- } else if ("DELETE".equals(vnfAdapterMethod)) {
- response = client.httpDelete(vnfAdapterRequest)
- } else {
- String msg = 'Unsupported HTTP method "' + vnfAdapterMethod + '" in ' + method + ": " + e
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
-
- execution.setVariable(prefix + "vnfAdapterStatusCode", response.getStatusCode())
- execution.setVariable(prefix + "vnfAdapterResponse", response.getResponseBodyAsString())
- } catch (BpmnError e) {
- throw e
- } catch (Exception e) {
- String msg = 'Caught exception in ' + method + ": " + e
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
- }
-
- public void processCallback(Execution execution){
- def method = getClass().getSimpleName() + '.processCallback(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- String prefix = execution.getVariable('prefix')
- String callback = execution.getVariable(prefix + 'callback')
-
- try {
- logDebug(getProcessKey(execution) + ": received callback:\n" + callback, isDebugLogEnabled)
-
- Node root = new XmlParser().parseText(callback)
- if (root.name().endsWith('Exception')) {
- vnfAdapterWorkflowException(execution, callback)
- }
-
- // The XML callback is available to the calling flow in any case,
- // even if a WorkflowException was generated.
- execution.setVariable(getProcessKey(execution) + 'Response', callback)
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead.
- execution.setVariable("WorkflowResponse", callback)
- } catch(BpmnError b){
- throw b
- } catch (Exception e) {
- e.printStackTrace()
- callback = callback == null || String.valueOf(callback).isEmpty() ? "NONE" : callback
- String msg = "Received error from VnfAdapter: " + callback
- logDebug(getProcessKey(execution) + ': ' + msg, isDebugLogEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7020, msg)
- }
- }
-
- /**
- * Tries to parse the response as XML to extract the information to create
- * a WorkflowException. If the response cannot be parsed, a more generic
- * WorkflowException is created.
- */
- public void vnfAdapterWorkflowException(Execution execution, Object response) {
- try {
- Node root = new XmlParser().parseText(response)
- String category = getChildText(root, "category")
- category = category == null || category.isEmpty() ? "" : " category='" + category + "'"
- String message = getChildText(root, "message")
- message = message == null || message.isEmpty() ? "" : " message='" + message + "'"
- String rolledBack = getChildText(root, "rolledBack")
- rolledBack = rolledBack == null || rolledBack.isEmpty() ? "" : " rolledBack='" + rolledBack + "'"
- exceptionUtil.buildAndThrowWorkflowException(execution, 7020, "Received " + root.name() +
- " from VnfAdapter:" + category + message + rolledBack);
- }catch(BpmnError b){
- throw b
- }catch (Exception e) {
- response = response == null || String.valueOf(response).isEmpty() ? "NONE" : response
- exceptionUtil.buildAndThrowWorkflowException(execution, 7020, "Received error from VnfAdapter: " + response)
- }
- }
-
- /**
- * Gets the named child of the specified node.
- * @param node the node
- * @param name the child name
- * @return the child node, or null if no such child exists
- */
- private Node getChild(Node node, String name) {
- for (Node child : node.children()) {
- if (child.name() == name) {
- return child
- }
- }
- return null
- }
-
- /**
- * Gets the text of the named child of the specified node.
- * @param node the node
- * @param name the child name
- * @return the child node text, or null if no such child exists
- */
- private String getChildText(Node node, String name) {
- Node child = getChild(node, name)
- return child == null ? null : child.text()
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ // VNF Response Processing
+ public void preProcessRequest (Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ def prefix="VNFREST_"
+ execution.setVariable("prefix", prefix)
+ setSuccessIndicator(execution, false)
+
+ try {
+ String request = validateRequest(execution, "mso-request-id")
+
+ // Get the request type (the name of the root element) from the request
+
+ Node root = new XmlParser().parseText(request)
+ String requestType = root.name()
+ execution.setVariable(prefix + 'requestType', requestType)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'requestType = ' + requestType, isDebugLogEnabled)
+
+ utils.logAudit('VnfAdapterRestV1, request: ' + request)
+ // Get the messageId from the request
+
+ String messageId = getChildText(root, 'messageId')
+
+ if (messageId == null || messageId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no messageId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ execution.setVariable('VNFAResponse_CORRELATOR', messageId)
+ logDebug(getProcessKey(execution) + ': VNFAResponse_CORRELATOR = ' + messageId, isDebugLogEnabled)
+
+ // Get the notificationUrl from the request
+
+ String notificationUrl = getChildText(root, 'notificationUrl')
+
+ if (notificationUrl == null || notificationUrl.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no notificationUrl in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ execution.setVariable(prefix + 'notificationUrl', notificationUrl)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'notificationUrl = ' + notificationUrl, isDebugLogEnabled)
+
+ // Determine the VnfAdapter endpoint
+
+ String vnfAdapterEndpoint = execution.getVariable("URN_mso_adapters_vnf_rest_endpoint")
+
+ if (vnfAdapterEndpoint == null || vnfAdapterEndpoint.isEmpty()) {
+ String msg = getProcessKey(execution) + ': mso:adapters:vnf:rest:endpoint URN mapping is not defined'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ while (vnfAdapterEndpoint.endsWith('/')) {
+ vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, vnfAdapterEndpoint.length()-1)
+ }
+
+ String vnfAdapterMethod = null
+ String vnfAdapterUrl = null
+ String vnfAdapterRequest = request
+
+ if ('createVfModuleRequest'.equals(requestType)) {
+ String vnfId = getChildText(root, 'vnfId')
+
+ if (vnfId == null || vnfId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ vnfAdapterMethod = 'POST'
+ vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') + '/vf-modules'
+
+ } else if ('updateVfModuleRequest'.equals(requestType)) {
+ String vnfId = getChildText(root, 'vnfId')
+
+ if (vnfId == null || vnfId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ String vfModuleId = getChildText(root, 'vfModuleId')
+
+ if (vfModuleId == null || vfModuleId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ vnfAdapterMethod = 'PUT'
+ vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
+ '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8')
+
+ } else if ('deleteVfModuleRequest'.equals(requestType)) {
+ String vnfId = getChildText(root, 'vnfId')
+
+ if (vnfId == null || vnfId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ String vfModuleId = getChildText(root, 'vfModuleId')
+
+ if (vfModuleId == null || vfModuleId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ vnfAdapterMethod = 'DELETE'
+ vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
+ '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8')
+
+ } else if ('rollbackVfModuleRequest'.equals(requestType)) {
+ Node vfModuleRollbackNode = getChild(root, 'vfModuleRollback')
+
+ if (vfModuleRollbackNode == null) {
+ String msg = getProcessKey(execution) + ': no vfModuleRollback in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ String vnfId = getChildText(vfModuleRollbackNode, 'vnfId')
+
+ if (vnfId == null || vnfId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ String vfModuleId = getChildText(vfModuleRollbackNode, 'vfModuleId')
+
+ if (vfModuleId == null || vfModuleId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ vnfAdapterMethod = 'DELETE'
+ vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
+ '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8') + '/rollback'
+
+ } else if ('createVolumeGroupRequest'.equals(requestType)) {
+ vnfAdapterMethod = 'POST'
+ if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+ vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+ }
+ vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups'
+
+ } else if ('updateVolumeGroupRequest'.equals(requestType)) {
+ String volumeGroupId = getChildText(root, 'volumeGroupId')
+
+ if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ vnfAdapterMethod = 'PUT'
+ if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+ vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+ }
+ vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')
+
+ } else if ('deleteVolumeGroupRequest'.equals(requestType)) {
+ String volumeGroupId = getChildText(root, 'volumeGroupId')
+
+ if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ vnfAdapterMethod = 'DELETE'
+ if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+ vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+ }
+ vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')
+
+ } else if ('rollbackVolumeGroupRequest'.equals(requestType)) {
+ String volumeGroupId = getChildText(root, 'volumeGroupId')
+
+ if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+ String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ vnfAdapterMethod = 'DELETE'
+ if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+ vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+ }
+ vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8') + '/rollback'
+
+ } else {
+ String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ execution.setVariable(prefix + 'vnfAdapterMethod', vnfAdapterMethod)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterMethod = ' + vnfAdapterMethod, isDebugLogEnabled)
+ execution.setVariable(prefix + 'vnfAdapterUrl', vnfAdapterUrl)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterUrl = ' + vnfAdapterUrl, isDebugLogEnabled)
+ execution.setVariable(prefix + 'vnfAdapterRequest', vnfAdapterRequest)
+ logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterRequest = \n' + vnfAdapterRequest, isDebugLogEnabled)
+
+ // Get the Basic Auth credentials for the VnfAdapter
+
+ String basicAuthValue = execution.getVariable("URN_mso_adapters_po_auth")
+
+ if (basicAuthValue == null || basicAuthValue.isEmpty()) {
+ logError(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
+ } else {
+ logDebug(getProcessKey(execution) + ": Obtained BasicAuth credentials for VnfAdapter:" +
+ basicAuthValue, isDebugLogEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValue, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable(prefix + 'basicAuthHeaderValue', encodedString)
+ } catch (IOException ex) {
+ logError(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for VnfAdapter")
+ }
+ }
+
+ } catch (BpmnError e) {
+ logDebug(" Rethrowing MSOWorkflowException", isDebugLogEnabled)
+ throw e
+ } catch (Exception e) {
+ String msg = 'Caught exception in ' + method + ": " + e
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ }
+
+ /**
+ * This method is used instead of an HTTP Connector task because the
+ * connector does not allow DELETE with a body.
+ */
+ public void sendRequestToVnfAdapter(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String prefix = execution.getVariable('prefix')
+
+ try {
+ String vnfAdapterMethod = execution.getVariable(prefix + 'vnfAdapterMethod')
+ String vnfAdapterUrl = execution.getVariable(prefix + 'vnfAdapterUrl')
+ String vnfAdapterRequest = execution.getVariable(prefix + 'vnfAdapterRequest')
+
+ RESTConfig config = new RESTConfig(vnfAdapterUrl)
+ RESTClient client = new RESTClient(config).
+ addHeader("Content-Type", "application/xml").
+ addAuthorizationHeader(execution.getVariable(prefix + "basicAuthHeaderValue"));
+
+ APIResponse response;
+
+ if ("GET".equals(vnfAdapterMethod)) {
+ response = client.httpGet()
+ } else if ("PUT".equals(vnfAdapterMethod)) {
+ response = client.httpPut(vnfAdapterRequest)
+ } else if ("POST".equals(vnfAdapterMethod)) {
+ response = client.httpPost(vnfAdapterRequest)
+ } else if ("DELETE".equals(vnfAdapterMethod)) {
+ response = client.httpDelete(vnfAdapterRequest)
+ } else {
+ String msg = 'Unsupported HTTP method "' + vnfAdapterMethod + '" in ' + method + ": " + e
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ execution.setVariable(prefix + "vnfAdapterStatusCode", response.getStatusCode())
+ execution.setVariable(prefix + "vnfAdapterResponse", response.getResponseBodyAsString())
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception e) {
+ String msg = 'Caught exception in ' + method + ": " + e
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ }
+
+ public void processCallback(Execution execution){
+ def method = getClass().getSimpleName() + '.processCallback(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String callback = execution.getVariable('VNFAResponse_MESSAGE')
+
+ try {
+ logDebug(getProcessKey(execution) + ": received callback:\n" + callback, isDebugLogEnabled)
+
+ // The XML callback is available to the calling flow in any case,
+ // even if a WorkflowException is generated.
+ execution.setVariable(getProcessKey(execution) + 'Response', callback)
+ // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead.
+ execution.setVariable("WorkflowResponse", callback)
+
+ Node root = new XmlParser().parseText(callback)
+ if (root.name().endsWith('Exception')) {
+ vnfAdapterWorkflowException(execution, callback)
+ }
+ } catch (Exception e) {
+ e.printStackTrace()
+ callback = callback == null || String.valueOf(callback).isEmpty() ? "NONE" : callback
+ String msg = "Received error from VnfAdapter: " + callback
+ logDebug(getProcessKey(execution) + ': ' + msg, isDebugLogEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7020, msg)
+ }
+ }
+
+ /**
+ * Tries to parse the response as XML to extract the information to create
+ * a WorkflowException. If the response cannot be parsed, a more generic
+ * WorkflowException is created.
+ */
+ public void vnfAdapterWorkflowException(Execution execution, Object response) {
+ try {
+ Node root = new XmlParser().parseText(response)
+ String category = getChildText(root, "category")
+ category = category == null || category.isEmpty() ? "" : " category='" + category + "'"
+ String message = getChildText(root, "message")
+ message = message == null || message.isEmpty() ? "" : " message='" + message + "'"
+ String rolledBack = getChildText(root, "rolledBack")
+ rolledBack = rolledBack == null || rolledBack.isEmpty() ? "" : " rolledBack='" + rolledBack + "'"
+ exceptionUtil.buildWorkflowException(execution, 7020, "Received " + root.name() +
+ " from VnfAdapter:" + category + message + rolledBack);
+ } catch (Exception e) {
+ response = response == null || String.valueOf(response).isEmpty() ? "NONE" : response
+ exceptionUtil.buildWorkflowException(execution, 7020, "Received error from VnfAdapter: " + response)
+ }
+ }
+
+ /**
+ * Gets the named child of the specified node.
+ * @param node the node
+ * @param name the child name
+ * @return the child node, or null if no such child exists
+ */
+ private Node getChild(Node node, String name) {
+ for (Node child : node.children()) {
+ if (child.name() == name) {
+ return child
+ }
+ }
+ return null
+ }
+
+ /**
+ * Gets the text of the named child of the specified node.
+ * @param node the node
+ * @param name the child name
+ * @return the child node text, or null if no such child exists
+ */
+ private String getChildText(Node node, String name) {
+ Node child = getChild(node, name)
+ return child == null ? null : child.text()
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VnfAdapterUtils.groovy
index e92af96484..82b67ce3bf 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/VnfAdapterUtils.groovy
@@ -1,67 +1,86 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-
-class VnfAdapterUtils {
-
- private AbstractServiceTaskProcessor taskProcessor
-
- public VnfAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
- this.taskProcessor = taskProcessor
- }
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- public void validateVnfResponse(Execution execution, String responseVar, String responseCodeVar, String errorResponseVar) {
- def method = getClass().getSimpleName() + '.validateVnfResponse(' +
- 'execution=' + execution.getId() +
- ', responseVar=' + responseVar +
- ', responseCodeVar=' + responseCodeVar +
- ', errorResponseVar=' + errorResponseVar +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def prefix = execution.getVariable('prefix')
-
- def response = execution.getVariable(responseVar)
- def responseCode = execution.getVariable(responseCodeVar)
- def errorResponse = execution.getVariable(errorResponseVar)
-
- if (response.contains("WorkflowException")) {
- execution.setVariable(prefix + "ErrorResponse", response)
- //execution.setVariable(prefix + "ResponseCode", responseCode)
- taskProcessor.logDebug(" Sub Vnf flow Error WorkflowException Response - " + "\n" + response, isDebugLogEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- taskProcessor.logError('Caught exception in ' + method, e)
- taskProcessor.workflowException(execution, 'Internal Error- Unable to validate VNF Response ' + e.getMessage(), 500)
- }
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+class VnfAdapterUtils {
+
+ private AbstractServiceTaskProcessor taskProcessor
+
+ public VnfAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
+ this.taskProcessor = taskProcessor
+ }
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void validateVnfResponse(Execution execution, String responseVar, String responseCodeVar, String errorResponseVar) {
+ def method = getClass().getSimpleName() + '.validateVnfResponse(' +
+ 'execution=' + execution.getId() +
+ ', responseVar=' + responseVar +
+ ', responseCodeVar=' + responseCodeVar +
+ ', errorResponseVar=' + errorResponseVar +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def prefix = execution.getVariable('prefix')
+
+ def response = execution.getVariable(responseVar)
+ def responseCode = execution.getVariable(responseCodeVar)
+ def errorResponse = execution.getVariable(errorResponseVar)
+
+ // The following if statement never appears to be true as any VNF Adapter error seems to be stored in 'errorResponse'.
+ // Also, the value is stored as a WorkflowException object, not a String. Added the else if to provide the proper
+ // functionality but leaving the original code in case it is hit under some circumstances.
+ if (response.contains("WorkflowException")) {
+ execution.setVariable(prefix + "ErrorResponse", response)
+ //execution.setVariable(prefix + "ResponseCode", responseCode)
+ taskProcessor.logDebug(" Sub Vnf flow Error WorkflowException Response - " + "\n" + response, isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ } else if (errorResponse != null && errorResponse instanceof WorkflowException) {
+ // Not sure the variables with the associated prefix are still used
+ execution.setVariable(prefix + "ErrorResponse", errorResponse.getErrorMessage())
+ execution.setVariable(prefix + "ResponseCode", errorResponse.getErrorCode())
+ taskProcessor.logDebug("Sub Vnf flow Error WorkflowException " + prefix + "ErrorResponse" + " - " +
+ errorResponse.getErrorMessage(), isDebugLogEnabled)
+ // this is the important part to ensure we hit the Fallout Handler
+ throw new BpmnError("MSOWorkflowException")
+ } else if (errorResponse != null && errorResponse instanceof WorkflowException) {
+ // Not sure the variables with the associated prefix are still used
+ execution.setVariable(prefix + "ErrorResponse", errorResponse.getErrorMessage())
+ execution.setVariable(prefix + "ResponseCode", errorResponse.getErrorCode())
+ taskProcessor.logDebug("Sub Vnf flow Error WorkflowException " + prefix + "ErrorResponse" + " - " +
+ errorResponse.getErrorMessage(), isDebugLogEnabled)
+ // this is the important part to ensure we hit the Fallout Handler
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ taskProcessor.logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, 'Internal Error- Unable to validate VNF Response ' + e.getMessage())
+ }
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/MSOCommonApplication.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/MSOCommonApplication.java
new file mode 100644
index 0000000000..9100974596
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/MSOCommonApplication.java
@@ -0,0 +1,59 @@
+package org.openecomp.mso.bpmn.common;
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+
+
+import java.util.List;
+
+import org.camunda.bpm.application.PostDeploy;
+import org.camunda.bpm.application.PreUndeploy;
+import org.camunda.bpm.application.ProcessApplication;
+import org.camunda.bpm.application.ProcessApplicationInfo;
+import org.camunda.bpm.application.impl.ServletProcessApplication;
+import org.camunda.bpm.engine.ProcessEngine;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * @since Version 1.0
+ *
+ */
+@ProcessApplication(name="MSO Common Application", deploymentDescriptors={"../processes.xml"})
+public class MSOCommonApplication extends ServletProcessApplication {
+
+ private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ @PostDeploy
+ public void postDeploy(ProcessEngine processEngineInstance) {
+ long startTime = System.currentTimeMillis();
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Post deployment complete...");
+ }
+
+ @PreUndeploy
+ public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo, List<ProcessEngine> processEngines) {
+ long startTime = System.currentTimeMillis();
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Pre Undeploy complete...");
+
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/CallbackHeader.java
index 38f7bc5cbb..031d963ff4 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/CallbackHeader.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@@ -53,15 +53,15 @@ import javax.xml.bind.annotation.XmlType;
"requestId",
"responseCode",
"responseMessage"
-}, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+}, namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
@XmlRootElement(name = "CallbackHeader")
public class CallbackHeader {
- @XmlElement(name = "RequestId", required = true, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ @XmlElement(name = "RequestId", required = true, namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
protected String requestId;
- @XmlElement(name = "ResponseCode", required = true,namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ @XmlElement(name = "ResponseCode", required = true,namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
protected String responseCode;
- @XmlElement(name = "ResponseMessage", required = true,namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ @XmlElement(name = "ResponseMessage", required = true,namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
protected String responseMessage;
/**
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/ObjectFactory.java
index adb0a2335e..3d6570166d 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/ObjectFactory.java
@@ -1,91 +1,91 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.sdnc.adapter.schema.v1;
-
-import javax.xml.bind.annotation.XmlRegistry;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the com.att.domain2.workflow.sdnc.adapter.schema.v1 package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.att.domain2.workflow.sdnc.adapter.schema.v1
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link RequestHeader }
- *
- */
- public RequestHeader createRequestHeader() {
- return new RequestHeader();
- }
-
- /**
- * Create an instance of {@link SDNCAdapterResponse }
- *
- */
- public SDNCAdapterResponse createSDNCAdapterResponse() {
- return new SDNCAdapterResponse();
- }
-
- /**
- * Create an instance of {@link SDNCAdapterCallbackRequest }
- *
- */
- public SDNCAdapterCallbackRequest createSDNCAdapterCallbackRequest() {
- return new SDNCAdapterCallbackRequest();
- }
-
- /**
- * Create an instance of {@link CallbackHeader }
- *
- */
- public CallbackHeader createCallbackHeader() {
- return new CallbackHeader();
- }
-
- /**
- * Create an instance of {@link SDNCAdapterRequest }
- *
- */
- public SDNCAdapterRequest createSDNCAdapterRequest() {
- return new SDNCAdapterRequest();
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.openecomp.domain2.workflow.sdnc.adapter.schema.v1 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.domain2.workflow.sdnc.adapter.schema.v1
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link RequestHeader }
+ *
+ */
+ public RequestHeader createRequestHeader() {
+ return new RequestHeader();
+ }
+
+ /**
+ * Create an instance of {@link SDNCAdapterResponse }
+ *
+ */
+ public SDNCAdapterResponse createSDNCAdapterResponse() {
+ return new SDNCAdapterResponse();
+ }
+
+ /**
+ * Create an instance of {@link SDNCAdapterCallbackRequest }
+ *
+ */
+ public SDNCAdapterCallbackRequest createSDNCAdapterCallbackRequest() {
+ return new SDNCAdapterCallbackRequest();
+ }
+
+ /**
+ * Create an instance of {@link CallbackHeader }
+ *
+ */
+ public CallbackHeader createCallbackHeader() {
+ return new CallbackHeader();
+ }
+
+ /**
+ * Create an instance of {@link SDNCAdapterRequest }
+ *
+ */
+ public SDNCAdapterRequest createSDNCAdapterRequest() {
+ return new SDNCAdapterRequest();
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/RequestHeader.java
index 40eeb11856..f2e4de88d6 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/RequestHeader.java
@@ -1,223 +1,223 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.sdnc.adapter.schema.v1;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * &lt;element name="SvcInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="SvcAction" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * &lt;element name="SvcOperation" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * &lt;element name="CallbackUrl" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * &lt;element name="MsoAction" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "requestId",
- "svcInstanceId",
- "svcAction",
- "svcOperation",
- "callbackUrl",
- "msoAction"
-})
-@XmlRootElement(name = "RequestHeader")
-public class RequestHeader {
-
- @XmlElement(name = "RequestId", required = true)
- protected String requestId;
- @XmlElement(name = "SvcInstanceId")
- protected String svcInstanceId;
- @XmlElement(name = "SvcAction", required = true)
- protected String svcAction;
- @XmlElement(name = "SvcOperation", required = true)
- protected String svcOperation;
- @XmlElement(name = "CallbackUrl", required = true)
- protected String callbackUrl;
- @XmlElement(name = "MsoAction")
- protected String msoAction;
-
- /**
- * Gets the value of the requestId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getRequestId() {
- return requestId;
- }
-
- /**
- * Sets the value of the requestId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setRequestId(String value) {
- this.requestId = value;
- }
-
- /**
- * Gets the value of the svcInstanceId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getSvcInstanceId() {
- return svcInstanceId;
- }
-
- /**
- * Sets the value of the svcInstanceId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setSvcInstanceId(String value) {
- this.svcInstanceId = value;
- }
-
- /**
- * Gets the value of the svcAction property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getSvcAction() {
- return svcAction;
- }
-
- /**
- * Sets the value of the svcAction property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setSvcAction(String value) {
- this.svcAction = value;
- }
-
- /**
- * Gets the value of the svcOperation property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getSvcOperation() {
- return svcOperation;
- }
-
- /**
- * Sets the value of the svcOperation property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setSvcOperation(String value) {
- this.svcOperation = value;
- }
-
- /**
- * Gets the value of the callbackUrl property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getCallbackUrl() {
- return callbackUrl;
- }
-
- /**
- * Sets the value of the callbackUrl property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setCallbackUrl(String value) {
- this.callbackUrl = value;
- }
-
- /**
- * Gets the value of the msoAction property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getMsoAction() {
- return msoAction;
- }
-
- /**
- * Sets the value of the msoAction property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setMsoAction(String value) {
- this.msoAction = value;
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="SvcInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="SvcAction" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="SvcOperation" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="CallbackUrl" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="MsoAction" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "requestId",
+ "svcInstanceId",
+ "svcAction",
+ "svcOperation",
+ "callbackUrl",
+ "msoAction"
+})
+@XmlRootElement(name = "RequestHeader")
+public class RequestHeader {
+
+ @XmlElement(name = "RequestId", required = true)
+ protected String requestId;
+ @XmlElement(name = "SvcInstanceId")
+ protected String svcInstanceId;
+ @XmlElement(name = "SvcAction", required = true)
+ protected String svcAction;
+ @XmlElement(name = "SvcOperation", required = true)
+ protected String svcOperation;
+ @XmlElement(name = "CallbackUrl", required = true)
+ protected String callbackUrl;
+ @XmlElement(name = "MsoAction")
+ protected String msoAction;
+
+ /**
+ * Gets the value of the requestId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRequestId() {
+ return requestId;
+ }
+
+ /**
+ * Sets the value of the requestId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRequestId(String value) {
+ this.requestId = value;
+ }
+
+ /**
+ * Gets the value of the svcInstanceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSvcInstanceId() {
+ return svcInstanceId;
+ }
+
+ /**
+ * Sets the value of the svcInstanceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSvcInstanceId(String value) {
+ this.svcInstanceId = value;
+ }
+
+ /**
+ * Gets the value of the svcAction property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSvcAction() {
+ return svcAction;
+ }
+
+ /**
+ * Sets the value of the svcAction property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSvcAction(String value) {
+ this.svcAction = value;
+ }
+
+ /**
+ * Gets the value of the svcOperation property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSvcOperation() {
+ return svcOperation;
+ }
+
+ /**
+ * Sets the value of the svcOperation property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSvcOperation(String value) {
+ this.svcOperation = value;
+ }
+
+ /**
+ * Gets the value of the callbackUrl property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCallbackUrl() {
+ return callbackUrl;
+ }
+
+ /**
+ * Sets the value of the callbackUrl property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCallbackUrl(String value) {
+ this.callbackUrl = value;
+ }
+
+ /**
+ * Gets the value of the msoAction property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMsoAction() {
+ return msoAction;
+ }
+
+ /**
+ * Sets the value of the msoAction property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMsoAction(String value) {
+ this.msoAction = value;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterCallbackRequest.java
index 663983ace1..5abdbd667c 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterCallbackRequest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
import java.io.StringWriter;
@@ -42,7 +42,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
- * &lt;element ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
+ * &lt;element ref="{http://org.openecomp/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
* &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
@@ -53,16 +53,16 @@ import javax.xml.bind.annotation.XmlType;
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1", propOrder = {
+@XmlType(name = "", namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1", propOrder = {
"callbackHeader",
"requestData"
})
-@XmlRootElement(name = "SDNCAdapterCallbackRequest", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+@XmlRootElement(name = "SDNCAdapterCallbackRequest", namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
public class SDNCAdapterCallbackRequest {
- @XmlElement(name = "CallbackHeader", required = true, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ @XmlElement(name = "CallbackHeader", required = true, namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
protected CallbackHeader callbackHeader;
- @XmlElement(name = "RequestData", required=false, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+ @XmlElement(name = "RequestData", required=false, namespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
protected Object requestData;
/**
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterRequest.java
index 4de63090b7..1bcd053631 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterRequest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@@ -37,7 +37,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
- * &lt;element ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}RequestHeader"/>
+ * &lt;element ref="{http://org.openecomp/workflow/sdnc/adapter/schema/v1}RequestHeader"/>
* &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
* &lt;/sequence>
* &lt;/restriction>
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterResponse.java
index 88fbd8f993..2c38abe4ff 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCAdapterResponse.java
@@ -1,51 +1,51 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.sdnc.adapter.schema.v1;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "SDNCAdapterResponse")
-public class SDNCAdapterResponse {
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "SDNCAdapterResponse")
+public class SDNCAdapterResponse {
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCCallbackAdapterPortType.java
index f035b0204c..6458f4ba9d 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/SDNCCallbackAdapterPortType.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.sdnc.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
import javax.jws.WebMethod;
import javax.jws.WebParam;
@@ -26,9 +26,6 @@ import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterCallbackRequest;
-import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse;
-
/**
* This class was generated by the JAX-WS RI.
@@ -36,7 +33,7 @@ import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse;
* Generated source version: 2.2
*
*/
-@WebService(name = "SDNCCallbackAdapterPortType", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1")
+@WebService(name = "SDNCCallbackAdapterPortType", targetNamespace = "http://org.openecomp/workflow/sdnc/adapter/callback/wsdl/v1")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface SDNCCallbackAdapterPortType {
@@ -45,12 +42,12 @@ public interface SDNCCallbackAdapterPortType {
*
* @param sdncAdapterCallbackRequest
* @return
- * returns com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse
+ * returns org.openecomp.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse
*/
@WebMethod(operationName = "SDNCAdapterCallback")
- @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
+ @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://org.openecomp/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
public SDNCAdapterResponse sdncAdapterCallback(
- @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
+ @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://org.openecomp/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
SDNCAdapterCallbackRequest sdncAdapterCallbackRequest);
}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/package-info.java
index 002e655a7b..23ae1aef49 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/sdnc/package-info.java
@@ -18,5 +18,5 @@
* ============LICENSE_END=========================================================
*/
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org.openecomp/workflow/sdnc/adapter/schema/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.mso.bpmn.common.adapter.sdnc;
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/CreateVnfNotification.java
index 220441a5ae..c2e610d695 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/CreateVnfNotification.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.vnf;
import java.util.ArrayList;
import java.util.List;
@@ -41,7 +41,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;sequence>
* &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- * &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ * &lt;element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
* &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="outputs" minOccurs="0">
@@ -66,7 +66,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
- * &lt;element name="rollback" type="{http://com.att.mso/vnfNotify}vnfRollback" minOccurs="0"/>
+ * &lt;element name="rollback" type="{http://org.openecomp.mso/vnfNotify}vnfRollback" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@@ -436,7 +436,7 @@ public class CreateVnfNotification {
public String toString() {
String createVnfNotification = "";
if (exception==null) {
- createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+ createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
" <messageId>"+messageId+"</messageId>" + '\n' +
" <completed>"+completed+"</completed>" + '\n' +
@@ -445,7 +445,7 @@ public class CreateVnfNotification {
" <rollback>"+rollback+"</rollback>" + '\n' +
"</ns2:createVnfNotification>";
} else {
- createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+ createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
" <messageId>"+messageId+"</messageId>" + '\n' +
" <completed>"+completed+"</completed>" + '\n' +
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/DeleteVnfNotification.java
index 9ca53a8779..0cbb988e3b 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/DeleteVnfNotification.java
@@ -1,205 +1,198 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
-
-import java.io.StringWriter;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterCallbackRequest;
-
-
-/**
- * <p>Java class for deleteVnfNotification complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="deleteVnfNotification">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- * &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
- * &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "deleteVnfNotification1", propOrder = {
- "messageId",
- "completed",
- "exception",
- "errorMessage"
-})
-public class DeleteVnfNotification {
-
- @XmlElement(required = true)
- protected String messageId;
- protected boolean completed;
- protected MsoExceptionCategory exception;
- protected String errorMessage;
-
- /**
- * Gets the value of the messageId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getMessageId() {
- return messageId;
- }
-
- /**
- * Sets the value of the messageId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setMessageId(String value) {
- this.messageId = value;
- }
-
- /**
- * Gets the value of the completed property.
- *
- */
- public boolean isCompleted() {
- return completed;
- }
-
- /**
- * Sets the value of the completed property.
- *
- */
- public void setCompleted(boolean value) {
- this.completed = value;
- }
-
- /**
- * Gets the value of the exception property.
- *
- * @return
- * possible object is
- * {@link MsoExceptionCategory }
- *
- */
- public MsoExceptionCategory getException() {
- return exception;
- }
-
- /**
- * Sets the value of the exception property.
- *
- * @param value
- * allowed object is
- * {@link MsoExceptionCategory }
- *
- */
- public void setException(MsoExceptionCategory value) {
- this.exception = value;
- }
-
- /**
- * Gets the value of the errorMessage property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getErrorMessage() {
- return errorMessage;
- }
-
- /**
- * Sets the value of the errorMessage property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setErrorMessage(String value) {
- this.errorMessage = value;
- }
-
- /**
- * Overrides toString() method
- * @return String type (deleteVnfNotification)
- */
-
-
- public String toString() {
- String deleteVnfNotification = "";
- if (exception==null) {
- deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
- " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
- " <messageId>"+messageId+"</messageId>" + '\n' +
- " <completed>"+completed+"</completed>" + '\n' +
- "</ns2:deleteVnfNotification>";
- } else {
- deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
- " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
- " <messageId>"+messageId+"</messageId>" + '\n' +
- " <completed>"+completed+"</completed>" + '\n' +
- " <exception>"+exception+"</exception>" + '\n' +
- " <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
- "</ns2:deleteVnfNotification>";
- }
- return deleteVnfNotification;
- }
-
-/*
- public String toString() {
- StringWriter writer = new StringWriter();
- try {
- JAXBContext context = JAXBContext
- .newInstance(DeleteVnfNotification.class);
- Marshaller m = context.createMarshaller();
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
- m.marshal(this, writer);
- //System.out.println("toString() - " + writer.getBuffer().toString());
- return writer.getBuffer().toString();
- } catch (JAXBException e) {
- //System.out.println("JAXBException - " + e.getStackTrace());
- return "";
- }
- }
-*/
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for deleteVnfNotification complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="deleteVnfNotification">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * &lt;element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ * &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "deleteVnfNotification1", propOrder = {
+ "messageId",
+ "completed",
+ "exception",
+ "errorMessage"
+})
+public class DeleteVnfNotification {
+
+ @XmlElement(required = true)
+ protected String messageId;
+ protected boolean completed;
+ protected MsoExceptionCategory exception;
+ protected String errorMessage;
+
+ /**
+ * Gets the value of the messageId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Sets the value of the messageId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessageId(String value) {
+ this.messageId = value;
+ }
+
+ /**
+ * Gets the value of the completed property.
+ *
+ */
+ public boolean isCompleted() {
+ return completed;
+ }
+
+ /**
+ * Sets the value of the completed property.
+ *
+ */
+ public void setCompleted(boolean value) {
+ this.completed = value;
+ }
+
+ /**
+ * Gets the value of the exception property.
+ *
+ * @return
+ * possible object is
+ * {@link MsoExceptionCategory }
+ *
+ */
+ public MsoExceptionCategory getException() {
+ return exception;
+ }
+
+ /**
+ * Sets the value of the exception property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MsoExceptionCategory }
+ *
+ */
+ public void setException(MsoExceptionCategory value) {
+ this.exception = value;
+ }
+
+ /**
+ * Gets the value of the errorMessage property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ /**
+ * Sets the value of the errorMessage property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setErrorMessage(String value) {
+ this.errorMessage = value;
+ }
+
+ /**
+ * Overrides toString() method
+ * @return String type (deleteVnfNotification)
+ */
+
+
+ public String toString() {
+ String deleteVnfNotification = "";
+ if (exception==null) {
+ deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+ " <messageId>"+messageId+"</messageId>" + '\n' +
+ " <completed>"+completed+"</completed>" + '\n' +
+ "</ns2:deleteVnfNotification>";
+ } else {
+ deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+ " <messageId>"+messageId+"</messageId>" + '\n' +
+ " <completed>"+completed+"</completed>" + '\n' +
+ " <exception>"+exception+"</exception>" + '\n' +
+ " <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+ "</ns2:deleteVnfNotification>";
+ }
+ return deleteVnfNotification;
+ }
+
+/*
+ public String toString() {
+ StringWriter writer = new StringWriter();
+ try {
+ JAXBContext context = JAXBContext
+ .newInstance(DeleteVnfNotification.class);
+ Marshaller m = context.createMarshaller();
+ m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+ m.marshal(this, writer);
+ //System.out.println("toString() - " + writer.getBuffer().toString());
+ return writer.getBuffer().toString();
+ } catch (JAXBException e) {
+ //System.out.println("JAXBException - " + e.getStackTrace());
+ return "";
+ }
+ }
+*/
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoExceptionCategory.java
index 9d430ceaef..444ef982fd 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoExceptionCategory.java
@@ -1,61 +1,61 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for msoExceptionCategory.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * &lt;simpleType name="msoExceptionCategory">
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
- * &lt;enumeration value="OPENSTACK"/>
- * &lt;enumeration value="IO"/>
- * &lt;enumeration value="INTERNAL"/>
- * &lt;enumeration value="USERDATA"/>
- * &lt;/restriction>
- * &lt;/simpleType>
- * </pre>
- *
- */
-@XmlType(name = "msoExceptionCategory")
-@XmlEnum
-public enum MsoExceptionCategory {
-
- OPENSTACK,
- IO,
- INTERNAL,
- USERDATA;
-
- public String value() {
- return name();
- }
-
- public static MsoExceptionCategory fromValue(String v) {
- return valueOf(v);
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for msoExceptionCategory.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="msoExceptionCategory">
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * &lt;enumeration value="OPENSTACK"/>
+ * &lt;enumeration value="IO"/>
+ * &lt;enumeration value="INTERNAL"/>
+ * &lt;enumeration value="USERDATA"/>
+ * &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ *
+ */
+@XmlType(name = "msoExceptionCategory")
+@XmlEnum
+public enum MsoExceptionCategory {
+
+ OPENSTACK,
+ IO,
+ INTERNAL,
+ USERDATA;
+
+ public String value() {
+ return name();
+ }
+
+ public static MsoExceptionCategory fromValue(String v) {
+ return valueOf(v);
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
index 981030689f..01a6705898 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
@@ -1,114 +1,114 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for msoRequest complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="msoRequest">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="requestId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="serviceInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "msoRequest", propOrder = {
- "requestId",
- "serviceInstanceId"
-})
-public class MsoRequest {
-
- protected String requestId;
- protected String serviceInstanceId;
-
- /**
- * Gets the value of the requestId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getRequestId() {
- return requestId;
- }
-
- /**
- * Sets the value of the requestId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setRequestId(String value) {
- this.requestId = value;
- }
-
- /**
- * Gets the value of the serviceInstanceId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getServiceInstanceId() {
- return serviceInstanceId;
- }
-
- /**
- * Sets the value of the serviceInstanceId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setServiceInstanceId(String value) {
- this.serviceInstanceId = value;
- }
-
- public String toString() {
- String request = "";
- request =
- "<requestId>"+requestId+"</requestId>" + '\n' +
- "<serviceInstanceId>"+serviceInstanceId+"</serviceInstanceId>";
- return request;
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for msoRequest complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="msoRequest">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="requestId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="serviceInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "msoRequest", propOrder = {
+ "requestId",
+ "serviceInstanceId"
+})
+public class MsoRequest {
+
+ protected String requestId;
+ protected String serviceInstanceId;
+
+ /**
+ * Gets the value of the requestId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRequestId() {
+ return requestId;
+ }
+
+ /**
+ * Sets the value of the requestId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRequestId(String value) {
+ this.requestId = value;
+ }
+
+ /**
+ * Gets the value of the serviceInstanceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceInstanceId() {
+ return serviceInstanceId;
+ }
+
+ /**
+ * Sets the value of the serviceInstanceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceInstanceId(String value) {
+ this.serviceInstanceId = value;
+ }
+
+ public String toString() {
+ String request = "";
+ request =
+ "<requestId>"+requestId+"</requestId>" + '\n' +
+ "<serviceInstanceId>"+serviceInstanceId+"</serviceInstanceId>";
+ return request;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java
index 3c42f35239..1a38539f45 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.vnf;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
@@ -43,11 +43,11 @@ import javax.xml.namespace.QName;
@XmlRegistry
public class ObjectFactory {
- private final static QName _RollbackVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "rollbackVnfNotification");
- private final static QName _DeleteVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "deleteVnfNotification");
- private final static QName _CreateVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "createVnfNotification");
- private final static QName _UpdateVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "updateVnfNotification");
- private final static QName _QueryVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "queryVnfNotification");
+ private final static QName _RollbackVnfNotification_QNAME = new QName("http://org.openecomp.mso/vnfNotify", "rollbackVnfNotification");
+ private final static QName _DeleteVnfNotification_QNAME = new QName("http://org.openecomp.mso/vnfNotify", "deleteVnfNotification");
+ private final static QName _CreateVnfNotification_QNAME = new QName("http://org.openecomp.mso/vnfNotify", "createVnfNotification");
+ private final static QName _UpdateVnfNotification_QNAME = new QName("http://org.openecomp.mso/vnfNotify", "updateVnfNotification");
+ private final static QName _QueryVnfNotification_QNAME = new QName("http://org.openecomp.mso/vnfNotify", "queryVnfNotification");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.mso.adapters.vnf.async.client
@@ -164,7 +164,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link RollbackVnfNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "rollbackVnfNotification")
+ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "rollbackVnfNotification")
public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) {
return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
}
@@ -173,7 +173,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link DeleteVnfNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "deleteVnfNotification")
+ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "deleteVnfNotification")
public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) {
return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
}
@@ -182,7 +182,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link CreateVnfNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "createVnfNotification")
+ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "createVnfNotification")
public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) {
return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
}
@@ -191,7 +191,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link UpdateVnfNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "updateVnfNotification")
+ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "updateVnfNotification")
public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) {
return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
}
@@ -200,7 +200,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link QueryVnfNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "queryVnfNotification")
+ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "queryVnfNotification")
public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) {
return new JAXBElement<QueryVnfNotification>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/QueryVnfNotification.java
index ebbf86744d..b7b93b7b5d 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/QueryVnfNotification.java
@@ -1,490 +1,488 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs.Entry;
-
-
-/**
- * <p>Java class for queryVnfNotification complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="queryVnfNotification">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- * &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
- * &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="vnfExists" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
- * &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="status" type="{http://com.att.mso/vnfNotify}vnfStatus" minOccurs="0"/>
- * &lt;element name="outputs" minOccurs="0">
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * &lt;/element>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * &lt;/element>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "queryVnfNotification1", propOrder = {
- "messageId",
- "completed",
- "exception",
- "errorMessage",
- "vnfExists",
- "vnfId",
- "status",
- "outputs"
-})
-public class QueryVnfNotification {
-
- @XmlElement(required = true)
- protected String messageId;
- protected boolean completed;
- protected MsoExceptionCategory exception;
- protected String errorMessage;
- protected Boolean vnfExists;
- protected String vnfId;
- protected VnfStatus status;
- protected QueryVnfNotification.Outputs outputs;
-
- /**
- * Gets the value of the messageId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getMessageId() {
- return messageId;
- }
-
- /**
- * Sets the value of the messageId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setMessageId(String value) {
- this.messageId = value;
- }
-
- /**
- * Gets the value of the completed property.
- *
- */
- public boolean isCompleted() {
- return completed;
- }
-
- /**
- * Sets the value of the completed property.
- *
- */
- public void setCompleted(boolean value) {
- this.completed = value;
- }
-
- /**
- * Gets the value of the exception property.
- *
- * @return
- * possible object is
- * {@link MsoExceptionCategory }
- *
- */
- public MsoExceptionCategory getException() {
- return exception;
- }
-
- /**
- * Sets the value of the exception property.
- *
- * @param value
- * allowed object is
- * {@link MsoExceptionCategory }
- *
- */
- public void setException(MsoExceptionCategory value) {
- this.exception = value;
- }
-
- /**
- * Gets the value of the errorMessage property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getErrorMessage() {
- return errorMessage;
- }
-
- /**
- * Sets the value of the errorMessage property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setErrorMessage(String value) {
- this.errorMessage = value;
- }
-
- /**
- * Gets the value of the vnfExists property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isVnfExists() {
- return vnfExists;
- }
-
- /**
- * Sets the value of the vnfExists property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setVnfExists(Boolean value) {
- this.vnfExists = value;
- }
-
- /**
- * Gets the value of the vnfId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getVnfId() {
- return vnfId;
- }
-
- /**
- * Sets the value of the vnfId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setVnfId(String value) {
- this.vnfId = value;
- }
-
- /**
- * Gets the value of the status property.
- *
- * @return
- * possible object is
- * {@link VnfStatus }
- *
- */
- public VnfStatus getStatus() {
- return status;
- }
-
- /**
- * Sets the value of the status property.
- *
- * @param value
- * allowed object is
- * {@link VnfStatus }
- *
- */
- public void setStatus(VnfStatus value) {
- this.status = value;
- }
-
- /**
- * Gets the value of the outputs property.
- *
- * @return
- * possible object is
- * {@link QueryVnfNotification.Outputs }
- *
- */
- public QueryVnfNotification.Outputs getOutputs() {
- return outputs;
- }
-
- /**
- * Sets the value of the outputs property.
- *
- * @param value
- * allowed object is
- * {@link QueryVnfNotification.Outputs }
- *
- */
- public void setOutputs(QueryVnfNotification.Outputs value) {
- this.outputs = value;
- }
-
-
- /**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * &lt;/element>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "entry"
- })
- public static class Outputs {
-
- protected List<QueryVnfNotification.Outputs.Entry> entry;
-
- /**
- * Gets the value of the entry property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the entry property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getEntry().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link QueryVnfNotification.Outputs.Entry }
- *
- *
- */
- public List<QueryVnfNotification.Outputs.Entry> getEntry() {
- if (entry == null) {
- entry = new ArrayList<QueryVnfNotification.Outputs.Entry>();
- }
- return this.entry;
- }
-
- // Not a generated method
- public String toString() {
- StringBuilder out = new StringBuilder();
- out.append("<outputs>\n");
- if (entry != null) {
- for (Entry e : entry) {
- out.append(e.toString());
- out.append('\n');
- }
- }
- out.append("</outputs>");
- return out.toString();
- }
-
-
- /**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "key",
- "value"
- })
- public static class Entry {
-
- protected String key;
- protected String value;
-
- /**
- * Gets the value of the key property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getKey() {
- return key;
- }
-
- /**
- * Sets the value of the key property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setKey(String value) {
- this.key = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- // Not a generated method
- public String toString() {
- String entry = "";
- entry =
- "<entry>"+ '\n' +
- " <key>"+key+"</key>" + '\n' +
- " <value>"+value+"</value>" + '\n' +
- "</entry>";
- return entry;
- }
-
- }
-
- }
-
- // Not a generated method
- public String toString() {
- String queryVnfNotification = "";
- if (exception==null) {
- queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
- " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
- " <messageId>"+messageId+"</messageId>" + '\n' +
- " <completed>"+completed+"</completed>" + '\n' +
- " <vnfExists>"+vnfExists+"</vnfExists>" + '\n' +
- " <vnfId>"+vnfId+"</vnfId>" + '\n' +
- " <status>"+status+"</status>" + '\n' +
- (outputs == null ? "" : outputs.toString() + '\n') +
- "</ns2:queryVnfNotification>";
- } else {
- queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
- " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
- " <messageId>"+messageId+"</messageId>" + '\n' +
- " <completed>"+completed+"</completed>" + '\n' +
- (outputs == null ? "" : outputs.toString() + '\n') +
- " <exception>"+exception+"</exception>" + '\n' +
- " <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
- "</ns2:queryVnfNotification>";
- }
- return queryVnfNotification;
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.vnf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for queryVnfNotification complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="queryVnfNotification">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * &lt;element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ * &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="vnfExists" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ * &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="status" type="{http://org.openecomp.mso/vnfNotify}vnfStatus" minOccurs="0"/>
+ * &lt;element name="outputs" minOccurs="0">
+ * &lt;complexType>
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ * &lt;complexType>
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * &lt;/element>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * &lt;/element>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "queryVnfNotification1", propOrder = {
+ "messageId",
+ "completed",
+ "exception",
+ "errorMessage",
+ "vnfExists",
+ "vnfId",
+ "status",
+ "outputs"
+})
+public class QueryVnfNotification {
+
+ @XmlElement(required = true)
+ protected String messageId;
+ protected boolean completed;
+ protected MsoExceptionCategory exception;
+ protected String errorMessage;
+ protected Boolean vnfExists;
+ protected String vnfId;
+ protected VnfStatus status;
+ protected QueryVnfNotification.Outputs outputs;
+
+ /**
+ * Gets the value of the messageId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Sets the value of the messageId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessageId(String value) {
+ this.messageId = value;
+ }
+
+ /**
+ * Gets the value of the completed property.
+ *
+ */
+ public boolean isCompleted() {
+ return completed;
+ }
+
+ /**
+ * Sets the value of the completed property.
+ *
+ */
+ public void setCompleted(boolean value) {
+ this.completed = value;
+ }
+
+ /**
+ * Gets the value of the exception property.
+ *
+ * @return
+ * possible object is
+ * {@link MsoExceptionCategory }
+ *
+ */
+ public MsoExceptionCategory getException() {
+ return exception;
+ }
+
+ /**
+ * Sets the value of the exception property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MsoExceptionCategory }
+ *
+ */
+ public void setException(MsoExceptionCategory value) {
+ this.exception = value;
+ }
+
+ /**
+ * Gets the value of the errorMessage property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ /**
+ * Sets the value of the errorMessage property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setErrorMessage(String value) {
+ this.errorMessage = value;
+ }
+
+ /**
+ * Gets the value of the vnfExists property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isVnfExists() {
+ return vnfExists;
+ }
+
+ /**
+ * Sets the value of the vnfExists property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setVnfExists(Boolean value) {
+ this.vnfExists = value;
+ }
+
+ /**
+ * Gets the value of the vnfId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfId() {
+ return vnfId;
+ }
+
+ /**
+ * Sets the value of the vnfId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfId(String value) {
+ this.vnfId = value;
+ }
+
+ /**
+ * Gets the value of the status property.
+ *
+ * @return
+ * possible object is
+ * {@link VnfStatus }
+ *
+ */
+ public VnfStatus getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets the value of the status property.
+ *
+ * @param value
+ * allowed object is
+ * {@link VnfStatus }
+ *
+ */
+ public void setStatus(VnfStatus value) {
+ this.status = value;
+ }
+
+ /**
+ * Gets the value of the outputs property.
+ *
+ * @return
+ * possible object is
+ * {@link QueryVnfNotification.Outputs }
+ *
+ */
+ public QueryVnfNotification.Outputs getOutputs() {
+ return outputs;
+ }
+
+ /**
+ * Sets the value of the outputs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link QueryVnfNotification.Outputs }
+ *
+ */
+ public void setOutputs(QueryVnfNotification.Outputs value) {
+ this.outputs = value;
+ }
+
+
+ /**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ * &lt;complexType>
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * &lt;/element>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "entry"
+ })
+ public static class Outputs {
+
+ protected List<QueryVnfNotification.Outputs.Entry> entry;
+
+ /**
+ * Gets the value of the entry property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the entry property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getEntry().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link QueryVnfNotification.Outputs.Entry }
+ *
+ *
+ */
+ public List<QueryVnfNotification.Outputs.Entry> getEntry() {
+ if (entry == null) {
+ entry = new ArrayList<QueryVnfNotification.Outputs.Entry>();
+ }
+ return this.entry;
+ }
+
+ // Not a generated method
+ public String toString() {
+ StringBuilder out = new StringBuilder();
+ out.append("<outputs>\n");
+ if (entry != null) {
+ for (Entry e : entry) {
+ out.append(e.toString());
+ out.append('\n');
+ }
+ }
+ out.append("</outputs>");
+ return out.toString();
+ }
+
+
+ /**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "key",
+ "value"
+ })
+ public static class Entry {
+
+ protected String key;
+ protected String value;
+
+ /**
+ * Gets the value of the key property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getKey() {
+ return key;
+ }
+
+ /**
+ * Sets the value of the key property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setKey(String value) {
+ this.key = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ // Not a generated method
+ public String toString() {
+ String entry = "";
+ entry =
+ "<entry>"+ '\n' +
+ " <key>"+key+"</key>" + '\n' +
+ " <value>"+value+"</value>" + '\n' +
+ "</entry>";
+ return entry;
+ }
+
+ }
+
+ }
+
+ // Not a generated method
+ public String toString() {
+ String queryVnfNotification = "";
+ if (exception==null) {
+ queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+ " <messageId>"+messageId+"</messageId>" + '\n' +
+ " <completed>"+completed+"</completed>" + '\n' +
+ " <vnfExists>"+vnfExists+"</vnfExists>" + '\n' +
+ " <vnfId>"+vnfId+"</vnfId>" + '\n' +
+ " <status>"+status+"</status>" + '\n' +
+ (outputs == null ? "" : outputs.toString() + '\n') +
+ "</ns2:queryVnfNotification>";
+ } else {
+ queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+ " <messageId>"+messageId+"</messageId>" + '\n' +
+ " <completed>"+completed+"</completed>" + '\n' +
+ (outputs == null ? "" : outputs.toString() + '\n') +
+ " <exception>"+exception+"</exception>" + '\n' +
+ " <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+ "</ns2:queryVnfNotification>";
+ }
+ return queryVnfNotification;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/RollbackVnfNotification.java
index 67c544de6d..6c05b4a075 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/RollbackVnfNotification.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.vnf;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@@ -38,7 +38,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;sequence>
* &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- * &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ * &lt;element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
* &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
@@ -154,13 +154,13 @@ public class RollbackVnfNotification {
public String toString() {
String rollbackVnfNotification = "";
if (exception==null) {
- rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+ rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
" <messageId>"+messageId+"</messageId>" + '\n' +
" <completed>"+completed+"</completed>" + '\n' +
"</ns2:rollbackVnfNotification>";
} else {
- rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+ rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
" <messageId>"+messageId+"</messageId>" + '\n' +
" <completed>"+completed+"</completed>" + '\n' +
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/UpdateVnfNotification.java
index 61ba43924e..92954800f2 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/UpdateVnfNotification.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.vnf;
import java.util.ArrayList;
import java.util.List;
@@ -41,7 +41,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;sequence>
* &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- * &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ * &lt;element name="exception" type="{http://org.openecomp.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
* &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="outputs" minOccurs="0">
* &lt;complexType>
@@ -65,7 +65,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
- * &lt;element name="rollback" type="{http://com.att.mso/vnfNotify}vnfRollback" minOccurs="0"/>
+ * &lt;element name="rollback" type="{http://org.openecomp.mso/vnfNotify}vnfRollback" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@@ -390,14 +390,14 @@ public class UpdateVnfNotification {
public String toString(){
String updateVnfNotification = "";
if (exception==null) {
- updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+ updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
" <messageId>"+messageId+"</messageId>" + '\n' +
" <completed>"+completed+"</completed>" + '\n' +
" <rollback>"+rollback+"</rollback>" + '\n' +
"</ns2:updateVnfNotification>";
} else {
- updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+ updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://org.openecomp.mso/vnfNotify\"" + '\n' +
" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
" <messageId>"+messageId+"</messageId>" + '\n' +
" <completed>"+completed+"</completed>" + '\n' +
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfAdapterNotify.java
index 8aaed54a4c..b714e528d1 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfAdapterNotify.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.vnf;
import javax.jws.Oneway;
import javax.jws.WebMethod;
@@ -35,7 +35,7 @@ import javax.xml.ws.RequestWrapper;
* Generated source version: 2.2
*
*/
-@WebService(name = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify")
+@WebService(name = "vnfAdapterNotify", targetNamespace = "http://org.openecomp.mso/vnfNotify")
@XmlSeeAlso({
ObjectFactory.class
})
@@ -51,8 +51,8 @@ public interface VnfAdapterNotify {
*/
@WebMethod
@Oneway
- @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest")
+ @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/rollbackVnfNotificationRequest")
public void rollbackVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -76,8 +76,8 @@ public interface VnfAdapterNotify {
*/
@WebMethod
@Oneway
- @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest")
+ @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/queryVnfNotificationRequest")
public void queryVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -94,7 +94,7 @@ public interface VnfAdapterNotify {
@WebParam(name = "status", targetNamespace = "")
VnfStatus status,
@WebParam(name = "outputs", targetNamespace = "")
- com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification.Outputs outputs);
+ org.openecomp.mso.bpmn.common.adapter.vnf.QueryVnfNotification.Outputs outputs);
/**
*
@@ -108,8 +108,8 @@ public interface VnfAdapterNotify {
*/
@WebMethod
@Oneway
- @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest")
+ @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/createVnfNotificationRequest")
public void createVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -122,7 +122,7 @@ public interface VnfAdapterNotify {
@WebParam(name = "vnfId", targetNamespace = "")
String vnfId,
@WebParam(name = "outputs", targetNamespace = "")
- com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs outputs,
+ org.openecomp.mso.bpmn.common.adapter.vnf.CreateVnfNotification.Outputs outputs,
@WebParam(name = "rollback", targetNamespace = "")
VnfRollback rollback);
@@ -137,8 +137,8 @@ public interface VnfAdapterNotify {
*/
@WebMethod
@Oneway
- @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest")
+ @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/updateVnfNotificationRequest")
public void updateVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -149,7 +149,7 @@ public interface VnfAdapterNotify {
@WebParam(name = "errorMessage", targetNamespace = "")
String errorMessage,
@WebParam(name = "outputs", targetNamespace = "")
- com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification.Outputs outputs,
+ org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification.Outputs outputs,
@WebParam(name = "rollback", targetNamespace = "")
VnfRollback rollback);
@@ -162,8 +162,8 @@ public interface VnfAdapterNotify {
*/
@WebMethod
@Oneway
- @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest")
+ @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/deleteVnfNotificationRequest")
public void deleteVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfAdapterNotify_Service.java
index ba3bca169b..f79df76c5d 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfAdapterNotify_Service.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.vnf;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -35,16 +35,16 @@ import javax.xml.ws.WebServiceFeature;
* Generated source version: 2.2
*
*/
-@WebServiceClient(name = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify", wsdlLocation = "/VnfAdapterNotify.wsdl")
+@WebServiceClient(name = "vnfAdapterNotify", targetNamespace = "http://org.openecomp.mso/vnfNotify", wsdlLocation = "/VnfAdapterNotify.wsdl")
public class VnfAdapterNotify_Service extends Service
{
private final static URL VNFADAPTERNOTIFY_WSDL_LOCATION;
private final static WebServiceException VNFADAPTERNOTIFY_EXCEPTION;
- private final static QName VNFADAPTERNOTIFY_QNAME = new QName("http://com.att.mso/vnfNotify", "vnfAdapterNotify");
+ private final static QName VNFADAPTERNOTIFY_QNAME = new QName("http://org.openecomp.mso/vnfNotify", "vnfAdapterNotify");
static {
- VNFADAPTERNOTIFY_WSDL_LOCATION = com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfAdapterNotify_Service.class.getResource("/VnfAdapterNotify.wsdl");
+ VNFADAPTERNOTIFY_WSDL_LOCATION = org.openecomp.mso.bpmn.common.adapter.vnf.VnfAdapterNotify_Service.class.getResource("/VnfAdapterNotify.wsdl");
WebServiceException e = null;
if (VNFADAPTERNOTIFY_WSDL_LOCATION == null) {
e = new WebServiceException("Cannot find '/VnfAdapterNotify.wsdl' wsdl. Place the resource correctly in the classpath.");
@@ -83,7 +83,7 @@ public class VnfAdapterNotify_Service extends Service
*/
@WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort() {
- return super.getPort(new QName("http://com.att.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class);
+ return super.getPort(new QName("http://org.openecomp.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class);
}
/**
@@ -95,7 +95,7 @@ public class VnfAdapterNotify_Service extends Service
*/
@WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort(WebServiceFeature... features) {
- return super.getPort(new QName("http://com.att.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class, features);
+ return super.getPort(new QName("http://org.openecomp.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class, features);
}
private static URL __getWsdlLocation() {
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfRollback.java
index 4863023f5f..b37866cbe1 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfRollback.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+package org.openecomp.mso.bpmn.common.adapter.vnf;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@@ -36,7 +36,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="cloudSiteId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * &lt;element name="msoRequest" type="{http://com.att.mso/vnfNotify}msoRequest" minOccurs="0"/>
+ * &lt;element name="msoRequest" type="{http://org.openecomp.mso/vnfNotify}msoRequest" minOccurs="0"/>
* &lt;element name="tenantCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="tenantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="vnfCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
@@ -196,17 +196,15 @@ public class VnfRollback {
}
public String toString() {
- String rollback = "";
- rollback =
- "<cloudSiteId>"+cloudSiteId+"</cloudSiteId>" + '\n' +
- "<msoRequest>"+msoRequest.toString()+"</msoRequest>" + '\n' +
- "<tenantCreated>"+tenantCreated+"</tenantCreated>" + '\n' +
- "<tenantId>"+tenantId+"</tenantId>" + '\n' +
- "<vnfCreated>"+vnfCreated+"</vnfCreated>" + '\n' +
- "<vnfId>"+vnfId+"</vnfId>";
- return rollback;
+ String msoRequestElement = msoRequest == null ? ""
+ : "<msoRequest>"+msoRequest+"</msoRequest>" + '\n';
+
+ return
+ "<cloudSiteId>"+cloudSiteId+"</cloudSiteId>" + '\n' +
+ msoRequestElement +
+ "<tenantCreated>"+tenantCreated+"</tenantCreated>" + '\n' +
+ "<tenantId>"+tenantId+"</tenantId>" + '\n' +
+ "<vnfCreated>"+vnfCreated+"</vnfCreated>" + '\n' +
+ "<vnfId>"+vnfId+"</vnfId>";
}
-
-
-
}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfStatus.java
index b61a4b26b8..62026fb888 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/VnfStatus.java
@@ -1,61 +1,61 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for vnfStatus.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * &lt;simpleType name="vnfStatus">
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
- * &lt;enumeration value="ACTIVE"/>
- * &lt;enumeration value="FAILED"/>
- * &lt;enumeration value="NOTFOUND"/>
- * &lt;enumeration value="UNKNOWN"/>
- * &lt;/restriction>
- * &lt;/simpleType>
- * </pre>
- *
- */
-@XmlType(name = "vnfStatus")
-@XmlEnum
-public enum VnfStatus {
-
- ACTIVE,
- FAILED,
- NOTFOUND,
- UNKNOWN;
-
- public String value() {
- return name();
- }
-
- public static VnfStatus fromValue(String v) {
- return valueOf(v);
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for vnfStatus.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="vnfStatus">
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * &lt;enumeration value="ACTIVE"/>
+ * &lt;enumeration value="FAILED"/>
+ * &lt;enumeration value="NOTFOUND"/>
+ * &lt;enumeration value="UNKNOWN"/>
+ * &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ *
+ */
+@XmlType(name = "vnfStatus")
+@XmlEnum
+public enum VnfStatus {
+
+ ACTIVE,
+ FAILED,
+ NOTFOUND,
+ UNKNOWN;
+
+ public String value() {
+ return name();
+ }
+
+ public static VnfStatus fromValue(String v) {
+ return valueOf(v);
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/package-info.java
index f3038a3e38..6759fda81b 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/package-info.java
@@ -18,5 +18,5 @@
* ============LICENSE_END=========================================================
*/
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://com.att.mso/vnfNotify")
-package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org.openecomp.mso/vnfNotify")
+package org.openecomp.mso.bpmn.common.adapter.vnf;
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java
index 66b170eb75..da1f177ea2 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java
@@ -1,57 +1,57 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.util;
-
-import java.security.GeneralSecurityException;
-
-public class CryptoHandler implements ICryptoHandler {
-
- private static String msoKey = "aa3871669d893c7fb8abbcda31b88b4f";
- //private static String msoAaiPwd = "mso0206";
- private static String msoAaiEncryptedPwd = "C1FC4A39E16419DD41DFC1212843F440";
-
- public String getMsoAaiPassword() {
- try {
- return CryptoUtils.decrypt(msoAaiEncryptedPwd, msoKey);
- } catch (GeneralSecurityException e) {
- return null;
- }
- }
-
-
- public String encryptMsoPassword(String plainMsoPwd) {
- try {
- return CryptoUtils.encrypt(plainMsoPwd, msoKey);
- } catch (GeneralSecurityException e) {
- return null;
- }
- }
-
-
- public String decryptMsoPassword(String encryptedPwd) {
- try {
- return CryptoUtils.decrypt(encryptedPwd, msoKey);
- } catch (GeneralSecurityException e) {
- return null;
- }
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.util;
+
+import java.security.GeneralSecurityException;
+
+public class CryptoHandler implements ICryptoHandler {
+
+ private static String msoKey = "aa3871669d893c7fb8abbcda31b88b4f";
+ //private static String msoAaiPwd = "mso0206";
+ private static String msoAaiEncryptedPwd = "C1FC4A39E16419DD41DFC1212843F440";
+
+ public String getMsoAaiPassword() {
+ try {
+ return CryptoUtils.decrypt(msoAaiEncryptedPwd, msoKey);
+ } catch (GeneralSecurityException e) {
+ return null;
+ }
+ }
+
+
+ public String encryptMsoPassword(String plainMsoPwd) {
+ try {
+ return CryptoUtils.encrypt(plainMsoPwd, msoKey);
+ } catch (GeneralSecurityException e) {
+ return null;
+ }
+ }
+
+
+ public String decryptMsoPassword(String encryptedPwd) {
+ try {
+ return CryptoUtils.decrypt(encryptedPwd, msoKey);
+ } catch (GeneralSecurityException e) {
+ return null;
+ }
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java
index e8b91bc776..6237735691 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java
@@ -1,120 +1,118 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.util;
-
-
-import java.security.GeneralSecurityException;
-import java.security.NoSuchAlgorithmException;
-
-import javax.crypto.Cipher;
-import javax.crypto.spec.SecretKeySpec;
-
-// import com.att.util.common.RttpBasicAuth;
-
-//Need to add BPM error handler
-
-/**
- * CryptoUtils adapted from RTTP client.
- *
- */
-public class CryptoUtils {
-
- public static final String AES = "AES";
-
- /**
- * encrypt a value and generate a keyfile
- * if the keyfile is not found then a new one is created
- * @throws GeneralSecurityException
- * @throws IOException
- */
- public static String encrypt(String value, String keyString) throws GeneralSecurityException
- {
- SecretKeySpec sks = getSecretKeySpec(keyString);
- Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
- cipher.init(Cipher.ENCRYPT_MODE, sks, cipher.getParameters());
- byte[] encrypted = cipher.doFinal(value.getBytes());
- return byteArrayToHexString(encrypted);
- }
-
- /**
- * decrypt a value
- * @throws GeneralSecurityException
- * @throws IOException
- */
- public static String decrypt(String message, String keyString) throws GeneralSecurityException
- {
- SecretKeySpec sks = getSecretKeySpec(keyString);
- Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
- cipher.init(Cipher.DECRYPT_MODE, sks);
- byte[] decrypted = cipher.doFinal(hexStringToByteArray(message));
- return new String(decrypted);
- }
-
- private static SecretKeySpec getSecretKeySpec(String keyString) throws NoSuchAlgorithmException
- {
- byte [] key = hexStringToByteArray(keyString);
- SecretKeySpec sks = new SecretKeySpec(key, CryptoUtils.AES);
- return sks;
- }
-
-
- private static String byteArrayToHexString(byte[] b){
- StringBuffer sb = new StringBuffer(b.length * 2);
- for (int i = 0; i < b.length; i++){
- int v = b[i] & 0xff;
- if (v < 16) {
- sb.append('0');
- }
- sb.append(Integer.toHexString(v));
- }
- return sb.toString().toUpperCase();
- }
-
- private static byte[] hexStringToByteArray(String s) {
- byte[] b = new byte[s.length() / 2];
- for (int i = 0; i < b.length; i++){
- int index = i * 2;
- int v = Integer.parseInt(s.substring(index, index + 2), 16);
- b[i] = (byte)v;
- }
- return b;
- }
-
- /**
- * Not Used...
- *
- * Call Rttp utility jar to encrypt pwd
- * @param clearPassword
- * @return
- * @throws GeneralSecurityException
- * @throws Exception
- *
- public static String encryptRttpPwd(String clearPassword) throws GeneralSecurityException {
- try {
- return RttpBasicAuth.encrypt(clearPassword);
- } catch (Exception e) {
- // wrap generic exception
- throw new GeneralSecurityException(e);
- }
- }
- */
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.util;
+
+
+import java.security.GeneralSecurityException;
+import java.security.NoSuchAlgorithmException;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+//Need to add BPM error handler
+
+/**
+ * CryptoUtils adapted from RTTP client.
+ *
+ */
+public class CryptoUtils {
+
+ public static final String AES = "AES";
+
+ /**
+ * encrypt a value and generate a keyfile
+ * if the keyfile is not found then a new one is created
+ * @throws GeneralSecurityException
+ * @throws IOException
+ */
+ public static String encrypt(String value, String keyString) throws GeneralSecurityException
+ {
+ SecretKeySpec sks = getSecretKeySpec(keyString);
+ Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
+ cipher.init(Cipher.ENCRYPT_MODE, sks, cipher.getParameters());
+ byte[] encrypted = cipher.doFinal(value.getBytes());
+ return byteArrayToHexString(encrypted);
+ }
+
+ /**
+ * decrypt a value
+ * @throws GeneralSecurityException
+ * @throws IOException
+ */
+ public static String decrypt(String message, String keyString) throws GeneralSecurityException
+ {
+ SecretKeySpec sks = getSecretKeySpec(keyString);
+ Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
+ cipher.init(Cipher.DECRYPT_MODE, sks);
+ byte[] decrypted = cipher.doFinal(hexStringToByteArray(message));
+ return new String(decrypted);
+ }
+
+ private static SecretKeySpec getSecretKeySpec(String keyString) throws NoSuchAlgorithmException
+ {
+ byte [] key = hexStringToByteArray(keyString);
+ SecretKeySpec sks = new SecretKeySpec(key, CryptoUtils.AES);
+ return sks;
+ }
+
+
+ private static String byteArrayToHexString(byte[] b){
+ StringBuffer sb = new StringBuffer(b.length * 2);
+ for (int i = 0; i < b.length; i++){
+ int v = b[i] & 0xff;
+ if (v < 16) {
+ sb.append('0');
+ }
+ sb.append(Integer.toHexString(v));
+ }
+ return sb.toString().toUpperCase();
+ }
+
+ private static byte[] hexStringToByteArray(String s) {
+ byte[] b = new byte[s.length() / 2];
+ for (int i = 0; i < b.length; i++){
+ int index = i * 2;
+ int v = Integer.parseInt(s.substring(index, index + 2), 16);
+ b[i] = (byte)v;
+ }
+ return b;
+ }
+
+ /**
+ * Not Used...
+ *
+ * Call Rttp utility jar to encrypt pwd
+ * @param clearPassword
+ * @return
+ * @throws GeneralSecurityException
+ * @throws Exception
+ *
+ public static String encryptRttpPwd(String clearPassword) throws GeneralSecurityException {
+ try {
+ return RttpBasicAuth.encrypt(clearPassword);
+ } catch (Exception e) {
+ // wrap generic exception
+ throw new GeneralSecurityException(e);
+ }
+ }
+ */
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/ICryptoHandler.java
index 1ef96b683d..bc74be05a7 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/ICryptoHandler.java
@@ -1,27 +1,27 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.util;
-
-public interface ICryptoHandler {
- public String getMsoAaiPassword();
- public String encryptMsoPassword(String plainPwd);
- public String decryptMsoPassword(String encryptedPwd);
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.util;
+
+public interface ICryptoHandler {
+ public String getMsoAaiPassword();
+ public String encryptMsoPassword(String plainPwd);
+ public String decryptMsoPassword(String encryptedPwd);
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
index 4b3b8eb36e..4585d620ac 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
@@ -1,255 +1,280 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.ws.rs.core.Context;
-import javax.xml.ws.WebServiceContext;
-
-import org.camunda.bpm.BpmPlatform;
-import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
-import org.camunda.bpm.engine.ProcessEngineServices;
-import org.camunda.bpm.engine.RuntimeService;
-
-import com.att.domain2.workflow.sdnc.adapter.callback.wsdl.v1.SDNCCallbackAdapterPortType;
-import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterCallbackRequest;
-import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse;
-import org.openecomp.mso.bpmn.core.PropertyConfiguration;
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
-/**
- * @version 1.0
- *
- */
-@WebService(serviceName="SDNCAdapterCallbackService", targetNamespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
-public class SDNCAdapterCallbackServiceImpl implements SDNCCallbackAdapterPortType {
-
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- private final int DEFAULT_RETRY_ATTEMPTS = 60;
- private final int DEFAULT_SLEEP_TIME = 500;
-
- private final String logMarker = "[SDNC-CALLBACK]";
-
- @Context WebServiceContext wsContext;
-
- private volatile ProcessEngineServices pes4junit = null;
-
- @WebMethod(operationName = "SDNCAdapterCallback")
- @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
- public SDNCAdapterResponse sdncAdapterCallback(
- @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
- SDNCAdapterCallbackRequest sdncAdapterCallbackRequest) {
-
- //Callback URL to use http://localhost:8080/mso/SDNCAdapterCallbackService
- ProcessEngineServices pes = getProcessEngineServices();
- RuntimeService runtimeService = pes.getRuntimeService();
- String receivedRequestId = sdncAdapterCallbackRequest.getCallbackHeader().getRequestId();
- msoLogger.setServiceName("MSO." + "sdncAdapter");
- msoLogger.setLogContext(receivedRequestId, "N/A");
- msoLogger.debug(logMarker + "Received callback response:" + sdncAdapterCallbackRequest.toString());
- SDNCAdapterResponse sdncAdapterResponse;
- long startTime = System.currentTimeMillis();
-
- /* Check to make sure the process instance is reay for correlation*/
- isReadyforCorrelation(runtimeService, receivedRequestId);
-
- msoLogger.debug(logMarker + "*** Received MSO sdncAdapterCallbackService ******");
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO sdncAdapterCallbackService");
-
- msoLogger.debug(logMarker + "Callback response string:\n" + sdncAdapterCallbackRequest.toString());
-
- String reqId = receivedRequestId;
- Map<String,Object> variables = new HashMap<String,Object>();
- variables.put("SDNCA_requestId", reqId );
- variables.put("sdncAdapterCallbackRequest", sdncAdapterCallbackRequest.toString());
-
- /*Correlating the response with the running instance*/
-
- // NOTE: the following loop is a workaround for problems we've had
- // with reliability of the runtime service. It seems that queries
- // sometimes return results, and sometimes they don't. This might
- // be a problem in mysql only. We aren't sure if it affects camunda
- // on oracle or mariadb. The workaround is to repeat the request
- // a number of times until it succeeds. If it doesn't succeed after
- // 60 tries, then we give up.
-
- int maxAttempts = DEFAULT_RETRY_ATTEMPTS;
- int attempt = 1;
- int sleepTime = DEFAULT_SLEEP_TIME;
-
- Map<String,String> bpmnProperties = getMSOBPMNURNProperties();
- if (bpmnProperties != null) {
- try {
- maxAttempts = Integer.parseInt(bpmnProperties.get("mso.callbackRetryAttempts"));
- msoLogger.debug(logMarker + "mso.callbackRetryAttempts=" + maxAttempts);
- sleepTime = Integer.parseInt(bpmnProperties.get("mso.callbackRetrySleepTime"));
- msoLogger.debug(logMarker + "mso.callbackRetrySleepTime:" + sleepTime);
- } catch (Exception ex) {
-
- msoLogger.info (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", logMarker
- + "Error parsing mso.callbackRetrySleepTime/mso.callbackRetryAttempts:"
- + sleepTime + ":"
- + maxAttempts);
-
- msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logMarker
- + "Error parsing mso.callbackRetrySleepTime/mso.callbackRetryAttempts:"
- + sleepTime + ":"
- + maxAttempts);
-
- }
- }
-
- while (true) {
- try {
- // sdncAdapterCallbackRequest is the message event name (defined in the bpmn process)
- runtimeService.createMessageCorrelation("sdncAdapterCallbackRequest")
- .setVariables(variables)
- .processInstanceVariableEquals("SDNCA_requestId", reqId).correlate();
- sdncAdapterResponse = new SDNCAdapterResponse();
- msoLogger.debug(logMarker + "***** Completed processing of MSO sdncAdapterCallbackService ******");
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
- + "Completed the execution of MSO SDNCAdapterCallbackService.");
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN",
- MsoLogger.getServiceName(), "sdncAdapterCallback");
-
- return sdncAdapterResponse;
- } catch(MismatchingMessageCorrelationException e) {
- msoLogger.debug(logMarker + "[CORM]correlation id mismatch (attempt " + attempt + "/" + maxAttempts + ")");
- if (attempt == maxAttempts) {
- // Couldn't correlate requestId to any active flow
- //MsoLogger logger = MsoLogger.getMsoLogger("SDNCAdapterCallbackService");
- String msg =
- "SDNC Adapter Callback Service received a SDNC Adapter Callback Request with RequestId '"
- + receivedRequestId
- + "' but that RequestId could not be correlated to any active process - ignoring the Request";
- sdncAdapterResponse = new SDNCAdapterExceptionResponse(e);
-
- msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
- + "Completed the execution of MSO SDNCAdapterCallbackService." );
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN",
- MsoLogger.getServiceName(), "sdncAdapterCallback");
-
- return sdncAdapterResponse;
- }
-
- try {
- Thread.sleep(sleepTime);
- } catch (InterruptedException e2) {
- String msg =
- "SDNC Adapter Callback Service received a SDNC Adapter Callback Request with RequestId '"
- + receivedRequestId
- + "' but correlation was interrupted";
- sdncAdapterResponse = new SDNCAdapterExceptionResponse(e);
-
- msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
- + "Completed the execution of MSO SDNCAdapterCallbackService.");
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN",
- MsoLogger.getServiceName(), "sdncAdapterCallback");
-
- return sdncAdapterResponse;
- }
- }
-
- attempt++;
- }
- }
-
-
- private Map<String,String> getMSOBPMNURNProperties() {
- PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
- Map<String,String> props = propertyConfiguration.getProperties("mso.bpmn.urn.properties");
- return props;
- }
-
- private void isReadyforCorrelation(RuntimeService runtimeService,
- String receivedRequestId) {
- long waitingInstances = runtimeService.createExecutionQuery() //
- .messageEventSubscriptionName("sdncAdapterCallbackRequest")
- .processVariableValueEquals("SDNCA_requestId", receivedRequestId).count();
- //Workaround for performance testing, explicit wait for a second for the transactions to be committed
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e1) {
- }
-
- int retries = 50;
- while (waitingInstances==0 && retries > 0) {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
-
- msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, logMarker, e);
-
- } // you can still play with the numbers
- waitingInstances = runtimeService.createExecutionQuery() //
- .messageEventSubscriptionName("sdncAdapterCallbackRequest")
- .processVariableValueEquals("SDNCA_requestId", receivedRequestId).count();
- retries--;
- }
- }
-
- private ProcessEngineServices getProcessEngineServices() {
- if (pes4junit == null) {
- return BpmPlatform.getDefaultProcessEngine();
- } else {
- return pes4junit;
- }
- }
-
- @WebMethod(exclude=true)
- public void setProcessEngineServices4junit(ProcessEngineServices pes) {
- pes4junit = pes;
- }
-
- public class SDNCAdapterExceptionResponse extends SDNCAdapterResponse {
- private Exception ex;
-
- public SDNCAdapterExceptionResponse(Exception ex) {
- super();
- this.ex = ex;
- }
-
- public Exception getException() {
- return ex;
- }
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.ws.rs.core.Context;
+import javax.xml.ws.WebServiceContext;
+
+import org.camunda.bpm.BpmPlatform;
+import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.runtime.ExecutionQuery;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.SDNCAdapterResponse;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.SDNCCallbackAdapterPortType;
+import org.openecomp.mso.bpmn.core.PropertyConfiguration;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+/**
+ * @version 1.0
+ *
+ */
+@WebService(serviceName="SDNCAdapterCallbackService", targetNamespace="http://org.openecomp/workflow/sdnc/adapter/schema/v1")
+public class SDNCAdapterCallbackServiceImpl implements SDNCCallbackAdapterPortType {
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private final int DEFAULT_RETRY_ATTEMPTS = 60;
+ private final int DEFAULT_SLEEP_TIME = 500;
+
+ private final String logMarker = "[SDNC-CALLBACK]";
+
+ @Context WebServiceContext wsContext;
+
+ private volatile ProcessEngineServices pes4junit = null;
+
+ @WebMethod(operationName = "SDNCAdapterCallback")
+ @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://org.openecomp/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
+ public SDNCAdapterResponse sdncAdapterCallback(
+ @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://org.openecomp/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
+ SDNCAdapterCallbackRequest sdncAdapterCallbackRequest) {
+
+ //Callback URL to use http://localhost:28080/mso/SDNCAdapterCallbackService
+ ProcessEngineServices pes = getProcessEngineServices();
+ RuntimeService runtimeService = pes.getRuntimeService();
+ String receivedRequestId = sdncAdapterCallbackRequest.getCallbackHeader().getRequestId();
+ MsoLogger.setServiceName("MSO." + "sdncAdapter");
+ MsoLogger.setLogContext(receivedRequestId, "N/A");
+ msoLogger.debug(logMarker + "Received callback response:" + sdncAdapterCallbackRequest.toString());
+ SDNCAdapterResponse sdncAdapterResponse;
+ long startTime = System.currentTimeMillis();
+
+ /*Correlating the response with the running instance*/
+
+ // NOTE: the following loop is a workaround for problems we've had
+ // with reliability of the runtime service. It seems that queries
+ // sometimes return results, and sometimes they don't. This might
+ // be a problem in mysql only. We aren't sure if it affects camunda
+ // on oracle or mariadb. The workaround is to repeat the request
+ // a number of times until it succeeds. If it doesn't succeed after
+ // 60 tries, then we give up.
+
+ int maxAttempts = DEFAULT_RETRY_ATTEMPTS;
+ int attempt = 1;
+ int sleepTime = DEFAULT_SLEEP_TIME;
+
+ Map<String,String> bpmnProperties = getMSOBPMNURNProperties();
+ if (bpmnProperties != null) {
+ try {
+ maxAttempts = Integer.parseInt(bpmnProperties.get("mso.callbackRetryAttempts"));
+ msoLogger.debug(logMarker + "mso.callbackRetryAttempts=" + maxAttempts);
+ sleepTime = Integer.parseInt(bpmnProperties.get("mso.callbackRetrySleepTime"));
+ msoLogger.debug(logMarker + "mso.callbackRetrySleepTime:" + sleepTime);
+ } catch (Exception ex) {
+
+ msoLogger.debug (logMarker
+ + "Error parsing mso.callbackRetrySleepTime/mso.callbackRetryAttempts:"
+ + sleepTime + ":"
+ + maxAttempts);
+
+ }
+ }
+
+ /* Check to make sure the process instance is reay for correlation*/
+ try{
+ isReadyforCorrelation(runtimeService, receivedRequestId, maxAttempts, sleepTime );
+ }catch(Exception e){
+ String msg =
+ "SDNC Adapter Callback Service received a SDNC Adapter Callback Request with RequestId '"
+ + receivedRequestId
+ + "' but that RequestId doesn't exist or has timed out waiting for the callback";
+ sdncAdapterResponse = new SDNCAdapterExceptionResponse(e);
+
+ msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
+ + "Completed the execution of MSO SDNCAdapterCallbackService." );
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN",
+ MsoLogger.getServiceName(), "sdncAdapterCallback");
+
+ return sdncAdapterResponse;
+ }
+
+ msoLogger.debug(logMarker + "*** Received MSO sdncAdapterCallbackService ******");
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO sdncAdapterCallbackService");
+
+ msoLogger.debug(logMarker + "Callback response string:\n" + sdncAdapterCallbackRequest.toString());
+
+ String reqId = receivedRequestId;
+ Map<String,Object> variables = new HashMap<String,Object>();
+ variables.put("SDNCA_requestId", reqId );
+ variables.put("sdncAdapterCallbackRequest", sdncAdapterCallbackRequest.toString());
+ while (true) {
+ try {
+ // sdncAdapterCallbackRequest is the message event name (defined in the bpmn process)
+ runtimeService.createMessageCorrelation("sdncAdapterCallbackRequest")
+ .setVariables(variables)
+ .processInstanceVariableEquals("SDNCA_requestId", reqId).correlate();
+ sdncAdapterResponse = new SDNCAdapterResponse();
+ msoLogger.debug(logMarker + "***** Completed processing of MSO sdncAdapterCallbackService ******");
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
+ + "Completed the execution of MSO SDNCAdapterCallbackService.");
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN",
+ MsoLogger.getServiceName(), "sdncAdapterCallback");
+
+ return sdncAdapterResponse;
+ } catch(MismatchingMessageCorrelationException e) {
+ msoLogger.debug(logMarker + "[CORM]correlation id mismatch (attempt " + attempt + "/" + maxAttempts + ")");
+ if (attempt == maxAttempts) {
+ // Couldn't correlate requestId to any active flow
+ //MsoLogger logger = MsoLogger.getMsoLogger("SDNCAdapterCallbackService");
+ String msg =
+ "SDNC Adapter Callback Service received a SDNC Adapter Callback Request with RequestId '"
+ + receivedRequestId
+ + "' but that RequestId could not be correlated to any active process - ignoring the Request";
+ sdncAdapterResponse = new SDNCAdapterExceptionResponse(e);
+
+ msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
+ + "Completed the execution of MSO SDNCAdapterCallbackService." );
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN",
+ MsoLogger.getServiceName(), "sdncAdapterCallback");
+
+ return sdncAdapterResponse;
+ }
+
+ try {
+ Thread.sleep(sleepTime);
+ } catch (InterruptedException e2) {
+ String msg =
+ "SDNC Adapter Callback Service received a SDNC Adapter Callback Request with RequestId '"
+ + receivedRequestId
+ + "' but correlation was interrupted";
+ sdncAdapterResponse = new SDNCAdapterExceptionResponse(e);
+
+ msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
+ + "Completed the execution of MSO SDNCAdapterCallbackService.");
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN",
+ MsoLogger.getServiceName(), "sdncAdapterCallback");
+
+ return sdncAdapterResponse;
+ }
+ }
+
+ attempt++;
+ }
+ }
+
+
+ private Map<String,String> getMSOBPMNURNProperties() {
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ Map<String,String> props = propertyConfiguration.getProperties("mso.bpmn.urn.properties");
+ return props;
+ }
+
+ private void isReadyforCorrelation(RuntimeService runtimeService,
+ String receivedRequestId, int retries, int sleepTime){
+ ExecutionQuery waitingInstances = null;
+ long waitingInstancesCount = 0;
+
+ //Workaround for performance testing, explicit wait for a second for the transactions to be committed
+ //Also check to make sure the process didn't timeout before trying to correlate
+
+ do{
+ waitingInstances = runtimeService.createExecutionQuery() //
+ .messageEventSubscriptionName("sdncAdapterCallbackRequest")
+ .processVariableValueEquals("SDNCA_requestId", receivedRequestId);
+ waitingInstancesCount = waitingInstances.count();
+ retries--;
+ msoLogger.debug(logMarker + "waitingInstancesCount: " + waitingInstancesCount);
+ try {
+ Thread.sleep(sleepTime);
+ } catch (InterruptedException e) {
+
+ msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, logMarker, e);
+
+ }
+ }while (waitingInstancesCount==0 && retries > 0);
+ if(waitingInstancesCount > 0){
+ msoLogger.debug(logMarker + "waitingInstancesCount before timeout check: " + waitingInstancesCount);
+ waitingInstancesCount = waitingInstances.processVariableValueEquals("asynchronousResponseTimeout", false).count();
+ msoLogger.debug(logMarker + "waitingInstancesCount after timeout check: " + waitingInstancesCount);
+ if(waitingInstancesCount<=0){
+ msoLogger.debug(logMarker + "detected timeout on flow to correlate");
+ throw new IllegalStateException("process timed out");
+ }
+ }else{
+ //flow may have already ended, so can't check timeout variable. Throw exception?
+ msoLogger.debug(logMarker + "no flow to correlate to");
+ throw new IllegalStateException("no flow to correlate to");
+ }
+ }
+
+ private ProcessEngineServices getProcessEngineServices() {
+ if (pes4junit == null) {
+ return BpmPlatform.getDefaultProcessEngine();
+ } else {
+ return pes4junit;
+ }
+ }
+
+ @WebMethod(exclude=true)
+ public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+ pes4junit = pes;
+ }
+
+ public class SDNCAdapterExceptionResponse extends SDNCAdapterResponse {
+ private Exception ex;
+
+ public SDNCAdapterExceptionResponse(Exception ex) {
+ super();
+ this.ex = ex;
+ }
+
+ public Exception getException() {
+ return ex;
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
index 509f9c67f3..457717243a 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.bpmn.gamma.workflow.service;
+package org.openecomp.mso.bpmn.common.workflow.service;
import java.util.HashMap;
import java.util.Map;
@@ -36,16 +36,15 @@ import org.camunda.bpm.BpmPlatform;
import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
import org.camunda.bpm.engine.ProcessEngineServices;
import org.camunda.bpm.engine.RuntimeService;
-
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.DeleteVnfNotification;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.MsoExceptionCategory;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.RollbackVnfNotification;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfAdapterNotify;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfRollback;
-import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfStatus;
+import org.openecomp.mso.bpmn.common.adapter.vnf.CreateVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.DeleteVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.MsoExceptionCategory;
+import org.openecomp.mso.bpmn.common.adapter.vnf.QueryVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.RollbackVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.VnfAdapterNotify;
+import org.openecomp.mso.bpmn.common.adapter.vnf.VnfRollback;
+import org.openecomp.mso.bpmn.common.adapter.vnf.VnfStatus;
import org.openecomp.mso.logger.MessageEnum;
import org.openecomp.mso.logger.MsoLogger;
@@ -54,7 +53,7 @@ import org.openecomp.mso.logger.MsoLogger;
* TODO: Add addition VnfAdapterNotify Methods for remaining VnfAdapterNotify operations.
*/
-@WebService(serviceName = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify")
+@WebService(serviceName = "vnfAdapterNotify", targetNamespace = "http://org.openecomp.mso/vnfNotify")
public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
@@ -74,8 +73,8 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
*/
@WebMethod(operationName = "rollbackVnfNotification")
@Oneway
- @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest")
+ @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/rollbackVnfNotificationRequest")
public void rollbackVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -160,8 +159,8 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
*/
@WebMethod(operationName = "queryVnfNotification")
@Oneway
- @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest")
+ @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/queryVnfNotificationRequest")
public void queryVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -178,7 +177,7 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
@WebParam(name = "status", targetNamespace = "")
VnfStatus status,
@WebParam(name = "outputs", targetNamespace = "")
- com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification.Outputs outputs){
+ org.openecomp.mso.bpmn.common.adapter.vnf.QueryVnfNotification.Outputs outputs){
QueryVnfNotification queryVnfNotification = new QueryVnfNotification();
@@ -195,8 +194,8 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
ProcessEngineServices pes = getProcessEngineServices();
RuntimeService runtimeService = pes.getRuntimeService();
- msoLogger.setServiceName("MSO." + "vnf Adapter Query");
- msoLogger.setLogContext(messageId, "N/A");
+ MsoLogger.setServiceName("MSO." + "vnf Adapter Query");
+ MsoLogger.setLogContext(messageId, "N/A");
msoLogger.debug(logMarker + "Received QueryVnfNotification" + queryVnfNotification.toString());
System.out.println("Received QueryVnfNotification : " + queryVnfNotification.toString());
@@ -253,8 +252,8 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
*/
@WebMethod(operationName = "createVnfNotification")
@Oneway
- @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest")
+ @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/createVnfNotificationRequest")
public void createVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -267,7 +266,7 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
@WebParam(name = "vnfId", targetNamespace = "")
String vnfId,
@WebParam(name = "outputs", targetNamespace = "")
- com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs outputs,
+ org.openecomp.mso.bpmn.common.adapter.vnf.CreateVnfNotification.Outputs outputs,
@WebParam(name = "rollback", targetNamespace = "")
VnfRollback rollback){
@@ -284,8 +283,8 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
ProcessEngineServices pes = getProcessEngineServices();
RuntimeService runtimeService = pes.getRuntimeService();
- msoLogger.setServiceName("MSO." + "vnf Adapter Create");
- msoLogger.setLogContext(messageId, "N/A");
+ MsoLogger.setServiceName("MSO." + "vnf Adapter Create");
+ MsoLogger.setLogContext(messageId, "N/A");
msoLogger.debug(logMarker + "Received CreateVnfNotification - " + createVnfNotification.toString());
long startTime = System.currentTimeMillis();
@@ -341,8 +340,8 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
*/
@WebMethod(operationName = "updateVnfNotification")
@Oneway
- @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest")
+ @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/updateVnfNotificationRequest")
public void updateVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -353,7 +352,7 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
@WebParam(name = "errorMessage", targetNamespace = "")
String errorMessage,
@WebParam(name = "outputs", targetNamespace = "")
- com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification.Outputs outputs,
+ org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification.Outputs outputs,
@WebParam(name = "rollback", targetNamespace = "")
VnfRollback rollback){
@@ -369,8 +368,8 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
ProcessEngineServices pes = getProcessEngineServices();
RuntimeService runtimeService = pes.getRuntimeService();
- msoLogger.setServiceName("MSO." + "vnf Adapter Update");
- msoLogger.setLogContext(messageId, "N/A");
+ MsoLogger.setServiceName("MSO." + "vnf Adapter Update");
+ MsoLogger.setLogContext(messageId, "N/A");
msoLogger.debug(logMarker + "Received UpdateVnfNotification - " + updateVnfNotification.toString());
long startTime = System.currentTimeMillis();
@@ -423,11 +422,11 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
* @param completed
*/
- //@WebService(serviceName="VNFAdapterDeleteCallbackV1", targetNamespace="http://com.att.mso/vnfNotify")
+ //@WebService(serviceName="VNFAdapterDeleteCallbackV1", targetNamespace="http://org.openecomp.mso/vnfNotify")
@WebMethod(operationName = "deleteVnfNotification")
@Oneway
- @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification")
- @Action(input = "http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest")
+ @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://org.openecomp.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification")
+ @Action(input = "http://org.openecomp.mso/notify/adapterNotify/deleteVnfNotificationRequest")
public void deleteVnfNotification(
@WebParam(name = "messageId", targetNamespace = "")
String messageId,
@@ -438,7 +437,7 @@ public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
@WebParam(name = "errorMessage", targetNamespace = "")
String errorMessage) {
- //Callback URL to use http://localhost:8080/mso/services/VNFAdapterDeleteCallbackV1
+ //Callback URL to use http://localhost:28080/mso/services/VNFAdapterDeleteCallbackV1
//DeleteVnfNotification Class
DeleteVnfNotification deleteVnfNotification = new DeleteVnfNotification();
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java
index 9c60bb9dd0..c0ea0cf874 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java
@@ -1,34 +1,36 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts.beans
-import javax.xml.bind.annotation.XmlAccessType
-import javax.xml.bind.annotation.XmlAccessorType
-@XmlAccessorType(XmlAccessType.FIELD)
-class SAOTSTRequest {
- String vlanId
- String functionalArea
- String problem
- String descr
- String activeOrg
- String managingOrg
- String workQueue
- String reportedProduct
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+
+
+public class WorkflowAsyncCommonResource extends WorkflowAsyncResource {
+
+ protected ProcessEngineServices getProcessEngineServices() {
+ if (pes4junit == null) {
+ return ProcessEngines.getProcessEngine("common");
+ } else {
+ return pes4junit;
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java
index 2302b76750..b13ac46784 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowAsyncResource.java
@@ -1,302 +1,293 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Response;
-
-import org.camunda.bpm.engine.ProcessEngineServices;
-import org.camunda.bpm.engine.ProcessEngines;
-import org.camunda.bpm.engine.RuntimeService;
-import org.camunda.bpm.engine.impl.core.variable.VariableMapImpl;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.jboss.resteasy.annotations.Suspend;
-import org.jboss.resteasy.spi.AsynchronousResponse;
-import org.slf4j.MDC;
-
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
-
-
-/**
- *
- * @version 1.0
- * Asynchronous Workflow processing using JAX RS RESTeasy implementation
- * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background
- * and the server thread is freed up, server scales better to process more incoming requests
- *
- * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response
- * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process
- */
-@Path("/async")
-public class WorkflowAsyncResource {
-
- private WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
- private ProcessEngineServices pes4junit = null;
-
- private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
-
- private static final String logMarker = "[WRKFLOW-RESOURCE]";
- private static final int DEFAULT_WAIT_TIME = 30000; //default wait time
-
- /**
- * Asynchronous JAX-RS method that starts a process instance.
- * @param asyncResponse an object that will receive the asynchronous response
- * @param processKey the process key
- * @param variableMap input variables to the process
- */
- @POST
- @Path("/services/{processKey}")
- @Produces("application/json")
- @Consumes("application/json")
- public void startProcessInstanceByKey(final @Suspend(180000) AsynchronousResponse asyncResponse,
- @PathParam("processKey") String processKey, VariableMapImpl variableMap) {
-
- WorkflowResponse response = new WorkflowResponse();
- long startTime = System.currentTimeMillis();
- Map<String, Object> inputVariables = null;
- WorkflowContext workflowContext = null;
-
- try {
- inputVariables = getInputVariables(variableMap);
- setLogContext(processKey, inputVariables);
-
- // This variable indicates that the flow was invoked asynchronously
- inputVariables.put("isAsyncProcess", "true");
-
- workflowContext = new WorkflowContext(processKey, getRequestId(inputVariables),
- asyncResponse, getWaitTime(inputVariables));
-
- msoLogger.debug("Adding the workflow context into holder: "
- + workflowContext.getProcessKey() + ":"
- + workflowContext.getRequestId() + ":"
- + workflowContext.getTimeout());
-
- contextHolder.put(workflowContext);
-
- ProcessThread processThread = new ProcessThread(processKey, inputVariables);
- processThread.start();
- } catch (Exception e) {
- setLogContext(processKey, inputVariables);
-
- if (workflowContext != null) {
- contextHolder.remove(workflowContext);
- }
-
- msoLogger.debug(logMarker + "Exception in startProcessInstance by key");
- response.setMessage("Fail" );
- response.setResponse("Error occurred while executing the process: " + e);
- response.setMessageCode(500);
- recordEvents(processKey, response, startTime);
-
- msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logMarker
- + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse());
-
- Response errorResponse = Response.serverError().entity(response).build();
- asyncResponse.setResponse(errorResponse);
- }
- }
-
- /**
- *
- * @version 1.0
- *
- */
- class ProcessThread extends Thread {
- private final String processKey;
- private final Map<String,Object> inputVariables;
-
- public ProcessThread(String processKey, Map<String, Object> inputVariables) {
- this.processKey = processKey;
- this.inputVariables = inputVariables;
- }
-
- public void run() {
-
- String processInstanceId = null;
- long startTime = System.currentTimeMillis();
-
- try {
- setLogContext(processKey, inputVariables);
-
- // Note: this creates a random businessKey if it wasn't specified.
- String businessKey = getBusinessKey(inputVariables);
-
- msoLogger.debug(logMarker + "***Received MSO startProcessInstanceByKey with processKey: "
- + processKey + " and variables: " + inputVariables);
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
- + "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with processKey:"
- + processKey + " and variables: " + inputVariables);
-
- RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
- ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(
- processKey, businessKey, inputVariables);
- processInstanceId = processInstance.getId();
-
- msoLogger.debug(logMarker + "Process " + processKey + ":" + processInstanceId + " " +
- (processInstance.isEnded() ? "ENDED" : "RUNNING"));
- } catch (Exception e) {
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError,
- logMarker + "Error in starting the process: "+ e.getMessage());
-
- WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse();
- callbackResponse.setStatusCode(500);
- callbackResponse.setMessage("Fail");
- callbackResponse.setResponse("Error occurred while executing the process: " + e);
-
- // TODO: is the processInstanceId used by the API handler? I don't think so.
- // It may be null here.
- WorkflowContextHolder.getInstance().processCallback(
- processKey, processInstanceId,
- getRequestId(inputVariables),
- callbackResponse);
- }
- }
- }
-
-
- /**
- * Callback resource which is invoked from BPMN to process to send the workflow response
- *
- * @param processKey
- * @param processInstanceId
- * @param requestId
- * @param callbackResponse
- * @return
- */
- @POST
- @Path("/services/callback/{processKey}/{processInstanceId}/{requestId}")
- @Produces("application/json")
- @Consumes("application/json")
- public Response processWorkflowCallback(
- @PathParam("processKey") String processKey,
- @PathParam("processInstanceId") String processInstanceId,
- @PathParam("requestId")String requestId,
- WorkflowCallbackResponse callbackResponse) {
-
- msoLogger.debug(logMarker + "Process instance ID:" + processInstanceId + ":" + requestId + ":" + processKey + ":" + isProcessEnded(processInstanceId));
- msoLogger.debug(logMarker + "About to process the callback request:" + callbackResponse.getResponse() + ":" + callbackResponse.getMessage() + ":" + callbackResponse.getStatusCode());
- return contextHolder.processCallback(processKey, processInstanceId, requestId, callbackResponse);
- }
-
- // Note: the business key is used to identify the process in unit tests
- private String getBusinessKey(Map<String, Object> inputVariables) {
- Object businessKey = inputVariables.get("att-mso-business-key");
- if (businessKey == null ) {
- businessKey = UUID.randomUUID().toString();
- inputVariables.put("att-mso-business-key", businessKey);
- }
- return businessKey.toString();
- }
-
- private String getRequestId(Map<String, Object> inputVariables) {
- Object requestId = inputVariables.get("att-mso-request-id");
- if (requestId == null ) {
- requestId = UUID.randomUUID().toString();
- inputVariables.put("att-mso-request-id", requestId);
- }
- return requestId.toString();
- }
-
- private long getWaitTime(Map<String, Object> inputVariables)
- {
- String timeout = inputVariables.get("att-mso-service-request-timeout") == null
- ? null : inputVariables.get("att-mso-service-request-timeout").toString();
-
- if (timeout != null) {
- try {
- return Long.parseLong(timeout)*1000;
- } catch (NumberFormatException nex) {
- msoLogger.debug("Invalid input for att-mso-service-request-timeout");
- }
- }
-
- return DEFAULT_WAIT_TIME;
- }
-
- private void recordEvents(String processKey, WorkflowResponse response,
- long startTime) {
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- logMarker + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- logMarker + response.getMessage() + "for processKey: " + processKey + " with response: " + response.getResponse());
-
- }
-
- private void setLogContext(String processKey,
- Map<String, Object> inputVariables) {
- MsoLogger.setServiceName("MSO." + processKey);
- if (inputVariables != null) {
- MsoLogger.setLogContext(getKeyValueFromInputVariables(inputVariables,"att-mso-request-id"), getKeyValueFromInputVariables(inputVariables,"att-mso-service-instance-id"));
- }
- }
-
- private String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {
- if (inputVariables == null) return "";
- Object requestId = inputVariables.get(key);
- if (requestId != null) return requestId.toString();
- return "N/A";
- }
-
- private boolean isProcessEnded(String processInstanceId) {
- ProcessEngineServices pes = getProcessEngineServices();
- return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;
- }
-
-
- private ProcessEngineServices getProcessEngineServices() {
- if (pes4junit == null) {
- return ProcessEngines.getDefaultProcessEngine();
- } else {
- return pes4junit;
- }
- }
-
- public void setProcessEngineServices4junit(ProcessEngineServices pes) {
- pes4junit = pes;
- }
-
- private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
- Map<String, Object> inputVariables = new HashMap<String,Object>();
- @SuppressWarnings("unchecked")
- Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
- for (String vName : vMap.keySet()) {
- @SuppressWarnings("unchecked")
- Map<String, Object> valueMap = (Map<String,Object>)vMap.get(vName); // value, type
- inputVariables.put(vName, valueMap.get("value"));
- }
- return inputVariables;
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.jboss.resteasy.annotations.Suspend;
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.slf4j.MDC;
+
+/**
+ *
+ * @version 1.0
+ * Asynchronous Workflow processing using JAX RS RESTeasy implementation
+ * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background
+ * and the server thread is freed up, server scales better to process more incoming requests
+ *
+ * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response
+ * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process
+ */
+@Path("/async")
+public abstract class WorkflowAsyncResource {
+
+ private WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+ protected ProcessEngineServices pes4junit = null;
+
+ private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ private static final String logMarker = "[WRKFLOW-RESOURCE]";
+ private static final int DEFAULT_WAIT_TIME = 30000; //default wait time
+
+ /**
+ * Asynchronous JAX-RS method that starts a process instance.
+ * @param asyncResponse an object that will receive the asynchronous response
+ * @param processKey the process key
+ * @param variableMap input variables to the process
+ */
+ @POST
+ @Path("/services/{processKey}")
+ @Produces("application/json")
+ @Consumes("application/json")
+ public void startProcessInstanceByKey(final @Suspend(180000) AsynchronousResponse asyncResponse,
+ @PathParam("processKey") String processKey, VariableMapImpl variableMap) {
+
+ WorkflowResponse response = new WorkflowResponse();
+ long startTime = System.currentTimeMillis();
+ Map<String, Object> inputVariables = null;
+ WorkflowContext workflowContext = null;
+
+ try {
+ inputVariables = getInputVariables(variableMap);
+ setLogContext(processKey, inputVariables);
+
+ // This variable indicates that the flow was invoked asynchronously
+ inputVariables.put("isAsyncProcess", "true");
+
+ workflowContext = new WorkflowContext(processKey, getRequestId(inputVariables),
+ asyncResponse, getWaitTime(inputVariables));
+
+ msoLogger.debug("Adding the workflow context into holder: "
+ + workflowContext.getProcessKey() + ":"
+ + workflowContext.getRequestId() + ":"
+ + workflowContext.getTimeout());
+
+ contextHolder.put(workflowContext);
+
+ ProcessThread processThread = new ProcessThread(processKey, inputVariables);
+ processThread.start();
+ } catch (Exception e) {
+ setLogContext(processKey, inputVariables);
+
+ if (workflowContext != null) {
+ contextHolder.remove(workflowContext);
+ }
+
+ msoLogger.debug(logMarker + "Exception in startProcessInstance by key");
+ response.setMessage("Fail" );
+ response.setResponse("Error occurred while executing the process: " + e);
+ response.setMessageCode(500);
+ recordEvents(processKey, response, startTime);
+
+ msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logMarker
+ + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse());
+
+ Response errorResponse = Response.serverError().entity(response).build();
+ asyncResponse.setResponse(errorResponse);
+ }
+ }
+
+ /**
+ *
+ * @version 1.0
+ *
+ */
+ class ProcessThread extends Thread {
+ private final String processKey;
+ private final Map<String,Object> inputVariables;
+
+ public ProcessThread(String processKey, Map<String, Object> inputVariables) {
+ this.processKey = processKey;
+ this.inputVariables = inputVariables;
+ }
+
+ public void run() {
+
+ String processInstanceId = null;
+ long startTime = System.currentTimeMillis();
+
+ try {
+ setLogContext(processKey, inputVariables);
+
+ // Note: this creates a random businessKey if it wasn't specified.
+ String businessKey = getBusinessKey(inputVariables);
+
+ msoLogger.debug(logMarker + "***Received MSO startProcessInstanceByKey with processKey: "
+ + processKey + " and variables: " + inputVariables);
+
+ msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
+ + "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with processKey:"
+ + processKey + " and variables: " + inputVariables);
+
+ RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+ ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(
+ processKey, businessKey, inputVariables);
+ processInstanceId = processInstance.getId();
+
+ msoLogger.debug(logMarker + "Process " + processKey + ":" + processInstanceId + " " +
+ (processInstance.isEnded() ? "ENDED" : "RUNNING"));
+ } catch (Exception e) {
+
+ msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError,
+ logMarker + "Error in starting the process: "+ e.getMessage());
+
+ WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse();
+ callbackResponse.setStatusCode(500);
+ callbackResponse.setMessage("Fail");
+ callbackResponse.setResponse("Error occurred while executing the process: " + e);
+
+ // TODO: is the processInstanceId used by the API handler? I don't think so.
+ // It may be null here.
+ WorkflowContextHolder.getInstance().processCallback(
+ processKey, processInstanceId,
+ getRequestId(inputVariables),
+ callbackResponse);
+ }
+ }
+ }
+
+
+ /**
+ * Callback resource which is invoked from BPMN to process to send the workflow response
+ *
+ * @param processKey
+ * @param processInstanceId
+ * @param requestId
+ * @param callbackResponse
+ * @return
+ */
+ @POST
+ @Path("/services/callback/{processKey}/{processInstanceId}/{requestId}")
+ @Produces("application/json")
+ @Consumes("application/json")
+ public Response processWorkflowCallback(
+ @PathParam("processKey") String processKey,
+ @PathParam("processInstanceId") String processInstanceId,
+ @PathParam("requestId")String requestId,
+ WorkflowCallbackResponse callbackResponse) {
+
+ msoLogger.debug(logMarker + "Process instance ID:" + processInstanceId + ":" + requestId + ":" + processKey + ":" + isProcessEnded(processInstanceId));
+ msoLogger.debug(logMarker + "About to process the callback request:" + callbackResponse.getResponse() + ":" + callbackResponse.getMessage() + ":" + callbackResponse.getStatusCode());
+ return contextHolder.processCallback(processKey, processInstanceId, requestId, callbackResponse);
+ }
+
+ // Note: the business key is used to identify the process in unit tests
+ private String getBusinessKey(Map<String, Object> inputVariables) {
+ Object businessKey = inputVariables.get("mso-business-key");
+ if (businessKey == null ) {
+ businessKey = UUID.randomUUID().toString();
+ inputVariables.put("mso-business-key", businessKey);
+ }
+ return businessKey.toString();
+ }
+
+ private String getRequestId(Map<String, Object> inputVariables) {
+ Object requestId = inputVariables.get("mso-request-id");
+ if (requestId == null ) {
+ requestId = UUID.randomUUID().toString();
+ inputVariables.put("mso-request-id", requestId);
+ }
+ return requestId.toString();
+ }
+
+ private long getWaitTime(Map<String, Object> inputVariables)
+ {
+ String timeout = inputVariables.get("mso-service-request-timeout") == null
+ ? null : inputVariables.get("mso-service-request-timeout").toString();
+
+ if (timeout != null) {
+ try {
+ return Long.parseLong(timeout)*1000;
+ } catch (NumberFormatException nex) {
+ msoLogger.debug("Invalid input for mso-service-request-timeout");
+ }
+ }
+
+ return DEFAULT_WAIT_TIME;
+ }
+
+ private void recordEvents(String processKey, WorkflowResponse response,
+ long startTime) {
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + response.getMessage() + "for processKey: " + processKey + " with response: " + response.getResponse());
+
+ }
+
+ private void setLogContext(String processKey,
+ Map<String, Object> inputVariables) {
+ MsoLogger.setServiceName("MSO." + processKey);
+ if (inputVariables != null) {
+ MsoLogger.setLogContext(getKeyValueFromInputVariables(inputVariables,"mso-request-id"), getKeyValueFromInputVariables(inputVariables,"mso-service-instance-id"));
+ }
+ }
+
+ private String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+ if (inputVariables == null) return "";
+ Object requestId = inputVariables.get(key);
+ if (requestId != null) return requestId.toString();
+ return "N/A";
+ }
+
+ private boolean isProcessEnded(String processInstanceId) {
+ ProcessEngineServices pes = getProcessEngineServices();
+ return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;
+ }
+
+
+ protected abstract ProcessEngineServices getProcessEngineServices();
+
+ public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+ pes4junit = pes;
+ }
+
+ private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+ Map<String, Object> inputVariables = new HashMap<String,Object>();
+ @SuppressWarnings("unchecked")
+ Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
+ for (String vName : vMap.keySet()) {
+ @SuppressWarnings("unchecked")
+ Map<String, Object> valueMap = (Map<String,Object>)vMap.get(vName); // value, type
+ inputVariables.put(vName, valueMap.get("value"));
+ }
+ return inputVariables;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowCallbackResponse.java
index 425f0b20ad..945d64d81a 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowCallbackResponse.java
@@ -1,52 +1,52 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-/**
- * @version 1.0
- * Workflow Response bean to generate workflow response in JSON format
- */
-public class WorkflowCallbackResponse {
-
- private String response;
- private int statusCode;
- private String message;
-
- public String getResponse() {
- return response;
- }
- public void setResponse(String response) {
- this.response = response;
- }
- public int getStatusCode() {
- return statusCode;
- }
- public void setStatusCode(int statusCode) {
- this.statusCode = statusCode;
- }
- public String getMessage() {
- return message;
- }
- public void setMessage(String message) {
- this.message = message;
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+/**
+ * @version 1.0
+ * Workflow Response bean to generate workflow response in JSON format
+ */
+public class WorkflowCallbackResponse {
+
+ private String response;
+ private int statusCode;
+ private String message;
+
+ public String getResponse() {
+ return response;
+ }
+ public void setResponse(String response) {
+ this.response = response;
+ }
+ public int getStatusCode() {
+ return statusCode;
+ }
+ public void setStatusCode(int statusCode) {
+ this.statusCode = statusCode;
+ }
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContext.java
index f44dfa9ccc..3d7e333fdf 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContext.java
@@ -1,96 +1,96 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.util.concurrent.Delayed;
-import java.util.concurrent.TimeUnit;
-
-import org.jboss.resteasy.spi.AsynchronousResponse;
-
-/**
- * @version 1.0
- * Workflow context object used to send timeout response, if workflow instance does not write the response in time
- */
-public class WorkflowContext implements Delayed {
- private final String processKey;
- private final String requestId;
- private final AsynchronousResponse asynchronousResponse;
- private final long startTime;
- private final long timeout;
-
- public WorkflowContext(String processKey, String requestId,
- AsynchronousResponse asynchronousResponse, long timeout) {
- this.processKey = processKey;
- this.requestId = requestId;
- this.asynchronousResponse = asynchronousResponse;
- this.timeout = timeout;
- this.startTime = System.currentTimeMillis();
- }
-
- public String getRequestId() {
- return requestId;
- }
-
- public String getProcessKey() {
- return processKey;
- }
-
- public AsynchronousResponse getAsynchronousResponse() {
- return asynchronousResponse;
- }
-
- public long getTimeout() {
- return timeout;
- }
-
- public long getStartTime() {
- return startTime;
- }
-
- /**
- * Required implementation by Delay queue
- * Returns the elapsed time for this context
- */
- @Override
- public long getDelay(TimeUnit unit) {
- // 0 or negative means this object is considered to be expired
- return unit.convert(startTime + timeout - System.currentTimeMillis(), unit);
- }
-
- /**
- * Required implementation by Delay queue
- * Compares the object to determine whether the object can be marked as expired
- */
- @Override
- public int compareTo(Delayed object) {
- WorkflowContext that = (WorkflowContext) object;
- long thisEndTime = startTime + timeout;
- long thatEndTime = that.startTime + that.timeout;
-
- if (thisEndTime < thatEndTime) {
- return -1;
- } else if (thisEndTime > thatEndTime) {
- return 1;
- } else {
- return 0;
- }
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.concurrent.Delayed;
+import java.util.concurrent.TimeUnit;
+
+import org.jboss.resteasy.spi.AsynchronousResponse;
+
+/**
+ * @version 1.0
+ * Workflow context object used to send timeout response, if workflow instance does not write the response in time
+ */
+public class WorkflowContext implements Delayed {
+ private final String processKey;
+ private final String requestId;
+ private final AsynchronousResponse asynchronousResponse;
+ private final long startTime;
+ private final long timeout;
+
+ public WorkflowContext(String processKey, String requestId,
+ AsynchronousResponse asynchronousResponse, long timeout) {
+ this.processKey = processKey;
+ this.requestId = requestId;
+ this.asynchronousResponse = asynchronousResponse;
+ this.timeout = timeout;
+ this.startTime = System.currentTimeMillis();
+ }
+
+ public String getRequestId() {
+ return requestId;
+ }
+
+ public String getProcessKey() {
+ return processKey;
+ }
+
+ public AsynchronousResponse getAsynchronousResponse() {
+ return asynchronousResponse;
+ }
+
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public long getStartTime() {
+ return startTime;
+ }
+
+ /**
+ * Required implementation by Delay queue
+ * Returns the elapsed time for this context
+ */
+ @Override
+ public long getDelay(TimeUnit unit) {
+ // 0 or negative means this object is considered to be expired
+ return unit.convert(startTime + timeout - System.currentTimeMillis(), unit);
+ }
+
+ /**
+ * Required implementation by Delay queue
+ * Compares the object to determine whether the object can be marked as expired
+ */
+ @Override
+ public int compareTo(Delayed object) {
+ WorkflowContext that = (WorkflowContext) object;
+ long thisEndTime = startTime + timeout;
+ long thatEndTime = that.startTime + that.timeout;
+
+ if (thisEndTime < thatEndTime) {
+ return -1;
+ } else if (thisEndTime > thatEndTime) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java
index a42a6d67a8..ca3b1f1390 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java
@@ -1,188 +1,188 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.util.concurrent.DelayQueue;
-import java.util.concurrent.TimeUnit;
-
-import javax.ws.rs.core.Response;
-
-import org.jboss.resteasy.spi.AsynchronousResponse;
-import org.slf4j.MDC;
-
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
-
-/**
- * Workflow Context Holder instance which can be accessed elsewhere either in groovy scripts or Java
- * @version 1.0
- *
- */
-public class WorkflowContextHolder {
-
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- private static final String logMarker = "[WORKFLOW-CONTEXT-HOLDER]";
- private static WorkflowContextHolder instance = null;
-
- /**
- * Delay Queue which holds workflow context holder objects
- */
- private final DelayQueue<WorkflowContext> responseQueue = new DelayQueue<WorkflowContext>();
- private final TimeoutThread timeoutThread = new TimeoutThread();
-
- private WorkflowContextHolder() {
- timeoutThread.start();
- }
-
- /**
- * Singleton holder which eliminates hot lock
- * Since the JVM synchronizes static method there is no synchronization needed for this method
- * @return
- */
- public static synchronized WorkflowContextHolder getInstance() {
- if (instance == null) {
- instance = new WorkflowContextHolder();
- }
- return instance;
- }
-
- public void put(WorkflowContext context) {
- msoLogger.debug(logMarker + " Adding context to the queue: "
- + context.getRequestId());
- responseQueue.put(context);
- }
-
- public void remove(WorkflowContext context) {
- msoLogger.debug(logMarker + " Removing context from the queue: "
- + context.getRequestId());
- responseQueue.remove(context);
- }
-
- public WorkflowContext getWorkflowContext(String requestId) {
- // Note: DelayQueue interator is threadsafe
- for (WorkflowContext context : responseQueue) {
- if (requestId.equals(context.getRequestId())) {
- msoLogger.debug("Found context for request id: " + requestId);
- return context;
- }
- }
-
- msoLogger.debug("Unable to find context for request id: " + requestId);
- return null;
- }
-
- /**
- * Builds the callback response object to respond to client
- * @param processKey
- * @param processInstanceId
- * @param requestId
- * @param callbackResponse
- * @return
- */
- public Response processCallback(String processKey, String processInstanceId,
- String requestId, WorkflowCallbackResponse callbackResponse) {
- WorkflowResponse workflowResponse = new WorkflowResponse();
- WorkflowContext workflowContext = getWorkflowContext(requestId);
-
- if (workflowContext == null) {
- msoLogger.debug("Unable to correlate workflow context for request id: " + requestId
- + ":processInstance Id:" + processInstanceId
- + ":process key:" + processKey);
- workflowResponse.setMessage("Fail");
- workflowResponse.setMessageCode(400);
- workflowResponse.setResponse("Unable to correlate workflow context, bad request. Request Id: " + requestId);
- return Response.serverError().entity(workflowResponse).build();
- }
-
- responseQueue.remove(workflowContext);
-
- msoLogger.debug("Using callback response for request id: " + requestId);
- workflowResponse.setResponse(callbackResponse.getResponse());
- workflowResponse.setProcessInstanceID(processInstanceId);
- workflowResponse.setMessageCode(callbackResponse.getStatusCode());
- workflowResponse.setMessage(callbackResponse.getMessage());
- sendWorkflowResponseToClient(processKey, workflowContext, workflowResponse);
- return Response.ok().entity(workflowResponse).build();
- }
-
- /**
- * Send the response to client asynchronously when invoked by the BPMN process
- * @param processKey
- * @param workflowContext
- * @param workflowResponse
- */
- private void sendWorkflowResponseToClient(String processKey, WorkflowContext workflowContext,
- WorkflowResponse workflowResponse) {
- msoLogger.debug(logMarker + "Sending the response for request id: " + workflowContext.getRequestId());
- recordEvents(processKey, workflowResponse, workflowContext.getStartTime());
- Response response = Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
- AsynchronousResponse asyncResp = workflowContext.getAsynchronousResponse();
- asyncResp.setResponse(response);
- }
-
- /**
- * Timeout thread which monitors the delay queue for expired context and send timeout response
- * to client
- *
- * */
- private class TimeoutThread extends Thread {
- public void run() {
- while (!isInterrupted()) {
- try {
- WorkflowContext requestObject = responseQueue.take();
- msoLogger.debug("Time remaining for request id: " + requestObject.getRequestId() + ":" + requestObject.getDelay(TimeUnit.MILLISECONDS));
- msoLogger.debug("Preparing timeout response for " + requestObject.getProcessKey() + ":" + ":" + requestObject.getRequestId());
- WorkflowResponse response = new WorkflowResponse();
- response.setMessage("Fail");
- response.setResponse("Request timedout, request id:" + requestObject.getRequestId());
- //response.setProcessInstanceID(requestObject.getProcessInstance().getProcessInstanceId());
- recordEvents(requestObject.getProcessKey(), response, requestObject.getStartTime());
- response.setMessageCode(500);
- Response result = Response.status(500).entity(response).build();
- requestObject.getAsynchronousResponse().setResponse(result);
- msoLogger.debug("Sending timeout response for request id:" + requestObject.getRequestId() + ":response:" + response);
- } catch (InterruptedException e) {
- break;
- } catch (Exception e) {
- msoLogger.debug("WorkflowContextHolder timeout thread caught exception: " + e);
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, "Error in WorkflowContextHolder timeout thread");
-
- }
- }
-
- msoLogger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
- }
- }
-
- private static void recordEvents(String processKey, WorkflowResponse response,
- long startTime) {
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- logMarker + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
- + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse());
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.concurrent.DelayQueue;
+import java.util.concurrent.TimeUnit;
+
+import javax.ws.rs.core.Response;
+
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.slf4j.MDC;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Workflow Context Holder instance which can be accessed elsewhere either in groovy scripts or Java
+ * @version 1.0
+ *
+ */
+public class WorkflowContextHolder {
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static final String logMarker = "[WORKFLOW-CONTEXT-HOLDER]";
+ private static WorkflowContextHolder instance = null;
+
+ /**
+ * Delay Queue which holds workflow context holder objects
+ */
+ private final DelayQueue<WorkflowContext> responseQueue = new DelayQueue<WorkflowContext>();
+ private final TimeoutThread timeoutThread = new TimeoutThread();
+
+ private WorkflowContextHolder() {
+ timeoutThread.start();
+ }
+
+ /**
+ * Singleton holder which eliminates hot lock
+ * Since the JVM synchronizes static method there is no synchronization needed for this method
+ * @return
+ */
+ public static synchronized WorkflowContextHolder getInstance() {
+ if (instance == null) {
+ instance = new WorkflowContextHolder();
+ }
+ return instance;
+ }
+
+ public void put(WorkflowContext context) {
+ msoLogger.debug(logMarker + " Adding context to the queue: "
+ + context.getRequestId());
+ responseQueue.put(context);
+ }
+
+ public void remove(WorkflowContext context) {
+ msoLogger.debug(logMarker + " Removing context from the queue: "
+ + context.getRequestId());
+ responseQueue.remove(context);
+ }
+
+ public WorkflowContext getWorkflowContext(String requestId) {
+ // Note: DelayQueue interator is threadsafe
+ for (WorkflowContext context : responseQueue) {
+ if (requestId.equals(context.getRequestId())) {
+ msoLogger.debug("Found context for request id: " + requestId);
+ return context;
+ }
+ }
+
+ msoLogger.debug("Unable to find context for request id: " + requestId);
+ return null;
+ }
+
+ /**
+ * Builds the callback response object to respond to client
+ * @param processKey
+ * @param processInstanceId
+ * @param requestId
+ * @param callbackResponse
+ * @return
+ */
+ public Response processCallback(String processKey, String processInstanceId,
+ String requestId, WorkflowCallbackResponse callbackResponse) {
+ WorkflowResponse workflowResponse = new WorkflowResponse();
+ WorkflowContext workflowContext = getWorkflowContext(requestId);
+
+ if (workflowContext == null) {
+ msoLogger.debug("Unable to correlate workflow context for request id: " + requestId
+ + ":processInstance Id:" + processInstanceId
+ + ":process key:" + processKey);
+ workflowResponse.setMessage("Fail");
+ workflowResponse.setMessageCode(400);
+ workflowResponse.setResponse("Unable to correlate workflow context, bad request. Request Id: " + requestId);
+ return Response.serverError().entity(workflowResponse).build();
+ }
+
+ responseQueue.remove(workflowContext);
+
+ msoLogger.debug("Using callback response for request id: " + requestId);
+ workflowResponse.setResponse(callbackResponse.getResponse());
+ workflowResponse.setProcessInstanceID(processInstanceId);
+ workflowResponse.setMessageCode(callbackResponse.getStatusCode());
+ workflowResponse.setMessage(callbackResponse.getMessage());
+ sendWorkflowResponseToClient(processKey, workflowContext, workflowResponse);
+ return Response.ok().entity(workflowResponse).build();
+ }
+
+ /**
+ * Send the response to client asynchronously when invoked by the BPMN process
+ * @param processKey
+ * @param workflowContext
+ * @param workflowResponse
+ */
+ private void sendWorkflowResponseToClient(String processKey, WorkflowContext workflowContext,
+ WorkflowResponse workflowResponse) {
+ msoLogger.debug(logMarker + "Sending the response for request id: " + workflowContext.getRequestId());
+ recordEvents(processKey, workflowResponse, workflowContext.getStartTime());
+ Response response = Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
+ AsynchronousResponse asyncResp = workflowContext.getAsynchronousResponse();
+ asyncResp.setResponse(response);
+ }
+
+ /**
+ * Timeout thread which monitors the delay queue for expired context and send timeout response
+ * to client
+ *
+ * */
+ private class TimeoutThread extends Thread {
+ public void run() {
+ while (!isInterrupted()) {
+ try {
+ WorkflowContext requestObject = responseQueue.take();
+ msoLogger.debug("Time remaining for request id: " + requestObject.getRequestId() + ":" + requestObject.getDelay(TimeUnit.MILLISECONDS));
+ msoLogger.debug("Preparing timeout response for " + requestObject.getProcessKey() + ":" + ":" + requestObject.getRequestId());
+ WorkflowResponse response = new WorkflowResponse();
+ response.setMessage("Fail");
+ response.setResponse("Request timedout, request id:" + requestObject.getRequestId());
+ //response.setProcessInstanceID(requestObject.getProcessInstance().getProcessInstanceId());
+ recordEvents(requestObject.getProcessKey(), response, requestObject.getStartTime());
+ response.setMessageCode(500);
+ Response result = Response.status(500).entity(response).build();
+ requestObject.getAsynchronousResponse().setResponse(result);
+ msoLogger.debug("Sending timeout response for request id:" + requestObject.getRequestId() + ":response:" + response);
+ } catch (InterruptedException e) {
+ break;
+ } catch (Exception e) {
+ msoLogger.debug("WorkflowContextHolder timeout thread caught exception: " + e);
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError, "Error in WorkflowContextHolder timeout thread");
+
+ }
+ }
+
+ msoLogger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
+ }
+ }
+
+ private static void recordEvents(String processKey, WorkflowResponse response,
+ long startTime) {
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ logMarker + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
+ + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse());
+
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java
new file mode 100644
index 0000000000..5afbded982
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java
@@ -0,0 +1,141 @@
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.camunda.bpm.BpmPlatform;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.RuntimeService;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Generalized REST interface that injects a message event into a waiting BPMN process.
+ * Examples:
+ * <pre>
+ * /WorkflowMessage/SDNCAResponse/6d10d075-100c-42d0-9d84-a52432681cae-1478486185286
+ * /WorkflowMessage/SDNCAEvent/USOSTCDALTX0101UJZZ01
+ * </pre>
+ */
+@Path("/")
+public class WorkflowMessageResource {
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static final String LOGMARKER = "[WORKFLOW-MESSAGE]";
+
+ private ProcessEngineServices pes4junit = null;
+
+ @POST
+ @Path("/WorkflowMessage/{messageType}/{correlator}")
+ @Consumes("*/*")
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response deliver(@PathParam("messageType") String messageType,
+ @PathParam("correlator") String correlator, String message) {
+
+ LOGGER.debug(LOGMARKER + " Received workflow message"
+ + " type='" + messageType + "'"
+ + " correlator='" + correlator + "'"
+ + System.lineSeparator() + message);
+
+ MsoLogger.setServiceName("MSO." + "WorkflowMessage");
+
+ if (messageType == null || messageType.isEmpty()) {
+ String msg = "Missing message type";
+ LOGGER.debug(LOGMARKER + " " + msg);
+ LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
+ return Response.status(400).entity(msg).build();
+ }
+
+ if (correlator == null || correlator.isEmpty()) {
+ String msg = "Missing correlator";
+ LOGGER.debug(LOGMARKER + " " + msg);
+ LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
+ return Response.status(400).entity(msg).build();
+ }
+
+ String correlatorVariable = messageType + "_CORRELATOR";
+ String messageVariable = messageType + "_MESSAGE";
+
+ long startTime = System.currentTimeMillis();
+
+ try {
+ RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+
+ if (!isReadyforCorrelation(runtimeService, correlatorVariable, correlator)) {
+ String msg = "No process is waiting to receive '" + messageType + "' WorkflowMessage with correlator '" + correlator + "'";
+ LOGGER.debug(LOGMARKER + " " + msg);
+ LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER + ":" + msg);
+ LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BusinessProcesssError, msg, "BPMN", MsoLogger.getServiceName(), messageType);
+ LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BusinessProcesssError, msg);
+ return Response.status(500).entity(msg).build();
+ }
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put(correlatorVariable, correlator);
+ variables.put(messageVariable, message);
+
+ runtimeService.createMessageCorrelation("WorkflowMessage").setVariables(variables)
+ .processInstanceVariableEquals(correlatorVariable, correlator).correlate();
+
+ String msg = "Completed delivery of '" + messageType + "' WorkflowMessage with correlator '" + correlator + "'";
+ LOGGER.debug(LOGMARKER + msg);
+ LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, msg, "BPMN", MsoLogger.getServiceName(), messageType);
+ LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, msg);
+ return Response.status(204).build();
+ } catch (Exception e) {
+ // For example: MismatchingMessageCorrelationException
+ String msg = "Caught " + e.getClass().getSimpleName() + " processing '" + messageType + "' WorkflowMessage with " + correlatorVariable + "='" + correlator + "'";
+ LOGGER.debug(LOGMARKER + " " + msg);
+ LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER + ":" + msg, e);
+ LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.UnknownError, msg, "BPMN", MsoLogger.getServiceName(), messageType);
+ LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.UnknownError, msg);
+ return Response.status(500).entity(msg).build();
+ }
+ }
+
+ private boolean isReadyforCorrelation(RuntimeService runtimeService,
+ String correlationVariable, String correlationValue)
+ throws InterruptedException {
+
+ long waitingInstances = runtimeService.createExecutionQuery()
+ .messageEventSubscriptionName("WorkflowMessage")
+ .processVariableValueEquals(correlationVariable, correlationValue)
+ .count();
+
+ int retries = 50;
+ while (waitingInstances == 0 && retries > 0) {
+ Thread.sleep(100);
+
+ waitingInstances = runtimeService.createExecutionQuery()
+ .messageEventSubscriptionName("WorkflowMessage")
+ .processVariableValueEquals(correlationVariable, correlationValue)
+ .count();
+
+ retries--;
+ }
+
+ return waitingInstances != 0;
+ }
+
+ private ProcessEngineServices getProcessEngineServices() {
+ if (pes4junit == null) {
+ return BpmPlatform.getDefaultProcessEngine();
+ } else {
+ return pes4junit;
+ }
+ }
+
+ public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+ pes4junit = pes;
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java
index 1d90ac401c..a9a9f4b12d 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java
@@ -1,627 +1,625 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import org.camunda.bpm.engine.HistoryService;
-import org.camunda.bpm.engine.ProcessEngineException;
-import org.camunda.bpm.engine.ProcessEngineServices;
-import org.camunda.bpm.engine.ProcessEngines;
-import org.camunda.bpm.engine.RuntimeService;
-import org.camunda.bpm.engine.history.HistoricVariableInstance;
-import org.camunda.bpm.engine.impl.core.variable.VariableMapImpl;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.camunda.bpm.engine.variable.VariableMap;
-import org.camunda.bpm.engine.variable.Variables;
-import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats;
-
-import org.openecomp.mso.bpmn.core.WorkflowException;
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
-import org.slf4j.MDC;
-
-@Path("/workflow")
-public class WorkflowResource {
-
- private ProcessEngineServices pes4junit = null;
-
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- private static final String LOGMARKER = "[WRKFLOW-RESOURCE]";
-
- private static final int DEFAULT_WAIT_TIME = 30000;
-
- @Context
- private UriInfo uriInfo = null;
-
- /**
- * Starts the process instance and responds to client synchronously
- * If the request does not contain att-mso-service-request-timeout then it waits for the value specified in DEFAULT_WAIT_TIME
- * Note: value specified in att-mso-service-request-timeout is in seconds
- * During polling time, if there is an exception encountered in the process execution then polling is stopped and the error response is
- * returned to the client
- * @param processKey
- * @param variableMap
- * @return
- */
- @POST
- @Path("/services/{processKey}")
- @Produces("application/json")
- @Consumes("application/json")
- public Response startProcessInstanceByKey(@PathParam("processKey") String processKey,
- VariableMapImpl variableMap) {
-
- Map<String, Object> inputVariables = getInputVariables(variableMap);
- setLogContext(processKey, inputVariables);
-
- WorkflowResponse workflowResponse = new WorkflowResponse();
- long startTime = System.currentTimeMillis();
- ProcessInstance processInstance = null;
-
- try {
- //Kickoff the process
- ProcessThread thread = new ProcessThread(inputVariables,processKey,msoLogger);
- thread.start();
-
- Map<String, Object> responseMap = null;
-
- //wait for process to be completed
- long waitTime = getWaitTime(inputVariables);
- long now = System.currentTimeMillis();
- long start = now;
- long endTime = start + waitTime;
- long pollingInterval = 500;
-
- // TEMPORARY LOGIC FOR UNIT TEST REFACTORING
- // If this is a unit test (method is invoked directly), wait a max
- // of 5 seconds after process ended for a result. In production,
- // wait up to 60 seconds.
- long timeToWaitAfterProcessEnded = uriInfo == null ? 5000 : 60000;
- AtomicLong timeProcessEnded = new AtomicLong(0);
- boolean endedWithNoResponse = false;
-
- while (now <= endTime) {
- Thread.sleep(pollingInterval);
-
- now = System.currentTimeMillis();
-
- // Increase the polling interval over time
-
- long elapsed = now - start;
-
- if (elapsed > 60000) {
- pollingInterval = 5000;
- } else if (elapsed > 10000) {
- pollingInterval = 1000;
- }
- Exception exception = thread.getException();
- if (exception != null) {
- throw new Exception(exception);
- }
-
- processInstance = thread.getProcessInstance();
-
- if (processInstance == null) {
- msoLogger.debug(LOGMARKER + processKey + " process has not been created yet");
- continue;
- }
-
- String processInstanceId = processInstance.getId();
- workflowResponse.setProcessInstanceID(processInstanceId);
-
- responseMap = getResponseMap(processInstance, processKey, timeProcessEnded);
-
- if (responseMap == null) {
- msoLogger.debug(LOGMARKER + processKey + " has not produced a response yet");
-
- if (timeProcessEnded.longValue() != 0) {
- long elapsedSinceEnded = System.currentTimeMillis() - timeProcessEnded.longValue();
-
- if (elapsedSinceEnded > timeToWaitAfterProcessEnded) {
- endedWithNoResponse = true;
- break;
- }
- }
- } else {
- processResponseMap(workflowResponse, responseMap);
- recordEvents(processKey, workflowResponse, startTime);
- return Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
- }
- }
-
- //if we dont get response after waiting then send timeout response
-
- String state;
- String processInstanceId;
-
- if (processInstance == null) {
- processInstanceId = "N/A";
- state = "NOT STARTED";
- } else {
- processInstanceId = processInstance.getProcessInstanceId();
- state = isProcessEnded(processInstanceId) ? "ENDED" : "NOT ENDED";
- }
-
- workflowResponse.setMessage("Fail");
- if (endedWithNoResponse) {
- workflowResponse.setResponse("Process ended without producing a response");
- } else {
- workflowResponse.setResponse("Request timed out, process state: " + state);
- }
- workflowResponse.setProcessInstanceID(processInstanceId);
- recordEvents(processKey, workflowResponse, startTime);
- workflowResponse.setMessageCode(500);
- return Response.status(500).entity(workflowResponse).build();
- } catch (Exception ex) {
- msoLogger.debug(LOGMARKER + "Exception in startProcessInstance by key");
- ex.printStackTrace();
- workflowResponse.setMessage("Fail" );
- workflowResponse.setResponse("Error occurred while executing the process: " + ex.getMessage());
- if (processInstance != null) workflowResponse.setProcessInstanceID(processInstance.getId());
-
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey),
- MsoLogger.ErrorCode.UnknownError, LOGMARKER + workflowResponse.getMessage()
- + " for processKey: " + processKey + " with response: " + workflowResponse.getResponse());
-
- workflowResponse.setMessageCode(500);
- recordEvents(processKey, workflowResponse, startTime);
- return Response.status(500).entity(workflowResponse).build();
- }
- }
-
- /**
- * Returns the wait time, this is used by the resource on how long it should wait to send a response
- * If none specified DEFAULT_WAIT_TIME is used
- * @param inputVariables
- * @return
- */
- private int getWaitTime(Map<String, Object> inputVariables)
- {
- String timeout = inputVariables.get("att-mso-service-request-timeout") == null
- ? null : inputVariables.get("att-mso-service-request-timeout").toString();
-
- if (timeout != null) {
- try {
- return Integer.parseInt(timeout)*1000;
- } catch (NumberFormatException nex) {
- msoLogger.debug("Invalid input for att-mso-service-request-timeout");
- }
- }
- return DEFAULT_WAIT_TIME;
- }
-
- private void recordEvents(String processKey, WorkflowResponse response, long startTime) {
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse());
- }
-
- private void setLogContext(String processKey, Map<String, Object> inputVariables) {
- MsoLogger.setServiceName("MSO." + processKey);
- if (inputVariables != null) {
- MsoLogger.setLogContext(getValueFromInputVariables(inputVariables, "att-mso-request-id"),
- getValueFromInputVariables(inputVariables, "att-mso-service-instance-id"));
- }
- }
-
- private String getValueFromInputVariables(Map<String,Object> inputVariables, String key) {
- Object value = inputVariables.get(key);
- if (value == null) {
- return "N/A";
- } else {
- return value.toString();
- }
- }
-
- /**
- * Checks to see if the specified process is ended.
- * @param processInstanceId the process instance ID
- * @return true if the process is ended
- */
- private boolean isProcessEnded(String processInstanceId) {
- ProcessEngineServices pes = getProcessEngineServices();
- return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;
- }
-
- private void processResponseMap(WorkflowResponse workflowResponse, Map<String, Object> responseMap) {
- Object object = responseMap.get("Response");
- String response = object == null ? null : String.valueOf(object);
- if(response == null){
- object = responseMap.get("WorkflowResponse");
- response = object == null ? null : String.valueOf(object);
- }
-
- workflowResponse.setResponse(response);
-
- object = responseMap.get("ResponseCode");
- String responseCode = object == null ? null : String.valueOf(object);
-
- try {
- workflowResponse.setMessageCode(Integer.parseInt(responseCode));
- } catch(NumberFormatException nex) {
- msoLogger.debug(LOGMARKER + "Failed to parse ResponseCode: " + responseCode);
- workflowResponse.setMessageCode(-1);
- }
-
- Object status = responseMap.get("Status");
-
- if ("Success".equalsIgnoreCase(String.valueOf(status))) {
- workflowResponse.setMessage("Success");
- } else if ("Fail".equalsIgnoreCase(String.valueOf(status))) {
- workflowResponse.setMessage("Fail");
- } else {
- msoLogger.debug(LOGMARKER + "Unrecognized Status: " + responseCode);
- workflowResponse.setMessage("Fail");
- }
- }
-
- /**
- * @version 1.0
- * Triggers the workflow in a separate thread
- */
- private class ProcessThread extends Thread {
- private final Map<String,Object> inputVariables;
- private final String processKey;
- private final MsoLogger msoLogger;
- private final String businessKey;
- private ProcessInstance processInstance = null;
- private Exception exception = null;
-
- public ProcessThread(Map<String, Object> inputVariables, String processKey, MsoLogger msoLogger) {
- this.inputVariables = inputVariables;
- this.processKey = processKey;
- this.msoLogger = msoLogger;
- this.businessKey = UUID.randomUUID().toString();
- }
-
- /**
- * If an exception occurs when starting the process instance, it may
- * be obtained by calling this method. Note that exceptions are only
- * recorded while the process is executing in its original thread.
- * Once a process is suspended, exception recording stops.
- * @return the exception, or null if none has occurred
- */
- public Exception getException() {
- return exception;
- }
-
-
- public ProcessInstance getProcessInstance() {
- return this.processInstance;
- }
-
- /**
- * Sets the process instance exception.
- * @param exception the exception
- */
- private void setException(Exception exception) {
- this.exception = exception;
- }
-
- public void run() {
- setLogContext(processKey, inputVariables);
-
- long startTime = System.currentTimeMillis();
-
- try {
- msoLogger.debug(LOGMARKER + "***Received MSO startProcessInstanceByKey with processKey:"
- + processKey + " and variables: " + inputVariables);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
- + "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with"
- + " processKey:" + processKey
- + " businessKey:" + businessKey
- + " variables: " + inputVariables);
-
- RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
-
- // Note that this method doesn't return until the process suspends
- // itself or finishes. We provide a business key so we can identify
- // the process instance immediately.
- processInstance = runtimeService.startProcessInstanceByKey(
- processKey, inputVariables);
-
- } catch (Exception e) {
- msoLogger.debug(LOGMARKER + "ProcessThread caught an exception executing "
- + processKey + ": " + e);
- setException(e);
- }
- }
-
- }
-
- private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
- VariableMap inputVariables = Variables.createVariables();
- @SuppressWarnings("unchecked")
- Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
- for (String key : vMap.keySet()) { //variabe name vn
- @SuppressWarnings("unchecked")
- Map<String, Object> valueMap = (Map<String,Object>)vMap.get(key); //value, type
- inputVariables.putValueTyped(key, Variables
- .objectValue(valueMap.get("value"))
- .serializationDataFormat(SerializationDataFormats.JAVA) // tells the engine to use java serialization for persisting the value
- .create());
- }
- return inputVariables;
- }
-
- /**
- * Attempts to get a response map from the specified process instance.
- * @return the response map, or null if it is unavailable
- */
- private Map<String, Object> getResponseMap(ProcessInstance processInstance,
- String processKey, AtomicLong timeProcessEnded) {
-
- String responseMapVariable = processKey + "ResponseMap";
- String processInstanceId = processInstance.getId();
-
- // Query the runtime service to see if a response map is ready.
-
-/* RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
- List<Execution> executions = runtimeService.createExecutionQuery()
- .processInstanceId(processInstanceId).list();
-
- for (Execution execution : executions) {
- @SuppressWarnings("unchecked")
- Map<String, Object> responseMap = (Map<String, Object>)
- getVariableFromExecution(runtimeService, execution.getId(),
- responseMapVariable);
-
- if (responseMap != null) {
- msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
- + " from process " + processInstanceId + " execution "
- + execution.getId());
- return responseMap;
- }
- }
-*/
- //Querying history seem to return consistent results compared to querying the runtime service
-
- boolean alreadyEnded = timeProcessEnded.longValue() != 0;
-
- if (alreadyEnded || isProcessEnded(processInstance.getId())) {
- if (!alreadyEnded) {
- timeProcessEnded.set(System.currentTimeMillis());
- }
-
- // Query the history service to see if a response map exists.
-
- HistoryService historyService = getProcessEngineServices().getHistoryService();
- @SuppressWarnings("unchecked")
- Map<String, Object> responseMap = (Map<String, Object>)
- getVariableFromHistory(historyService, processInstance.getId(),
- responseMapVariable);
-
- if (responseMap != null) {
- msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
- + " from process " + processInstanceId + " history");
- return responseMap;
- }
-
- // Query the history service for old-style response variables.
-
- String prefix = (String) getVariableFromHistory(historyService, processInstanceId, "prefix");
-
- if (prefix != null) {
-
- // Check for 'WorkflowResponse' variable
- Object workflowResponseObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowResponse");
- String workflowResponse = workflowResponseObject == null ? null : String.valueOf(workflowResponseObject);
- msoLogger.debug(LOGMARKER + "WorkflowResponse: " + workflowResponse);
-
- if (workflowResponse != null) {
- Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
- String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
- msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
- responseMap.put("WorkflowResponse", workflowResponse);
- responseMap.put("ResponseCode", responseCode);
- responseMap.put("Status", "Success");
- return responseMap;
- }
-
-
- // Check for 'WorkflowException' variable
- WorkflowException workflowException = null;
- String workflowExceptionText = null;
-
- Object workflowExceptionObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowException");
- if(workflowExceptionObject != null) {
- if(workflowExceptionObject instanceof WorkflowException) {
- workflowException = (WorkflowException) workflowExceptionObject;
- workflowExceptionText = workflowException.toString();
- responseMap = new HashMap<String, Object>();
- responseMap.put("WorkflowException", workflowExceptionText);
- responseMap.put("ResponseCode", workflowException.getErrorCode());
- responseMap.put("Status", "Fail");
- return responseMap;
- }
- else if (workflowExceptionObject instanceof String) {
- Object object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
- String responseCode = object == null ? null : String.valueOf(object);
- workflowExceptionText = (String) workflowExceptionObject;
- responseMap = new HashMap<String, Object>();
- responseMap.put("WorkflowException", workflowExceptionText);
- responseMap.put("ResponseCode", responseCode);
- responseMap.put("Status", "Fail");
- return responseMap;
- }
-
- }
- msoLogger.debug(LOGMARKER + "WorkflowException: " + workflowExceptionText);
-
- // BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
- Object object = getVariableFromHistory(historyService, processInstanceId, processKey + "Response");
- String response = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + processKey + "Response: " + response);
-
- if (response != null) {
- object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
- String responseCode = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
- responseMap.put("Response", response);
- responseMap.put("ResponseCode", responseCode);
- responseMap.put("Status", "Success");
- return responseMap;
- }
-
- object = getVariableFromHistory(historyService, processInstanceId, prefix + "ErrorResponse");
- String errorResponse = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + prefix + "ErrorResponse: " + errorResponse);
-
- if (errorResponse != null) {
- object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
- String responseCode = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
- responseMap.put("Response", errorResponse);
- responseMap.put("ResponseCode", responseCode);
- responseMap.put("Status", "Fail");
- return responseMap;
- }
- // END LEGACY SUPPORT. TODO: REMOVE THIS CODE
- }
- }
- return null;
- }
-
- /**
- * Gets a variable value from the specified execution.
- * @return the variable value, or null if the variable could not be
- * obtained
- */
- private Object getVariableFromExecution(RuntimeService runtimeService,
- String executionId, String variableName) {
- try {
- return runtimeService.getVariable(executionId, variableName);
- } catch (ProcessEngineException e) {
- // Most likely cause is that the execution no longer exists.
- msoLogger.debug("Error retrieving execution " + executionId
- + " variable " + variableName + ": " + e);
- return null;
- }
- }
-
- /**
- * Gets a variable value from specified historical process instance.
- * @return the variable value, or null if the variable could not be
- * obtained
- */
- private Object getVariableFromHistory(HistoryService historyService,
- String processInstanceId, String variableName) {
- try {
- HistoricVariableInstance v = historyService.createHistoricVariableInstanceQuery()
- .processInstanceId(processInstanceId).variableName(variableName).singleResult();
- return v == null ? null : v.getValue();
- } catch (Exception e) {
- msoLogger.debug("Error retrieving process " + processInstanceId
- + " variable " + variableName + " from history: " + e);
- return null;
- }
- }
-
- @POST
- @Path("/services/{processKey}/{processInstanceId}")
- @Produces("application/json")
- @Consumes("application/json")
- public WorkflowResponse getProcessVariables(@PathParam("processKey") String processKey, @PathParam("processInstanceId") String processInstanceId) {
- //TODO filter only set of variables
- WorkflowResponse response = new WorkflowResponse();
-
- long startTime = System.currentTimeMillis();
- try {
- ProcessEngineServices engine = getProcessEngineServices();
- List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list();
- Map<String,String> variablesMap = new HashMap<String,String>();
- for (HistoricVariableInstance variableInstance: variables) {
- variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
- }
-
- msoLogger.debug(LOGMARKER + "***Received MSO getProcessVariables with processKey:" + processKey + " and variables: " + variablesMap.toString());
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
- + "Call to MSO workflow/services in Camunda. Received MSO getProcessVariables with processKey:"
- + processKey + " and variables: "
- + variablesMap.toString());
-
-
- response.setVariables(variablesMap);
- response.setMessage("Success");
- response.setResponse("Successfully retrieved the variables");
- response.setProcessInstanceID(processInstanceId);
-
- msoLogger.debug(LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response.getResponse());
- } catch (Exception ex) {
- response.setMessage("Fail");
- response.setResponse("Failed to retrieve the variables," + ex.getMessage());
- response.setProcessInstanceID(processInstanceId);
-
- msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey), MsoLogger.ErrorCode.UnknownError, LOGMARKER
- + response.getMessage()
- + " for processKey: "
- + processKey
- + " with response: "
- + response.getResponse());
-
- }
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse());
-
- return response;
- }
-
- private ProcessEngineServices getProcessEngineServices() {
- if (pes4junit == null) {
- return ProcessEngines.getDefaultProcessEngine();
- } else {
- return pes4junit;
- }
- }
-
- public void setProcessEngineServices4junit(ProcessEngineServices pes) {
- pes4junit = pes;
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicLong;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.camunda.bpm.engine.HistoryService;
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.history.HistoricVariableInstance;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.variable.VariableMap;
+import org.camunda.bpm.engine.variable.Variables;
+import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.slf4j.MDC;
+
+@Path("/workflow")
+public class WorkflowResource {
+
+ private ProcessEngineServices pes4junit = null;
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static final String LOGMARKER = "[WRKFLOW-RESOURCE]";
+
+ private static final int DEFAULT_WAIT_TIME = 30000;
+
+ @Context
+ private UriInfo uriInfo = null;
+
+ /**
+ * Starts the process instance and responds to client synchronously
+ * If the request does not contain mso-service-request-timeout then it waits for the value specified in DEFAULT_WAIT_TIME
+ * Note: value specified in mso-service-request-timeout is in seconds
+ * During polling time, if there is an exception encountered in the process execution then polling is stopped and the error response is
+ * returned to the client
+ * @param processKey
+ * @param variableMap
+ * @return
+ */
+ @POST
+ @Path("/services/{processKey}")
+ @Produces("application/json")
+ @Consumes("application/json")
+ public Response startProcessInstanceByKey(@PathParam("processKey") String processKey,
+ VariableMapImpl variableMap) {
+
+ Map<String, Object> inputVariables = getInputVariables(variableMap);
+ setLogContext(processKey, inputVariables);
+
+ WorkflowResponse workflowResponse = new WorkflowResponse();
+ long startTime = System.currentTimeMillis();
+ ProcessInstance processInstance = null;
+
+ try {
+ //Kickoff the process
+ ProcessThread thread = new ProcessThread(inputVariables,processKey,msoLogger);
+ thread.start();
+
+ Map<String, Object> responseMap = null;
+
+ //wait for process to be completed
+ long waitTime = getWaitTime(inputVariables);
+ long now = System.currentTimeMillis();
+ long start = now;
+ long endTime = start + waitTime;
+ long pollingInterval = 500;
+
+ // TEMPORARY LOGIC FOR UNIT TEST REFACTORING
+ // If this is a unit test (method is invoked directly), wait a max
+ // of 5 seconds after process ended for a result. In production,
+ // wait up to 60 seconds.
+ long timeToWaitAfterProcessEnded = uriInfo == null ? 5000 : 60000;
+ AtomicLong timeProcessEnded = new AtomicLong(0);
+ boolean endedWithNoResponse = false;
+
+ while (now <= endTime) {
+ Thread.sleep(pollingInterval);
+
+ now = System.currentTimeMillis();
+
+ // Increase the polling interval over time
+
+ long elapsed = now - start;
+
+ if (elapsed > 60000) {
+ pollingInterval = 5000;
+ } else if (elapsed > 10000) {
+ pollingInterval = 1000;
+ }
+ Exception exception = thread.getException();
+ if (exception != null) {
+ throw new Exception(exception);
+ }
+
+ processInstance = thread.getProcessInstance();
+
+ if (processInstance == null) {
+ msoLogger.debug(LOGMARKER + processKey + " process has not been created yet");
+ continue;
+ }
+
+ String processInstanceId = processInstance.getId();
+ workflowResponse.setProcessInstanceID(processInstanceId);
+
+ responseMap = getResponseMap(processInstance, processKey, timeProcessEnded);
+
+ if (responseMap == null) {
+ msoLogger.debug(LOGMARKER + processKey + " has not produced a response yet");
+
+ if (timeProcessEnded.longValue() != 0) {
+ long elapsedSinceEnded = System.currentTimeMillis() - timeProcessEnded.longValue();
+
+ if (elapsedSinceEnded > timeToWaitAfterProcessEnded) {
+ endedWithNoResponse = true;
+ break;
+ }
+ }
+ } else {
+ processResponseMap(workflowResponse, responseMap);
+ recordEvents(processKey, workflowResponse, startTime);
+ return Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
+ }
+ }
+
+ //if we dont get response after waiting then send timeout response
+
+ String state;
+ String processInstanceId;
+
+ if (processInstance == null) {
+ processInstanceId = "N/A";
+ state = "NOT STARTED";
+ } else {
+ processInstanceId = processInstance.getProcessInstanceId();
+ state = isProcessEnded(processInstanceId) ? "ENDED" : "NOT ENDED";
+ }
+
+ workflowResponse.setMessage("Fail");
+ if (endedWithNoResponse) {
+ workflowResponse.setResponse("Process ended without producing a response");
+ } else {
+ workflowResponse.setResponse("Request timed out, process state: " + state);
+ }
+ workflowResponse.setProcessInstanceID(processInstanceId);
+ recordEvents(processKey, workflowResponse, startTime);
+ workflowResponse.setMessageCode(500);
+ return Response.status(500).entity(workflowResponse).build();
+ } catch (Exception ex) {
+ msoLogger.debug(LOGMARKER + "Exception in startProcessInstance by key");
+ ex.printStackTrace();
+ workflowResponse.setMessage("Fail" );
+ workflowResponse.setResponse("Error occurred while executing the process: " + ex.getMessage());
+ if (processInstance != null) workflowResponse.setProcessInstanceID(processInstance.getId());
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey),
+ MsoLogger.ErrorCode.UnknownError, LOGMARKER + workflowResponse.getMessage()
+ + " for processKey: " + processKey + " with response: " + workflowResponse.getResponse());
+
+ workflowResponse.setMessageCode(500);
+ recordEvents(processKey, workflowResponse, startTime);
+ return Response.status(500).entity(workflowResponse).build();
+ }
+ }
+
+ /**
+ * Returns the wait time, this is used by the resource on how long it should wait to send a response
+ * If none specified DEFAULT_WAIT_TIME is used
+ * @param inputVariables
+ * @return
+ */
+ private int getWaitTime(Map<String, Object> inputVariables)
+ {
+ String timeout = inputVariables.get("mso-service-request-timeout") == null
+ ? null : inputVariables.get("mso-service-request-timeout").toString();
+
+ if (timeout != null) {
+ try {
+ return Integer.parseInt(timeout)*1000;
+ } catch (NumberFormatException nex) {
+ msoLogger.debug("Invalid input for mso-service-request-timeout");
+ }
+ }
+ return DEFAULT_WAIT_TIME;
+ }
+
+ private void recordEvents(String processKey, WorkflowResponse response, long startTime) {
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ LOGMARKER + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ LOGMARKER + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse());
+ }
+
+ private void setLogContext(String processKey, Map<String, Object> inputVariables) {
+ MsoLogger.setServiceName("MSO." + processKey);
+ if (inputVariables != null) {
+ MsoLogger.setLogContext(getValueFromInputVariables(inputVariables, "mso-request-id"),
+ getValueFromInputVariables(inputVariables, "mso-service-instance-id"));
+ }
+ }
+
+ private String getValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+ Object value = inputVariables.get(key);
+ if (value == null) {
+ return "N/A";
+ } else {
+ return value.toString();
+ }
+ }
+
+ /**
+ * Checks to see if the specified process is ended.
+ * @param processInstanceId the process instance ID
+ * @return true if the process is ended
+ */
+ private boolean isProcessEnded(String processInstanceId) {
+ ProcessEngineServices pes = getProcessEngineServices();
+ return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;
+ }
+
+ private void processResponseMap(WorkflowResponse workflowResponse, Map<String, Object> responseMap) {
+ Object object = responseMap.get("Response");
+ String response = object == null ? null : String.valueOf(object);
+ if(response == null){
+ object = responseMap.get("WorkflowResponse");
+ response = object == null ? null : String.valueOf(object);
+ }
+
+ workflowResponse.setResponse(response);
+
+ object = responseMap.get("ResponseCode");
+ String responseCode = object == null ? null : String.valueOf(object);
+
+ try {
+ workflowResponse.setMessageCode(Integer.parseInt(responseCode));
+ } catch(NumberFormatException nex) {
+ msoLogger.debug(LOGMARKER + "Failed to parse ResponseCode: " + responseCode);
+ workflowResponse.setMessageCode(-1);
+ }
+
+ Object status = responseMap.get("Status");
+
+ if ("Success".equalsIgnoreCase(String.valueOf(status))) {
+ workflowResponse.setMessage("Success");
+ } else if ("Fail".equalsIgnoreCase(String.valueOf(status))) {
+ workflowResponse.setMessage("Fail");
+ } else {
+ msoLogger.debug(LOGMARKER + "Unrecognized Status: " + responseCode);
+ workflowResponse.setMessage("Fail");
+ }
+ }
+
+ /**
+ * @version 1.0
+ * Triggers the workflow in a separate thread
+ */
+ private class ProcessThread extends Thread {
+ private final Map<String,Object> inputVariables;
+ private final String processKey;
+ private final MsoLogger msoLogger;
+ private final String businessKey;
+ private ProcessInstance processInstance = null;
+ private Exception exception = null;
+
+ public ProcessThread(Map<String, Object> inputVariables, String processKey, MsoLogger msoLogger) {
+ this.inputVariables = inputVariables;
+ this.processKey = processKey;
+ this.msoLogger = msoLogger;
+ this.businessKey = UUID.randomUUID().toString();
+ }
+
+ /**
+ * If an exception occurs when starting the process instance, it may
+ * be obtained by calling this method. Note that exceptions are only
+ * recorded while the process is executing in its original thread.
+ * Once a process is suspended, exception recording stops.
+ * @return the exception, or null if none has occurred
+ */
+ public Exception getException() {
+ return exception;
+ }
+
+
+ public ProcessInstance getProcessInstance() {
+ return this.processInstance;
+ }
+
+ /**
+ * Sets the process instance exception.
+ * @param exception the exception
+ */
+ private void setException(Exception exception) {
+ this.exception = exception;
+ }
+
+ public void run() {
+ setLogContext(processKey, inputVariables);
+
+ long startTime = System.currentTimeMillis();
+
+ try {
+ msoLogger.debug(LOGMARKER + "***Received MSO startProcessInstanceByKey with processKey:"
+ + processKey + " and variables: " + inputVariables);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
+ + "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with"
+ + " processKey:" + processKey
+ + " businessKey:" + businessKey
+ + " variables: " + inputVariables);
+
+ RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+
+ // Note that this method doesn't return until the process suspends
+ // itself or finishes. We provide a business key so we can identify
+ // the process instance immediately.
+ processInstance = runtimeService.startProcessInstanceByKey(
+ processKey, inputVariables);
+
+ } catch (Exception e) {
+ msoLogger.debug(LOGMARKER + "ProcessThread caught an exception executing "
+ + processKey + ": " + e);
+ setException(e);
+ }
+ }
+
+ }
+
+ private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+ VariableMap inputVariables = Variables.createVariables();
+ @SuppressWarnings("unchecked")
+ Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
+ for (String key : vMap.keySet()) { //variabe name vn
+ @SuppressWarnings("unchecked")
+ Map<String, Object> valueMap = (Map<String,Object>)vMap.get(key); //value, type
+ inputVariables.putValueTyped(key, Variables
+ .objectValue(valueMap.get("value"))
+ .serializationDataFormat(SerializationDataFormats.JAVA) // tells the engine to use java serialization for persisting the value
+ .create());
+ }
+ return inputVariables;
+ }
+
+ /**
+ * Attempts to get a response map from the specified process instance.
+ * @return the response map, or null if it is unavailable
+ */
+ private Map<String, Object> getResponseMap(ProcessInstance processInstance,
+ String processKey, AtomicLong timeProcessEnded) {
+
+ String responseMapVariable = processKey + "ResponseMap";
+ String processInstanceId = processInstance.getId();
+
+ // Query the runtime service to see if a response map is ready.
+
+/* RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+ List<Execution> executions = runtimeService.createExecutionQuery()
+ .processInstanceId(processInstanceId).list();
+
+ for (Execution execution : executions) {
+ @SuppressWarnings("unchecked")
+ Map<String, Object> responseMap = (Map<String, Object>)
+ getVariableFromExecution(runtimeService, execution.getId(),
+ responseMapVariable);
+
+ if (responseMap != null) {
+ msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
+ + " from process " + processInstanceId + " execution "
+ + execution.getId());
+ return responseMap;
+ }
+ }
+*/
+ //Querying history seem to return consistent results compared to querying the runtime service
+
+ boolean alreadyEnded = timeProcessEnded.longValue() != 0;
+
+ if (alreadyEnded || isProcessEnded(processInstance.getId())) {
+ if (!alreadyEnded) {
+ timeProcessEnded.set(System.currentTimeMillis());
+ }
+
+ // Query the history service to see if a response map exists.
+
+ HistoryService historyService = getProcessEngineServices().getHistoryService();
+ @SuppressWarnings("unchecked")
+ Map<String, Object> responseMap = (Map<String, Object>)
+ getVariableFromHistory(historyService, processInstance.getId(),
+ responseMapVariable);
+
+ if (responseMap != null) {
+ msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
+ + " from process " + processInstanceId + " history");
+ return responseMap;
+ }
+
+ // Query the history service for old-style response variables.
+
+ String prefix = (String) getVariableFromHistory(historyService, processInstanceId, "prefix");
+
+ if (prefix != null) {
+
+ // Check for 'WorkflowResponse' variable
+ Object workflowResponseObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowResponse");
+ String workflowResponse = workflowResponseObject == null ? null : String.valueOf(workflowResponseObject);
+ msoLogger.debug(LOGMARKER + "WorkflowResponse: " + workflowResponse);
+
+ if (workflowResponse != null) {
+ Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+ String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
+ msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+ responseMap = new HashMap<String, Object>();
+ responseMap.put("WorkflowResponse", workflowResponse);
+ responseMap.put("ResponseCode", responseCode);
+ responseMap.put("Status", "Success");
+ return responseMap;
+ }
+
+
+ // Check for 'WorkflowException' variable
+ WorkflowException workflowException = null;
+ String workflowExceptionText = null;
+
+ Object workflowExceptionObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowException");
+ if(workflowExceptionObject != null) {
+ if(workflowExceptionObject instanceof WorkflowException) {
+ workflowException = (WorkflowException) workflowExceptionObject;
+ workflowExceptionText = workflowException.toString();
+ responseMap = new HashMap<String, Object>();
+ responseMap.put("WorkflowException", workflowExceptionText);
+ responseMap.put("ResponseCode", workflowException.getErrorCode());
+ responseMap.put("Status", "Fail");
+ return responseMap;
+ }
+ else if (workflowExceptionObject instanceof String) {
+ Object object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+ String responseCode = object == null ? null : String.valueOf(object);
+ workflowExceptionText = (String) workflowExceptionObject;
+ responseMap = new HashMap<String, Object>();
+ responseMap.put("WorkflowException", workflowExceptionText);
+ responseMap.put("ResponseCode", responseCode);
+ responseMap.put("Status", "Fail");
+ return responseMap;
+ }
+
+ }
+ msoLogger.debug(LOGMARKER + "WorkflowException: " + workflowExceptionText);
+
+ // BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
+ Object object = getVariableFromHistory(historyService, processInstanceId, processKey + "Response");
+ String response = object == null ? null : String.valueOf(object);
+ msoLogger.debug(LOGMARKER + processKey + "Response: " + response);
+
+ if (response != null) {
+ object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+ String responseCode = object == null ? null : String.valueOf(object);
+ msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+ responseMap = new HashMap<String, Object>();
+ responseMap.put("Response", response);
+ responseMap.put("ResponseCode", responseCode);
+ responseMap.put("Status", "Success");
+ return responseMap;
+ }
+
+ object = getVariableFromHistory(historyService, processInstanceId, prefix + "ErrorResponse");
+ String errorResponse = object == null ? null : String.valueOf(object);
+ msoLogger.debug(LOGMARKER + prefix + "ErrorResponse: " + errorResponse);
+
+ if (errorResponse != null) {
+ object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+ String responseCode = object == null ? null : String.valueOf(object);
+ msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+ responseMap = new HashMap<String, Object>();
+ responseMap.put("Response", errorResponse);
+ responseMap.put("ResponseCode", responseCode);
+ responseMap.put("Status", "Fail");
+ return responseMap;
+ }
+ // END LEGACY SUPPORT. TODO: REMOVE THIS CODE
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets a variable value from the specified execution.
+ * @return the variable value, or null if the variable could not be
+ * obtained
+ */
+ private Object getVariableFromExecution(RuntimeService runtimeService,
+ String executionId, String variableName) {
+ try {
+ return runtimeService.getVariable(executionId, variableName);
+ } catch (ProcessEngineException e) {
+ // Most likely cause is that the execution no longer exists.
+ msoLogger.debug("Error retrieving execution " + executionId
+ + " variable " + variableName + ": " + e);
+ return null;
+ }
+ }
+ /**
+ * Gets a variable value from specified historical process instance.
+ * @return the variable value, or null if the variable could not be
+ * obtained
+ */
+ private Object getVariableFromHistory(HistoryService historyService,
+ String processInstanceId, String variableName) {
+ try {
+ HistoricVariableInstance v = historyService.createHistoricVariableInstanceQuery()
+ .processInstanceId(processInstanceId).variableName(variableName).singleResult();
+ return v == null ? null : v.getValue();
+ } catch (Exception e) {
+ msoLogger.debug("Error retrieving process " + processInstanceId
+ + " variable " + variableName + " from history: " + e);
+ return null;
+ }
+ }
+
+ @POST
+ @Path("/services/{processKey}/{processInstanceId}")
+ @Produces("application/json")
+ @Consumes("application/json")
+ public WorkflowResponse getProcessVariables(@PathParam("processKey") String processKey, @PathParam("processInstanceId") String processInstanceId) {
+ //TODO filter only set of variables
+ WorkflowResponse response = new WorkflowResponse();
+
+ long startTime = System.currentTimeMillis();
+ try {
+ ProcessEngineServices engine = getProcessEngineServices();
+ List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list();
+ Map<String,String> variablesMap = new HashMap<String,String>();
+ for (HistoricVariableInstance variableInstance: variables) {
+ variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
+ }
+
+ msoLogger.debug(LOGMARKER + "***Received MSO getProcessVariables with processKey:" + processKey + " and variables: " + variablesMap.toString());
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
+ + "Call to MSO workflow/services in Camunda. Received MSO getProcessVariables with processKey:"
+ + processKey + " and variables: "
+ + variablesMap.toString());
+
+
+ response.setVariables(variablesMap);
+ response.setMessage("Success");
+ response.setResponse("Successfully retrieved the variables");
+ response.setProcessInstanceID(processInstanceId);
+
+ msoLogger.debug(LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response.getResponse());
+ } catch (Exception ex) {
+ response.setMessage("Fail");
+ response.setResponse("Failed to retrieve the variables," + ex.getMessage());
+ response.setProcessInstanceID(processInstanceId);
+
+ msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey), MsoLogger.ErrorCode.UnknownError, LOGMARKER
+ + response.getMessage()
+ + " for processKey: "
+ + processKey
+ + " with response: "
+ + response.getResponse());
+
+ }
+
+ msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ LOGMARKER + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+ LOGMARKER + response.getMessage() + " for processKey: "
+ + processKey + " with response: " + response.getResponse());
+
+ return response;
+ }
+
+ private ProcessEngineServices getProcessEngineServices() {
+ if (pes4junit == null) {
+ return ProcessEngines.getDefaultProcessEngine();
+ } else {
+ return pes4junit;
+ }
+ }
+
+ public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+ pes4junit = pes;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java
index 1e1a20ce45..d6c9b51cd6 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java
@@ -1,55 +1,57 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
-
-
-/**
- * @version 1.0
- * RESTeasy workflow application which wires synchronous and asynchronous response
- *
- */
-@ApplicationPath("/")
-public class WorkflowResourceApplication extends Application {
- private Set<Object> singletons = new HashSet<Object>();
- private Set<Class<?>> classes = new HashSet<Class<?>>();
-
- public WorkflowResourceApplication() {
- singletons.add(new WorkflowResource());
- singletons.add(new WorkflowAsyncResource());
- singletons.add(new VnfAdapterRestNotifyResource());
- }
-
- @Override
- public Set<Class<?>> getClasses() {
- return classes;
- }
-
- @Override
- public Set<Object> getSingletons() {
- return singletons;
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
+
+/**
+ * @version 1.0
+ * RESTeasy workflow application which wires synchronous and asynchronous response
+ *
+ */
+@ApplicationPath("/")
+public class WorkflowResourceApplication extends Application {
+ private Set<Object> singletons = new HashSet<Object>();
+ private Set<Class<?>> classes = new HashSet<Class<?>>();
+
+ public WorkflowResourceApplication() {
+ singletons.add(new WorkflowResource());
+ singletons.add(new WorkflowAsyncCommonResource());
+ singletons.add(new WorkflowMessageResource());
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return classes;
+ }
+
+ @Override
+ public Set<Object> getSingletons() {
+ return singletons;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResponse.java
index 37cc676b32..79e29e6770 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResponse.java
@@ -1,69 +1,69 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.util.Map;
-
-/**
- * @version 1.0
- * Synchronous workflow response bean
- *
- */
-public class WorkflowResponse {
-
- private String response;
- private String message;
- private String processInstanceID;
- private Map<String,String> variables;
- private int messageCode;
-
- public String getResponse() {
- return response;
- }
- public void setResponse(String response) {
- this.response = response;
- }
- public String getMessage() {
- return message;
- }
- public void setMessage(String message) {
- this.message = message;
- }
- public String getProcessInstanceID() {
- return processInstanceID;
- }
- public void setProcessInstanceID(String pID) {
- this.processInstanceID = pID;
- }
- public Map<String, String> getVariables() {
- return variables;
- }
- public void setVariables(Map<String, String> variables) {
- this.variables = variables;
- }
- public void setMessageCode(int messageCode) {
- this.messageCode = messageCode;
- }
-
- public int getMessageCode() {
- return messageCode;
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.workflow.service;
+
+import java.util.Map;
+
+/**
+ * @version 1.0
+ * Synchronous workflow response bean
+ *
+ */
+public class WorkflowResponse {
+
+ private String response;
+ private String message;
+ private String processInstanceID;
+ private Map<String,String> variables;
+ private int messageCode;
+
+ public String getResponse() {
+ return response;
+ }
+ public void setResponse(String response) {
+ this.response = response;
+ }
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+ public String getProcessInstanceID() {
+ return processInstanceID;
+ }
+ public void setProcessInstanceID(String pID) {
+ this.processInstanceID = pID;
+ }
+ public Map<String, String> getVariables() {
+ return variables;
+ }
+ public void setVariables(Map<String, String> variables) {
+ this.variables = variables;
+ }
+ public void setMessageCode(int messageCode) {
+ this.messageCode = messageCode;
+ }
+
+ public int getMessageCode() {
+ return messageCode;
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml b/bpmn/MSOCommonBPMN/src/main/resources/META-INF/persistence.xml
index 605d6f3624..d7166d81a9 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml
+++ b/bpmn/MSOCommonBPMN/src/main/resources/META-INF/persistence.xml
@@ -1,37 +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=========================================================
- -->
-
-<persistence version="2.0"
- xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/persistence
- http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
-
- <persistence-unit name="primary">
- <jta-data-source>java:jboss/datasources/ProcessEngine</jta-data-source>
- <properties>
- <!-- Properties for Hibernate -->
- <property name="hibernate.hbm2ddl.auto" value="create-drop" />
- <property name="hibernate.show_sql" value="true" />
- </properties>
- </persistence-unit>
-
-</persistence>
+<?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=========================================================
+ -->
+
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+
+ <persistence-unit name="common">
+ <jta-data-source>java:jboss/datasources/ProcessEngine</jta-data-source>
+ <properties>
+ <!-- Properties for Hibernate -->
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.show_sql" value="true" />
+ </properties>
+ </persistence-unit>
+
+</persistence>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml b/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml
index 641e674c2e..1745af6558 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml
+++ b/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml
@@ -8,9 +8,9 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,11 +19,11 @@
============LICENSE_END=========================================================
-->
-
+
<process-application
xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <process-engine name="default">
+ <process-engine name="common">
<configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
<datasource>java:jboss/datasources/ProcessEngine</datasource>
<properties>
@@ -39,7 +39,7 @@
<plugin>
<class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
</plugin>
-
+
<!-- plugin enabling integration of camunda Spin -->
<plugin>
<class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
@@ -49,33 +49,33 @@
<plugin>
<class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
</plugin>
-
+
<plugin>
<class>org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin</class>
</plugin>
-
+
<!-- Needed until all subflows generate MSOWorkflowException events -->
<plugin>
<class>org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin</class>
</plugin>
-
+
<!-- Optional Plugin for Camunda BPM Workbench -->
<!-- <plugin>
<class>org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap</class>
<properties>
<property name="httpPort">8088</property>
</properties>
- </plugin> -->
+ </plugin> -->
</plugins>
</process-engine>
-
-
- <process-archive name="MSOGammaBPMN">
-<!-- <process-engine>default</process-engine>
- --> <properties>
- <property name="isDeleteUponUndeploy">false</property>
- <property name="isScanForProcessDefinitions">true</property>
- </properties>
- </process-archive>
+
+
+ <process-archive name="MSOCommonBPMN">
+ <process-engine>common</process-engine>
+ <properties>
+ <property name="isDeleteUponUndeploy">false</property>
+ <property name="isScanForProcessDefinitions">true</property>
+ </properties>
+ </process-archive>
</process-application>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/logback.xml b/bpmn/MSOCommonBPMN/src/main/resources/logback.xml
index 133fa54003..133fa54003 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/logback.xml
+++ b/bpmn/MSOCommonBPMN/src/main/resources/logback.xml
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/processengine.properties b/bpmn/MSOCommonBPMN/src/main/resources/processengine.properties
new file mode 100644
index 0000000000..c21925c23f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/processengine.properties
@@ -0,0 +1,20 @@
+###
+# ============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=========================================================
+###
+processEngineName=common
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/processes.xml b/bpmn/MSOCommonBPMN/src/main/resources/processes.xml
new file mode 100644
index 0000000000..f4f8efdbc4
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/processes.xml
@@ -0,0 +1,81 @@
+<?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-engine name="common">
+ <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
+ <datasource>java:jboss/datasources/ProcessEngine</datasource>
+ <properties>
+ <property name="history">full</property>
+ <property name="databaseSchemaUpdate">true</property>
+ <property name="authorizationEnabled">true</property>
+ <property name="jobExecutorDeploymentAware">true</property>
+ <property name="jobExecutorActivate">true</property>
+ </properties>
+ <plugins>
+
+ <!-- plugin enabling Process Application event listener support -->
+ <plugin>
+ <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
+ </plugin>
+
+ <!-- plugin enabling integration of camunda Spin -->
+ <plugin>
+ <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
+ </plugin>
+
+ <!-- plugin enabling connect support -->
+ <plugin>
+ <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
+ </plugin>
+
+ <plugin>
+ <class>org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin</class>
+ </plugin>
+
+ <!-- Needed until all subflows generate MSOWorkflowException events -->
+ <plugin>
+ <class>org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin</class>
+ </plugin>
+
+ <!-- Optional Plugin for Camunda BPM Workbench -->
+ <!-- <plugin>
+ <class>org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap</class>
+ <properties>
+ <property name="httpPort">8088</property>
+ </properties>
+ </plugin> -->
+ </plugins>
+ </process-engine>
+
+
+ <process-archive name="MSOCommonBPMN">
+ <process-engine>common</process-engine>
+ <properties>
+ <property name="isDeleteUponUndeploy">false</property>
+ <property name="isScanForProcessDefinitions">true</property>
+ </properties>
+ </process-archive>
+
+</process-application>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
new file mode 100644
index 0000000000..cd977e3ae6
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
@@ -0,0 +1,554 @@
+<?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="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="CompleteMsoProcess" name="CompleteMsoProcess" isExecutable="true">
+ <bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def preProcessRequestData = new CompleteMsoProcess()
+preProcessRequestData.preProcessRequest(execution)
+
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest" targetRef="ExclusiveGateway_5" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start With Message ">
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_1" targetRef="preProcessRequest" />
+ <bpmn2:parallelGateway id="ExclusiveGateway_5">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_45</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>
+ </bpmn2:parallelGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_45" name="" sourceRef="ExclusiveGateway_5" targetRef="ParallelGateway_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_46" name="" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_3" />
+ <bpmn2:exclusiveGateway id="ParallelGateway_3" name="Notification Url Present?" default="SequenceFlow_40">
+ <bpmn2:incoming>SequenceFlow_45</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
+ <bpmn2:outgoing>if_notifcationURLExists</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_40" name="No" sourceRef="ParallelGateway_3" targetRef="ParallelGateway_5" />
+ <bpmn2:subProcess id="subProcessExceptionCompleteMSO" name="Sub Process Exception Complete MSO" triggeredByEvent="true">
+ <bpmn2:endEvent id="endEventExceptionCompleteMSO">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:outputParameter name="DB_ADAPTER_ERROR">${CMSO_updateRequestResponse}</camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1i1h3il</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="MessageEventDefinition_3" />
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="startEventExceptionCompleteMSO">
+ <bpmn2:outgoing>SequenceFlow_1i1h3il</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_4" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1i1h3il" sourceRef="startEventExceptionCompleteMSO" targetRef="endEventExceptionCompleteMSO" />
+ </bpmn2:subProcess>
+ <bpmn2:exclusiveGateway id="ParallelGateway_7">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="ParallelGateway_7" targetRef="ParallelGateway_6" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_5" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Prepare&#10;&#10;Update DB Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_72</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def completeMsoProcess = new CompleteMsoProcess()
+completeMsoProcess.setUpdateDBstatustoSuccessPayload(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_3" targetRef="updateInfraRequest" />
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Active Request?" default="SequenceFlow_72">
+ <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_72</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_81</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_72" name="No" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_81" name="Yes" sourceRef="ExclusiveGateway_3" targetRef="prepareUpdateRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_request_id-Ok") ==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="BuildErrorMessage1" name="Build Error Message" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1q7eer1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
+import org.openecomp.mso.bpmn.common.scripts.*
+def buildDataErrorMessage = new CompleteMsoProcess()
+buildDataErrorMessage.buildDataError(execution, "Complete --Update DB status to SUCCESS-- Failed")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="BuildErrorMessage1" targetRef="EndEvent_5" />
+ <bpmn2:scriptTask id="prepareUpdateRequest" name="Prepare&#10;&#10;Update DB Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_81</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_49</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def completeMsoProcess = new CompleteMsoProcess()
+completeMsoProcess.updateDBStatusToSuccessPayload(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_49" name="" sourceRef="prepareUpdateRequest" targetRef="updateDBStatus" />
+ <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("CMSO_setUpdateDBstatustoSuccessPayload")}]]></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="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
+ <camunda:outputParameter name="CMSO_updateRequestResponseCode">${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_6</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="updateInfraRequest" targetRef="ExclusiveGateway_7" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_6" name="" attachedToRef="updateDBStatus">
+ <bpmn2:outgoing>SequenceFlow_1q7eer1</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_83" errorRef="Error_1" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:scriptTask id="BuildErrorMessage" name="Build Error Message" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0mipf25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
+//println "CMSO_updateRequestResponse IS --> " + execution.getVariable("CMSO_updateRequestResponse")
+import org.openecomp.mso.bpmn.common.scripts.*
+def buildDataErrorMessage = new CompleteMsoProcess()
+buildDataErrorMessage.buildDataError(execution, "Complete MSO -- Update DB status to SUCCESS -- Failed")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="BuildErrorMessage" targetRef="EndEvent_4" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_10" default="SequenceFlow_25">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ExclusiveGateway_10" targetRef="ParallelGateway_7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ExclusiveGateway_10" targetRef="BuildErrorMessage1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_7" default="SequenceFlow_1">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ExclusiveGateway_7" targetRef="ParallelGateway_7">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ExclusiveGateway_7" targetRef="BuildErrorMessage" />
+ <bpmn2:serviceTask id="updateDBStatus" 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("CMSO_updateDBStatusToSuccessPayload")}]]></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="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
+ <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_49</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="updateDBStatus" targetRef="ExclusiveGateway_10" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_7" name="" attachedToRef="updateInfraRequest">
+ <bpmn2:outgoing>SequenceFlow_0mipf25</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_1" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:exclusiveGateway id="ParallelGateway_5">
+ <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_13qdn1s</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ParallelGateway_5" targetRef="ParallelGateway_6" />
+ <bpmn2:parallelGateway id="ParallelGateway_6">
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
+ </bpmn2:parallelGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="ParallelGateway_6" targetRef="Done" />
+ <bpmn2:scriptTask id="Done" name="Prepare Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[println "INSIDE --> Complete MSO Process Done SUCCESSFULLY"
+import org.openecomp.mso.bpmn.common.scripts.*
+def postProcessResponseData = new CompleteMsoProcess()
+postProcessResponseData.postProcessResponse(execution)
+println "CompleteMsoProcess Response -->" + "\n" + execution.getVariable("CompletionHandlerResponse")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="Done" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1q7eer1" name="Connect Fault" sourceRef="BoundaryEvent_6" targetRef="BuildErrorMessage1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0mipf25" name="Connect Fault" sourceRef="BoundaryEvent_7" targetRef="BuildErrorMessage" />
+ <bpmn2:callActivity id="CallActivity_101qf6x" name="Call Notification Service" calledElement="${URN_mso_workflow_notification_name}">
+ <bpmn2:extensionElements>
+ <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 variables="all" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>if_notifcationURLExists</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13qdn1s</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_13qdn1s" sourceRef="CallActivity_101qf6x" targetRef="ParallelGateway_5" />
+ <bpmn2:sequenceFlow id="if_notifcationURLExists" name="Yes" sourceRef="ParallelGateway_3" targetRef="CallActivity_101qf6x">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_notification-url-Ok") ==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ </bpmn2:process>
+ <bpmn2:message id="Message_2" name="CompleteMsoProcessRequest" />
+ <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="CompleteMsoProcess">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_41" bpmnElement="StartEvent_1">
+ <dc:Bounds x="106" y="297" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="132" y="338" width="50" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_4" bpmnElement="ParallelGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="471" y="193" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="386" y="170" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_6" bpmnElement="ParallelGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="811" y="193" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="836" y="248" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_59" bpmnElement="ExclusiveGateway_5">
+ <dc:Bounds x="372" y="289" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="397" y="344" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_7" bpmnElement="ParallelGateway_6">
+ <dc:Bounds x="1162" y="290" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1187" y="345" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ParallelGateway_6" targetElement="_BPMNShape_ParallelGateway_7">
+ <di:waypoint xsi:type="dc:Point" x="861" y="218" />
+ <di:waypoint xsi:type="dc:Point" x="1187" y="218" />
+ <di:waypoint xsi:type="dc:Point" x="1187" y="290" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1024" y="203" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_34" bpmnElement="preProcessRequest">
+ <dc:Bounds x="226" y="275" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_34" targetElement="_BPMNShape_ExclusiveGateway_59">
+ <di:waypoint xsi:type="dc:Point" x="326" y="315" />
+ <di:waypoint xsi:type="dc:Point" x="372" y="314" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="315" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_41" targetElement="_BPMNShape_ScriptTask_34">
+ <di:waypoint xsi:type="dc:Point" x="142" y="315" />
+ <di:waypoint xsi:type="dc:Point" x="226" y="315" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="184" y="300" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_60" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="475" y="538" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="533" y="553" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_9" bpmnElement="ParallelGateway_7" isMarkerVisible="true">
+ <dc:Bounds x="955" y="538" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="980" y="593" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ParallelGateway_9" targetElement="_BPMNShape_ParallelGateway_7">
+ <di:waypoint xsi:type="dc:Point" x="1005" y="563" />
+ <di:waypoint xsi:type="dc:Point" x="1187" y="563" />
+ <di:waypoint xsi:type="dc:Point" x="1187" y="340" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1096" y="548" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ParallelGateway_4" targetElement="_BPMNShape_ParallelGateway_6">
+ <di:waypoint xsi:type="dc:Point" x="496" y="243" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="306" />
+ <di:waypoint xsi:type="dc:Point" x="836" y="306" />
+ <di:waypoint xsi:type="dc:Point" x="836" y="243" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="502" y="248.42647058823525" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_51" bpmnElement="updateInfraRequest">
+ <dc:Bounds x="714" y="614" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_52" bpmnElement="updateDBStatus">
+ <dc:Bounds x="711" y="433" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_47" bpmnElement="SequenceFlow_45" sourceElement="_BPMNShape_ExclusiveGateway_59" targetElement="_BPMNShape_ParallelGateway_4">
+ <di:waypoint xsi:type="dc:Point" x="397" y="289" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="218" />
+ <di:waypoint xsi:type="dc:Point" x="471" y="218" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412" y="253.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_64" bpmnElement="prepareUpdateRequest">
+ <dc:Bounds x="563" y="433" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_48" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ExclusiveGateway_59" targetElement="_BPMNShape_ExclusiveGateway_60">
+ <di:waypoint xsi:type="dc:Point" x="397" y="339" />
+ <di:waypoint xsi:type="dc:Point" x="397" y="563" />
+ <di:waypoint xsi:type="dc:Point" x="475" y="563" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412" y="451" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_50" bpmnElement="SequenceFlow_49" sourceElement="_BPMNShape_ScriptTask_64" targetElement="_BPMNShape_ScriptTask_52">
+ <di:waypoint xsi:type="dc:Point" x="663" y="473" />
+ <di:waypoint xsi:type="dc:Point" x="711" y="473" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="681" y="473" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_73" bpmnElement="SequenceFlow_72" sourceElement="_BPMNShape_ExclusiveGateway_60" targetElement="_BPMNShape_ScriptTask_88">
+ <di:waypoint xsi:type="dc:Point" x="500" y="588" />
+ <di:waypoint xsi:type="dc:Point" x="500" y="654" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="654" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="506" y="611" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_82" bpmnElement="SequenceFlow_81" sourceElement="_BPMNShape_ExclusiveGateway_60" targetElement="_BPMNShape_ScriptTask_64">
+ <di:waypoint xsi:type="dc:Point" x="500" y="538" />
+ <di:waypoint xsi:type="dc:Point" x="500" y="473" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="473" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="505" y="492" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_13" bpmnElement="subProcessExceptionCompleteMSO" isExpanded="true">
+ <dc:Bounds x="166" y="858" width="427" height="169" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_110" bpmnElement="endEventExceptionCompleteMSO">
+ <dc:Bounds x="466" y="925" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="484" y="966" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_51" bpmnElement="startEventExceptionCompleteMSO">
+ <dc:Bounds x="214" y="925" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="232" y="966" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_63" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
+ <dc:Bounds x="873" y="628" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="683" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_51" targetElement="_BPMNShape_ExclusiveGateway_63">
+ <di:waypoint xsi:type="dc:Point" x="814" y="654" />
+ <di:waypoint xsi:type="dc:Point" x="873" y="653" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="999" y="697" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_63" targetElement="_BPMNShape_ParallelGateway_9">
+ <di:waypoint xsi:type="dc:Point" x="923" y="653" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="653" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="588" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="899" y="611" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_111" bpmnElement="EndEvent_4">
+ <dc:Bounds x="1010" y="741" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="782" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_76" bpmnElement="BuildErrorMessage">
+ <dc:Bounds x="849" y="719" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ExclusiveGateway_63" targetElement="_BPMNShape_ScriptTask_76">
+ <di:waypoint xsi:type="dc:Point" x="898" y="678" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="943" y="505" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_76" targetElement="_BPMNShape_EndEvent_111">
+ <di:waypoint xsi:type="dc:Point" x="949" y="759" />
+ <di:waypoint xsi:type="dc:Point" x="1010" y="759" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="980" y="759" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_77" bpmnElement="Done">
+ <dc:Bounds x="1253" y="276" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_66" bpmnElement="ExclusiveGateway_10" isMarkerVisible="true">
+ <dc:Bounds x="873" y="447" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="898" y="502" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_52" targetElement="_BPMNShape_ExclusiveGateway_66">
+ <di:waypoint xsi:type="dc:Point" x="811" y="473" />
+ <di:waypoint xsi:type="dc:Point" x="873" y="472" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1005" y="473" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_66" targetElement="_BPMNShape_ParallelGateway_9">
+ <di:waypoint xsi:type="dc:Point" x="923" y="472" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="472" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="538" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1092" y="473" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="BuildErrorMessage1">
+ <dc:Bounds x="849" y="326" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ExclusiveGateway_66" targetElement="_BPMNShape_ScriptTask_79">
+ <di:waypoint xsi:type="dc:Point" x="898" y="447" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="406" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="427" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_113" bpmnElement="EndEvent_5">
+ <dc:Bounds x="1010" y="348" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="389" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ParallelGateway_7" targetElement="_BPMNShape_ScriptTask_77">
+ <di:waypoint xsi:type="dc:Point" x="1212" y="315" />
+ <di:waypoint xsi:type="dc:Point" x="1253" y="316" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1202" y="316" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_EndEvent_113">
+ <di:waypoint xsi:type="dc:Point" x="949" y="366" />
+ <di:waypoint xsi:type="dc:Point" x="1010" y="366" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="969" y="366" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_128" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1397" y="297" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1415" y="338" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_77" targetElement="_BPMNShape_EndEvent_128">
+ <di:waypoint xsi:type="dc:Point" x="1353" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="1397" y="315" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1375" y="300.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_28" bpmnElement="BoundaryEvent_6">
+ <dc:Bounds x="742" y="415" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="760" y="456" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="BoundaryEvent_7">
+ <dc:Bounds x="743" y="676" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="558" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_88" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="563" y="614" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_88" targetElement="_BPMNShape_ScriptTask_51">
+ <di:waypoint xsi:type="dc:Point" x="663" y="654" />
+ <di:waypoint xsi:type="dc:Point" x="714" y="654" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="683" y="678" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q7eer1_di" bpmnElement="SequenceFlow_1q7eer1">
+ <di:waypoint xsi:type="dc:Point" x="760" y="415" />
+ <di:waypoint xsi:type="dc:Point" x="760" y="366" />
+ <di:waypoint xsi:type="dc:Point" x="849" y="366" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="680" y="380" width="68" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mipf25_di" bpmnElement="SequenceFlow_0mipf25">
+ <di:waypoint xsi:type="dc:Point" x="761" y="712" />
+ <di:waypoint xsi:type="dc:Point" x="761" y="759" />
+ <di:waypoint xsi:type="dc:Point" x="849" y="759" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="680" y="726" width="68" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_101qf6x_di" bpmnElement="CallActivity_101qf6x">
+ <dc:Bounds x="620" y="119" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13qdn1s_di" bpmnElement="SequenceFlow_13qdn1s">
+ <di:waypoint xsi:type="dc:Point" x="720" y="159" />
+ <di:waypoint xsi:type="dc:Point" x="836" y="159" />
+ <di:waypoint xsi:type="dc:Point" x="836" y="193" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="778" y="144" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i1h3il_di" bpmnElement="SequenceFlow_1i1h3il">
+ <di:waypoint xsi:type="dc:Point" x="250" y="943" />
+ <di:waypoint xsi:type="dc:Point" x="466" y="943" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="358" y="928" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="if_notifcationURLExists">
+ <di:waypoint xsi:type="dc:Point" x="496" y="193" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="159" />
+ <di:waypoint xsi:type="dc:Point" x="620" y="159" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="519" y="165" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupName.bpmn
index 74e962f4d9..b190107d5e 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupName.bpmn
@@ -1,229 +1,229 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="ConfirmVolumeGroupName" name="ConfirmVolumeGroupName" isExecutable="true">
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_2">
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVGN_queryVolumeGroupResponseCode") != 200 && execution.getVariable("CVGN_queryVolumeGroupResponseCode") != 404}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="AAIQueryFailure" name="AAI Query Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="ConfirmVolumeGroupName" name="ConfirmVolumeGroupName" isExecutable="true">
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_2">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVGN_queryVolumeGroupResponseCode") != 200 && execution.getVariable("CVGN_queryVolumeGroupResponseCode") != 404}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="AAIQueryFailure" name="AAI Query Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvgn= new ConfirmVolumeGroupName()
-cvgn.handleAAIQueryFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
- <bpmn2:endEvent id="EndEvent_7">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="QueryAAIForVolumeGroupId" name="Query AAI for&#xD;&#xA;Volume Group Id" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvgn.handleAAIQueryFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
+ <bpmn2:endEvent id="EndEvent_7">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="QueryAAIForVolumeGroupId" name="Query AAI for&#xD;&#xA;Volume Group Id" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvgn= new ConfirmVolumeGroupName()
-cvgn.queryAAIForVolumeGroupId(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVolumeGroupId" targetRef="ExclusiveGateway_3"/>
- <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvgn.queryAAIForVolumeGroupId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVolumeGroupId" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvgn= new ConfirmVolumeGroupName()
-cvgn.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForVolumeGroupId"/>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ExclusiveGateway_3" targetRef="CheckAAIQueryResult"/>
- <bpmn2:scriptTask id="CheckAAIQueryResult" name="Check AAI Query Result" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvgn.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForVolumeGroupId"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ExclusiveGateway_3" targetRef="CheckAAIQueryResult"/>
+ <bpmn2:scriptTask id="CheckAAIQueryResult" name="Check AAI Query Result" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvgn= new ConfirmVolumeGroupName()
-cvgn.checkAAIQueryResult(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CheckAAIQueryResult" targetRef="ExclusiveGateway_1"/>
- <bpmn2:scriptTask id="VolumeGroupNotInName" name="Volume Group Not In Name" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvgn.checkAAIQueryResult(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CheckAAIQueryResult" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:scriptTask id="VolumeGroupNotInName" name="Volume Group Not In Name" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvgn= new ConfirmVolumeGroupName()
-cvgn.handleVolumeGroupNameNoMatch(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_7">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVGN_volumeGroupNameMatches")==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_1" targetRef="VolumeGroupNotInName"/>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:outputParameter name="WorkflowResponse"><![CDATA[<aetgt:CreateVfModuleResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1" xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+cvgn.handleVolumeGroupNameNoMatch(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_7">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVGN_volumeGroupNameMatches")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_1" targetRef="VolumeGroupNotInName"/>
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:outputParameter name="WorkflowResponse"><![CDATA[<aetgt:CreateVfModuleResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" xmlns:ns="http://org.openecomp/mso/workflow/schema/v1">
<ns:response>SUCCESS</ns:response>
- </aetgt:CreateVfModuleResponse>]]></camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="VolumeGroupNotInName" targetRef="EndEvent_1"/>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables"/>
- </bpmn2:process>
- <bpmn2:message id="Message_1" name="ConfirmVolumeGroupNameRequest"/>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateAAIVfModule">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="43.0" y="199.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="61.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
- <dc:Bounds height="80.0" width="100.0" x="204.0" y="178.0"/>
- </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="79.0" y="217.0"/>
- <di:waypoint xsi:type="dc:Point" x="120.0" y="217.0"/>
- <di:waypoint xsi:type="dc:Point" x="120.0" y="218.0"/>
- <di:waypoint xsi:type="dc:Point" x="204.0" y="218.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="101.0" y="217.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="912.0" y="199.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="930.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="468.0" y="191.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="493.0" y="246.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
- <dc:Bounds height="80.0" width="100.0" x="518.0" y="297.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
- <di:waypoint xsi:type="dc:Point" x="493.0" y="241.0"/>
- <di:waypoint xsi:type="dc:Point" x="493.0" y="259.0"/>
- <di:waypoint xsi:type="dc:Point" x="568.0" y="259.0"/>
- <di:waypoint xsi:type="dc:Point" x="568.0" y="297.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="547.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
- <dc:Bounds height="36.0" width="36.0" x="550.0" y="416.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="568.0" y="457.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
- <di:waypoint xsi:type="dc:Point" x="568.0" y="377.0"/>
- <di:waypoint xsi:type="dc:Point" x="568.0" y="416.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="565.0" y="388.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVolumeGroupId">
- <dc:Bounds height="80.0" width="100.0" x="336.0" y="178.0"/>
- </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="304.0" y="218.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="218.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="324.0" y="218.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
- <di:waypoint xsi:type="dc:Point" x="436.0" y="218.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="218.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="216.0"/>
- <di:waypoint xsi:type="dc:Point" x="468.0" y="216.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="449.0" y="217.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="720.0" y="415.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="738.0" y="456.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_177" bpmnElement="CheckAAIQueryResult">
- <dc:Bounds height="80.0" width="100.0" x="624.0" y="177.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_177">
- <di:waypoint xsi:type="dc:Point" x="518.0" y="216.0"/>
- <di:waypoint xsi:type="dc:Point" x="551.0" y="216.0"/>
- <di:waypoint xsi:type="dc:Point" x="551.0" y="217.0"/>
- <di:waypoint xsi:type="dc:Point" x="624.0" y="217.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="548.0" y="217.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_103" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="801.0" y="191.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="826.0" y="246.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_177" targetElement="_BPMNShape_ExclusiveGateway_103">
- <di:waypoint xsi:type="dc:Point" x="724.0" y="217.0"/>
- <di:waypoint xsi:type="dc:Point" x="762.0" y="217.0"/>
- <di:waypoint xsi:type="dc:Point" x="762.0" y="216.0"/>
- <di:waypoint xsi:type="dc:Point" x="801.0" y="216.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="735.0" y="217.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_103" targetElement="_BPMNShape_EndEvent_92">
- <di:waypoint xsi:type="dc:Point" x="851.0" y="216.0"/>
- <di:waypoint xsi:type="dc:Point" x="869.0" y="216.0"/>
- <di:waypoint xsi:type="dc:Point" x="869.0" y="217.0"/>
- <di:waypoint xsi:type="dc:Point" x="912.0" y="217.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="855.0" y="216.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="VolumeGroupNotInName">
- <dc:Bounds height="80.0" width="100.0" x="688.0" y="297.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_103" targetElement="_BPMNShape_ScriptTask_179">
- <di:waypoint xsi:type="dc:Point" x="826.0" y="241.0"/>
- <di:waypoint xsi:type="dc:Point" x="826.0" y="269.0"/>
- <di:waypoint xsi:type="dc:Point" x="738.0" y="269.0"/>
- <di:waypoint xsi:type="dc:Point" x="738.0" y="297.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="822.0" y="269.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_EndEvent_162">
- <di:waypoint xsi:type="dc:Point" x="738.0" y="377.0"/>
- <di:waypoint xsi:type="dc:Point" x="738.0" y="415.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="735.0" y="391.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+ </aetgt:CreateVfModuleResponse>]]></camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="VolumeGroupNotInName" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables"/>
+ </bpmn2:process>
+ <bpmn2:message id="Message_1" name="ConfirmVolumeGroupNameRequest"/>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateAAIVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="43.0" y="199.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="61.0" y="240.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
+ <dc:Bounds height="80.0" width="100.0" x="204.0" y="178.0"/>
+ </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="79.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="120.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="120.0" y="218.0"/>
+ <di:waypoint xsi:type="dc:Point" x="204.0" y="218.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="101.0" y="217.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="912.0" y="199.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="930.0" y="240.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="468.0" y="191.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="493.0" y="246.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
+ <dc:Bounds height="80.0" width="100.0" x="518.0" y="297.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="241.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="259.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="259.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="297.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="547.0" y="259.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
+ <dc:Bounds height="36.0" width="36.0" x="550.0" y="416.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="568.0" y="457.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="377.0"/>
+ <di:waypoint xsi:type="dc:Point" x="568.0" y="416.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="565.0" y="388.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVolumeGroupId">
+ <dc:Bounds height="80.0" width="100.0" x="336.0" y="178.0"/>
+ </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="304.0" y="218.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="218.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="324.0" y="218.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
+ <di:waypoint xsi:type="dc:Point" x="436.0" y="218.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="218.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="216.0"/>
+ <di:waypoint xsi:type="dc:Point" x="468.0" y="216.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="449.0" y="217.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="720.0" y="415.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="738.0" y="456.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_177" bpmnElement="CheckAAIQueryResult">
+ <dc:Bounds height="80.0" width="100.0" x="624.0" y="177.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_177">
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="216.0"/>
+ <di:waypoint xsi:type="dc:Point" x="551.0" y="216.0"/>
+ <di:waypoint xsi:type="dc:Point" x="551.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="217.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="548.0" y="217.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_103" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="801.0" y="191.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="826.0" y="246.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_177" targetElement="_BPMNShape_ExclusiveGateway_103">
+ <di:waypoint xsi:type="dc:Point" x="724.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="762.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="762.0" y="216.0"/>
+ <di:waypoint xsi:type="dc:Point" x="801.0" y="216.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="735.0" y="217.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_103" targetElement="_BPMNShape_EndEvent_92">
+ <di:waypoint xsi:type="dc:Point" x="851.0" y="216.0"/>
+ <di:waypoint xsi:type="dc:Point" x="869.0" y="216.0"/>
+ <di:waypoint xsi:type="dc:Point" x="869.0" y="217.0"/>
+ <di:waypoint xsi:type="dc:Point" x="912.0" y="217.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="855.0" y="216.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="VolumeGroupNotInName">
+ <dc:Bounds height="80.0" width="100.0" x="688.0" y="297.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_103" targetElement="_BPMNShape_ScriptTask_179">
+ <di:waypoint xsi:type="dc:Point" x="826.0" y="241.0"/>
+ <di:waypoint xsi:type="dc:Point" x="826.0" y="269.0"/>
+ <di:waypoint xsi:type="dc:Point" x="738.0" y="269.0"/>
+ <di:waypoint xsi:type="dc:Point" x="738.0" y="297.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="822.0" y="269.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_EndEvent_162">
+ <di:waypoint xsi:type="dc:Point" x="738.0" y="377.0"/>
+ <di:waypoint xsi:type="dc:Point" x="738.0" y="415.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="735.0" y="391.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupTenant.bpmn
index 7da59a3f3f..df55046a7b 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupTenant.bpmn
@@ -1,10 +1,10 @@
<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_jPy0EB7JEeaR94RQz1cKqQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_jPy0EB7JEeaR94RQz1cKqQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
<bpmn2:process id="ConfirmVolumeGroupTenant" name="ConfirmVolumeGroupTenant" isExecutable="true">
<bpmn2:scriptTask id="queryAAIForVolumeGroup" name="Query AAI Volume Group" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
volume.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -25,7 +25,7 @@ volume.preProcessRequest(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="assignError" name="Assign Workflow Exception" scriptFormat="groovy">
<bpmn2:incoming>idsMatchNo</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
volume.assignWorkflowException(execution, "does not belong to your tenant")]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -37,7 +37,7 @@ volume.assignWorkflowException(execution, "does not belong to your tenant")]]></
<bpmn2:scriptTask id="assignVolumeHeatId" name="Assign Volume Heat Id" scriptFormat="groovy">
<bpmn2:incoming>groupNamesMatchYes</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
volume.assignVolumeHeatId(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -45,7 +45,7 @@ volume.assignVolumeHeatId(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="assignErrorNames" name="Assign Workflow Exception" scriptFormat="groovy">
<bpmn2:incoming>groupNamesMatchNo</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
volume.assignWorkflowException(execution, "name does not match")]]></bpmn2:script>
</bpmn2:scriptTask>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CreateAAIVfModule.bpmn
index 8970324115..3ac1fe7781 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CreateAAIVfModule.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
<bpmn2:process id="CreateAAIVfModule" name="CreateAAIVfModule" isExecutable="true">
<bpmn2:exclusiveGateway id="ExclusiveGateway_5" default="SequenceFlow_7">
<bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
@@ -23,7 +23,7 @@
<bpmn2:scriptTask id="AAIQueryFailure" name="AAI Query Failure" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -35,7 +35,7 @@ cvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="ProcessAAISearch" name="Process AAI Generic Vnf Query" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.processAAIGenericVnfQuery(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -58,7 +58,7 @@ cvm.processAAIGenericVnfQuery(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -70,7 +70,7 @@ cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="ScriptTask_2" name="Parse For Add-on Module" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.parseForAddOnModule(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -78,7 +78,7 @@ cvm.parseForAddOnModule(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="ScriptTask_8" name="Create Add-on Module" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.createVfModule(execution, false)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -95,7 +95,7 @@ cvm.createVfModule(execution, false)]]></bpmn2:script>
<bpmn2:scriptTask id="QueryAAIForGenericVnf" name="Query AAI for&#xD;&#xA;Generic Vnf" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -103,7 +103,7 @@ cvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -115,7 +115,7 @@ cvm.preProcessRequest(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="CreateVfModuleFailure" name="Create Vf Module Failure" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -147,7 +147,7 @@ cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="ScriptTask_3" name="Create Generic Vnf" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.createGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -159,7 +159,7 @@ cvm.createGenericVnf(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.createVfModule(execution, true)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -172,7 +172,7 @@ cvm.createVfModule(execution, true)]]></bpmn2:script>
<bpmn2:scriptTask id="ScriptTask_1" name="Parse for Base Module" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvm = new CreateAAIVfModule()
cvm.parseForBaseModule(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CreateAAIVfModuleVolumeGroup.bpmn
index bbdd21a3f7..dc94c898c2 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CreateAAIVfModuleVolumeGroup.bpmn
@@ -1,224 +1,224 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="CreateAAIVfModuleVolumeGroup" name="CreateAAIVfModuleVolumeGroup" isExecutable="true">
- <bpmn2:documentation>This flow expects its incoming request to be in the variable 'CreateAAIVfModuleVolumeGroupRequest'. This flow produces no output.</bpmn2:documentation>
- <bpmn2:scriptTask id="QueryAAIForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="CreateAAIVfModuleVolumeGroup" name="CreateAAIVfModuleVolumeGroup" isExecutable="true">
+ <bpmn2:documentation>This flow expects its incoming request to be in the variable 'CreateAAIVfModuleVolumeGroupRequest'. This flow produces no output.</bpmn2:documentation>
+ <bpmn2:scriptTask id="QueryAAIForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvfvg = new CreateAAIVfModuleVolumeGroup()
-cvfvg.getVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVfModule" targetRef="ExclusiveGateway_3"/>
- <bpmn2:endEvent id="EndEvent_7">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvfvg.getVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVfModule" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:endEvent id="EndEvent_7">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvfvg = new CreateAAIVfModuleVolumeGroup()
-cvfvg.handleAAIQueryFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1" xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+cvfvg.handleAAIQueryFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" xmlns:ns="http://org.openecomp/mso/workflow/schema/v1">
<ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
- </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateVfModule">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('CAAIVfModVG_getVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;VF Module not found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>
- <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateVfModule">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('CAAIVfModVG_getVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;VF Module not found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>
+ <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvfvg = new CreateAAIVfModuleVolumeGroup()
-cvfvg.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>
- <bpmn2:startEvent id="StartEvent_1" name="Start">
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>
- <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvfvg.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>
+ <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvfvg = new CreateAAIVfModuleVolumeGroup()
-cvfvg.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForVfModule"/>
- <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module with Volume Group" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvfvg.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForVfModule"/>
+ <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module with Volume Group" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def cvfvg = new CreateAAIVfModuleVolumeGroup()
-cvfvg.updateVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('CAAIVfModVG_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateAAIVfModuleVolumeGroup">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="60.0" y="212.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="61.0" y="253.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
- <dc:Bounds height="80.0" width="100.0" x="168.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">
- <dc:Bounds height="80.0" width="100.0" x="672.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1016.0" y="212.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="1009.0" y="253.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="841.0" y="204.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="866.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
- <di:waypoint xsi:type="dc:Point" x="891.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="993.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="993.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="1016.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="929.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="493.0" y="204.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="518.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">
- <di:waypoint xsi:type="dc:Point" x="543.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="607.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="607.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="672.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="558.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
- <dc:Bounds height="80.0" width="100.0" x="468.0" y="60.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
- <di:waypoint xsi:type="dc:Point" x="518.0" y="204.0"/>
- <di:waypoint xsi:type="dc:Point" x="518.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="38.0" width="130.0" x="528.0" y="152.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
- <dc:Bounds height="36.0" width="36.0" x="500.0" y="0.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="518.0" y="41.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
- <di:waypoint xsi:type="dc:Point" x="518.0" y="60.0"/>
- <di:waypoint xsi:type="dc:Point" x="518.0" y="36.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="515.0" y="49.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVfModule">
- <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
- </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="268.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="288.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
- <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="493.0" y="229.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="449.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">
- <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
- <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>
- <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
- <di:waypoint xsi:type="dc:Point" x="772.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="797.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="797.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="841.0" y="229.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="801.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
- <di:waypoint xsi:type="dc:Point" x="866.0" y="204.0"/>
- <di:waypoint xsi:type="dc:Point" x="865.0" y="172.0"/>
- <di:waypoint xsi:type="dc:Point" x="867.0" y="172.0"/>
- <di:waypoint xsi:type="dc:Point" x="867.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="157.0" x="883.0" y="158.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
- <di:waypoint xsi:type="dc:Point" x="96.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="168.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="148.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+cvfvg.updateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('CAAIVfModVG_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateAAIVfModuleVolumeGroup">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="60.0" y="212.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="61.0" y="253.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
+ <dc:Bounds height="80.0" width="100.0" x="168.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="672.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="1016.0" y="212.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="1009.0" y="253.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="841.0" y="204.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="866.0" y="259.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
+ <di:waypoint xsi:type="dc:Point" x="891.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="993.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="993.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1016.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="929.0" y="229.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="493.0" y="204.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="518.0" y="259.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">
+ <di:waypoint xsi:type="dc:Point" x="543.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="607.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="607.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="672.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="558.0" y="229.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
+ <dc:Bounds height="80.0" width="100.0" x="468.0" y="60.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="204.0"/>
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="130.0" x="528.0" y="152.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
+ <dc:Bounds height="36.0" width="36.0" x="500.0" y="0.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="518.0" y="41.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="60.0"/>
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="36.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="515.0" y="49.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
+ </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="268.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="288.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
+ <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="229.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="449.0" y="229.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">
+ <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="772.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="797.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="797.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="841.0" y="229.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="801.0" y="229.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="204.0"/>
+ <di:waypoint xsi:type="dc:Point" x="865.0" y="172.0"/>
+ <di:waypoint xsi:type="dc:Point" x="867.0" y="172.0"/>
+ <di:waypoint xsi:type="dc:Point" x="867.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="157.0" x="883.0" y="158.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
+ <di:waypoint xsi:type="dc:Point" x="96.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="168.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="148.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/DeleteAAIVfModule.bpmn
index d043619fbb..297e04c0f7 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/DeleteAAIVfModule.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
<bpmn2:process id="DeleteAAIVfModule" name="DeleteAAIVfModule" isExecutable="true">
<bpmn2:exclusiveGateway id="ExclusiveGateway_5" default="SequenceFlow_8">
<bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
@@ -21,7 +21,7 @@
<bpmn2:scriptTask id="AAIQueryFailure" name="AAI Query Failure" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -33,7 +33,7 @@ dvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="ParseForAddonModule" name="Parse For Vf Module" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.parseForVfModule(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -41,7 +41,7 @@ dvm.parseForVfModule(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="DeleteVfModule" name="Delete Vf Module" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.deleteVfModule(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -60,7 +60,7 @@ dvm.deleteVfModule(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.handleDeleteVfModuleFailure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -68,7 +68,7 @@ dvm.handleDeleteVfModuleFailure(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="QueryAAIForGenericVnf" name="Query AAI for&#xD;&#xA;Generic Vnf" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -84,7 +84,7 @@ dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="QueryAAIForGenericVnf1" name="Query AAI for Generif VNF 1" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -92,7 +92,7 @@ dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="DeleteGenericVnfFailure" name="Delete Generic Vnf Failure" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.handleDeleteGenericVnfFailure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -118,7 +118,7 @@ dvm.handleDeleteGenericVnfFailure(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="AAIQueryFailure1" name="AAI Query Failure 1" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -130,7 +130,7 @@ dvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="DeleteGenericVnf" name="Delete Generic Vnf" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.deleteGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -138,7 +138,7 @@ dvm.deleteGenericVnf(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="ParseForGenericVNFResourceVersion" name="Parse for Generic VNF Resource Version" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.parseForResourceVersion(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -160,7 +160,7 @@ dvm.parseForResourceVersion(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def dvm = new DeleteAAIVfModule()
dvm.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
new file mode 100644
index 0000000000..75e05cb58e
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
@@ -0,0 +1,542 @@
+<?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="_3SPHsLr9EeWak-hhutJWuQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="FalloutHandler" name="Fallout Handler" isExecutable="true">
+ <bpmn2:parallelGateway id="ParallelGateway_1">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:parallelGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_6" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Notification URL exists?" default="SequenceFlow_23">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="yes" sourceRef="ExclusiveGateway_1" targetRef="Task_0ixuwt5">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notification-url-Ok") ==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="no" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_4" />
+ <bpmn2:scriptTask id="ScriptTask_8" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def preProcessRequestData = new FalloutHandler()
+preProcessRequestData.preProcessRequest(execution)
+
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ScriptTask_8" targetRef="ParallelGateway_1" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_8" />
+ <bpmn2:parallelGateway id="ParallelGateway_6">
+ <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:parallelGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ParallelGateway_6" targetRef="ScriptTask_2" />
+ <bpmn2:scriptTask id="ScriptTask_2" name="Post Process Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_6" />
+ <bpmn2:exclusiveGateway id="ParallelGateway_4">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0m7gwor</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ParallelGateway_4" targetRef="ParallelGateway_6" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_6" default="SequenceFlow_26">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_request_id-Ok") ==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_2" />
+ <bpmn2:serviceTask id="ServiceTask_3" name="Update Request Gamma">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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">
+ <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Gamma"
+import org.openecomp.mso.bpmn.common.scripts.*
+def updateRequestGamma= new FalloutHandler()
+return updateRequestGamma.updateRequestGammaPayload(execution)]]></camunda:script>
+ </camunda:inputParameter>
+ <camunda:outputParameter name="FH_updateRequestGammaResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
+ <camunda:outputParameter name="FH_updateRequestGammaResponseCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ServiceTask_3" targetRef="ExclusiveGateway_7" />
+ <bpmn2:boundaryEvent id="BoundaryEvent_2" name="Connect Fault" attachedToRef="ServiceTask_3">
+ <bpmn2:outgoing>SequenceFlow_72</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:exclusiveGateway id="ParallelGateway_5">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="ParallelGateway_5" targetRef="ParallelGateway_6" />
+ <bpmn2:endEvent id="EndEvent_6" name="Normal End">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_72" name="" sourceRef="BoundaryEvent_2" targetRef="ScriptTask_6" />
+ <bpmn2:scriptTask id="ScriptTask_6" name="Build Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_72</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_79</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestGammaResponseCode")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_79" name="" sourceRef="ScriptTask_6" targetRef="EndEvent_13" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_7" name="Update Success?" default="SequenceFlow_31">
+ <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ExclusiveGateway_7" targetRef="ScriptTask_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ExclusiveGateway_7" targetRef="ParallelGateway_5">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestGammaResponseCode")==200}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_7" name="Build Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_80</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_73</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestInfraResponseCode")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_73" name="" sourceRef="ScriptTask_7" targetRef="EndEvent_14" />
+ <bpmn2:serviceTask id="ServiceTask_2" name="Update Request Infra">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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">
+ <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Infra"
+import org.openecomp.mso.bpmn.common.scripts.*
+def updateRequestInfra= new FalloutHandler()
+return updateRequestInfra.updateRequestInfraPayload(execution)]]></camunda:script>
+ </camunda:inputParameter>
+ <camunda:outputParameter name="FH_updateRequestInfraResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
+ <camunda:outputParameter name="FH_updateRequestInfraResponseCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="ServiceTask_2" targetRef="ExclusiveGateway_8" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_8" name="Update Success?" default="SequenceFlow_32">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ExclusiveGateway_8" targetRef="ScriptTask_7" />
+ <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="ExclusiveGateway_8" targetRef="ParallelGateway_5">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestInfraResponseCode")==200}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:boundaryEvent id="BoundaryEvent_3" name="Connect Fault" attachedToRef="ServiceTask_2">
+ <bpmn2:outgoing>SequenceFlow_80</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_90" errorRef="Error_2" />
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_80" name="" sourceRef="BoundaryEvent_3" targetRef="ScriptTask_7" />
+ <bpmn2:subProcess id="SubProcess_1" name="Event Handler" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_4" name="Handle Event" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ko8ggw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1pm9r7h</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+execution.setVariable("FH_success", false)
+def falloutHandler = new FalloutHandler()
+
+// This does not (and cannot) throw exceptions
+falloutHandler.postProcessResponse(execution)
+
+// Clear any WorkflowException object that might be in the execution, but keep a copy in FH_WorkflowException
+def wfe = execution.getVariable("WorkflowException")
+execution.setVariable("WorkflowException", null)
+execution.setVariable("FH_WorkflowException", wfe)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_1ko8ggw</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_8" />
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_2" name="Error End">
+ <bpmn2:incoming>SequenceFlow_1pm9r7h</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ko8ggw" sourceRef="StartEvent_2" targetRef="ScriptTask_4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1pm9r7h" sourceRef="ScriptTask_4" targetRef="EndEvent_2" />
+ </bpmn2:subProcess>
+ <bpmn2:endEvent id="EndEvent_14">
+ <bpmn2:incoming>SequenceFlow_73</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_13">
+ <bpmn2:incoming>SequenceFlow_79</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0m7gwor" sourceRef="Task_0ixuwt5" targetRef="ParallelGateway_4" />
+ <bpmn2:callActivity id="Task_0ixuwt5" name="Call Notification Service" calledElement="${URN_mso_workflow_notification_name}" camunda:calledElementBinding="deployment">
+ <bpmn2:extensionElements>
+ <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 variables="all" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0m7gwor</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSOWorkflowException" 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="FalloutHandler">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_1">
+ <dc:Bounds x="139" y="263" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="145" y="300" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_12" bpmnElement="ParallelGateway_1">
+ <dc:Bounds x="342" y="255" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="367" y="310" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_74" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="415" y="107" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="315" y="89" width="81" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_74">
+ <di:waypoint xsi:type="dc:Point" x="367" y="255" />
+ <di:waypoint xsi:type="dc:Point" x="367" y="132" />
+ <di:waypoint xsi:type="dc:Point" x="415" y="132" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="438" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="CallActivity_0jz0w0k_di">
+ <di:waypoint xsi:type="dc:Point" x="440" y="107" />
+ <di:waypoint xsi:type="dc:Point" x="440" y="65" />
+ <di:waypoint xsi:type="dc:Point" x="553" y="65" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="475" y="70" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_15" bpmnElement="ParallelGateway_4" isMarkerVisible="true">
+ <dc:Bounds x="742" y="107" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" y="162" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="_BPMNShape_ParallelGateway_15">
+ <di:waypoint xsi:type="dc:Point" x="440" y="157" />
+ <di:waypoint xsi:type="dc:Point" x="441" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="767" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="767" y="157" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="452" y="173" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_79" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
+ <dc:Bounds x="412" y="468" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="523" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_79">
+ <di:waypoint xsi:type="dc:Point" x="367" y="305" />
+ <di:waypoint xsi:type="dc:Point" x="367" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="412" y="493" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="415" y="445" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_90">
+ <di:waypoint xsi:type="dc:Point" x="437" y="468" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="444" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_91">
+ <di:waypoint xsi:type="dc:Point" x="437" y="518" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="488" y="650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="596" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_90" bpmnElement="ServiceTask_3">
+ <dc:Bounds x="492" y="362" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_91" bpmnElement="ServiceTask_2">
+ <dc:Bounds x="488" y="610" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_80" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
+ <dc:Bounds x="675" y="376" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="657" y="431" width="87" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ServiceTask_90" targetElement="_BPMNShape_ExclusiveGateway_80">
+ <di:waypoint xsi:type="dc:Point" x="592" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="675" y="401" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="632" y="404" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_81" bpmnElement="ExclusiveGateway_8" isMarkerVisible="true">
+ <dc:Bounds x="674" y="625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="656" y="680" width="87" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ServiceTask_91" targetElement="_BPMNShape_ExclusiveGateway_81">
+ <di:waypoint xsi:type="dc:Point" x="588" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="626" y="649" />
+ <di:waypoint xsi:type="dc:Point" x="674" y="650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="636" y="651" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ScriptTask_252">
+ <di:waypoint xsi:type="dc:Point" x="700" y="376" />
+ <di:waypoint xsi:type="dc:Point" x="701" y="324" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="707" y="351" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ScriptTask_253">
+ <di:waypoint xsi:type="dc:Point" x="699" y="625" />
+ <di:waypoint xsi:type="dc:Point" x="699" y="608" />
+ <di:waypoint xsi:type="dc:Point" x="699" y="577" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="709" y="657" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_16" bpmnElement="ParallelGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="853" y="468" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="878" y="523" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ParallelGateway_16">
+ <di:waypoint xsi:type="dc:Point" x="725" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="878" y="401" />
+ <di:waypoint xsi:type="dc:Point" x="878" y="468" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="762" y="392" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ParallelGateway_16">
+ <di:waypoint xsi:type="dc:Point" x="724" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="878" y="650" />
+ <di:waypoint xsi:type="dc:Point" x="878" y="518" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="878" y="574" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_17" bpmnElement="ParallelGateway_6">
+ <dc:Bounds x="957" y="254" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="982" y="309" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ParallelGateway_16" targetElement="_BPMNShape_ParallelGateway_17">
+ <di:waypoint xsi:type="dc:Point" x="903" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="493" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="304" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="943" y="478" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ParallelGateway_15" targetElement="_BPMNShape_ParallelGateway_17">
+ <di:waypoint xsi:type="dc:Point" x="792" y="132" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="132" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="254" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="887" y="117" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_99">
+ <di:waypoint xsi:type="dc:Point" x="175" y="281" />
+ <di:waypoint xsi:type="dc:Point" x="211" y="281" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="193" y="281" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_99" bpmnElement="ScriptTask_8">
+ <dc:Bounds x="211" y="241" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_14" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="146" y="759" width="329" height="167" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_100" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="259" y="803" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">
+ <dc:Bounds x="175" y="825" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="193" y="869" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_101" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="1054" y="240" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ParallelGateway_17" targetElement="_BPMNShape_ScriptTask_101">
+ <di:waypoint xsi:type="dc:Point" x="1007" y="279" />
+ <di:waypoint xsi:type="dc:Point" x="1054" y="280" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1177" y="280" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_99" targetElement="_BPMNShape_ParallelGateway_12">
+ <di:waypoint xsi:type="dc:Point" x="311" y="281" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="280" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="327" y="281" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_129" bpmnElement="EndEvent_6">
+ <dc:Bounds x="1188" y="262" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1177" y="303" width="57" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_101" targetElement="_BPMNShape_EndEvent_129">
+ <di:waypoint xsi:type="dc:Point" x="1154" y="280" />
+ <di:waypoint xsi:type="dc:Point" x="1188" y="280" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1171" y="280" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_31" bpmnElement="BoundaryEvent_2">
+ <dc:Bounds x="525" y="344" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="300" width="68" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_32" bpmnElement="BoundaryEvent_3">
+ <dc:Bounds x="521" y="592" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="554" width="68" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_72" bpmnElement="SequenceFlow_72" sourceElement="_BPMNShape_BoundaryEvent_31" targetElement="_BPMNShape_ScriptTask_252">
+ <di:waypoint xsi:type="dc:Point" x="543" y="344" />
+ <di:waypoint xsi:type="dc:Point" x="543" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="543" y="326" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_73" bpmnElement="SequenceFlow_73" sourceElement="_BPMNShape_ScriptTask_253">
+ <di:waypoint xsi:type="dc:Point" x="750" y="537" />
+ <di:waypoint xsi:type="dc:Point" x="790" y="537" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770" y="522" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_252" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="651" y="244" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_253" bpmnElement="ScriptTask_7">
+ <dc:Bounds x="650" y="497" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_79" bpmnElement="SequenceFlow_79" sourceElement="_BPMNShape_ScriptTask_252">
+ <di:waypoint xsi:type="dc:Point" x="751" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="284" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="772" y="269" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_80" bpmnElement="SequenceFlow_80" sourceElement="_BPMNShape_BoundaryEvent_32" targetElement="_BPMNShape_ScriptTask_253">
+ <di:waypoint xsi:type="dc:Point" x="539" y="592" />
+ <di:waypoint xsi:type="dc:Point" x="539" y="537" />
+ <di:waypoint xsi:type="dc:Point" x="650" y="537" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="567" y="537" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0b9vn2u_di" bpmnElement="EndEvent_2">
+ <dc:Bounds x="403" y="825" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="399" y="869" width="47" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fmpj5u_di" bpmnElement="EndEvent_14">
+ <dc:Bounds x="790" y="519" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="560" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0w1puhf_di" bpmnElement="EndEvent_13">
+ <dc:Bounds x="793" y="266" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="811" y="307" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0m7gwor_di" bpmnElement="SequenceFlow_0m7gwor">
+ <di:waypoint xsi:type="dc:Point" x="654" y="65" />
+ <di:waypoint xsi:type="dc:Point" x="767" y="65" />
+ <di:waypoint xsi:type="dc:Point" x="767" y="107" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="711" y="50" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ko8ggw_di" bpmnElement="SequenceFlow_1ko8ggw">
+ <di:waypoint xsi:type="dc:Point" x="211" y="843" />
+ <di:waypoint xsi:type="dc:Point" x="259" y="843" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="235" y="818" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pm9r7h_di" bpmnElement="SequenceFlow_1pm9r7h">
+ <di:waypoint xsi:type="dc:Point" x="359" y="843" />
+ <di:waypoint xsi:type="dc:Point" x="403" y="843" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="381" y="818" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0jz0w0k_di" bpmnElement="Task_0ixuwt5">
+ <dc:Bounds x="554" y="25" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenerateVfModuleName.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenerateVfModuleName.bpmn
new file mode 100644
index 0000000000..ab4afdad1c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenerateVfModuleName.bpmn
@@ -0,0 +1,87 @@
+<?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.4.0">
+ <bpmn:process id="GenerateVfModuleName" name="GenerateVfModuleName" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_1opqmjl</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1opqmjl</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0aqc89s</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def generateVfModuleName = new GenerateVfModuleName()
+generateVfModuleName.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="QueryAAIForIndex" name="Query AAI for Index" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0aqc89s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1afb896</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def generateVfModuleName = new GenerateVfModuleName()
+generateVfModuleName.queryAAI(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1opqmjl" sourceRef="StartEvent_1" targetRef="InitializeVariables" />
+ <bpmn:sequenceFlow id="SequenceFlow_0aqc89s" sourceRef="InitializeVariables" targetRef="QueryAAIForIndex" />
+ <bpmn:sequenceFlow id="SequenceFlow_1afb896" sourceRef="QueryAAIForIndex" targetRef="PostProcessAAIResponse" />
+ <bpmn:sequenceFlow id="SequenceFlow_0o6nle0" sourceRef="PostProcessAAIResponse" targetRef="EndEvent_0mj5vyw" />
+ <bpmn:endEvent id="EndEvent_0mj5vyw">
+ <bpmn:incoming>SequenceFlow_0o6nle0</bpmn:incoming>
+ <bpmn:terminateEventDefinition />
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="PostProcessAAIResponse" name="Generate Name Based on Lowest Index" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1afb896</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0o6nle0</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def generateVfModuleName = new GenerateVfModuleName()
+generateVfModuleName.generateName(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenerateVfModuleName">
+ <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_0jnmm07_di" bpmnElement="InitializeVariables">
+ <dc:Bounds x="327" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1pyh00w_di" bpmnElement="QueryAAIForIndex">
+ <dc:Bounds x="518" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1opqmjl_di" bpmnElement="SequenceFlow_1opqmjl">
+ <di:waypoint xsi:type="dc:Point" x="209" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="327" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="268" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0aqc89s_di" bpmnElement="SequenceFlow_0aqc89s">
+ <di:waypoint xsi:type="dc:Point" x="427" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="518" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="473" y="95" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1afb896_di" bpmnElement="SequenceFlow_1afb896">
+ <di:waypoint xsi:type="dc:Point" x="618" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="696" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="657" y="105" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o6nle0_di" bpmnElement="SequenceFlow_0o6nle0">
+ <di:waypoint xsi:type="dc:Point" x="796" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="903" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="850" y="105" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0dr0y6r_di" bpmnElement="EndEvent_0mj5vyw">
+ <dc:Bounds x="903" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="921" y="138" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00yhljy_di" bpmnElement="PostProcessAAIResponse">
+ <dc:Bounds x="696" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn
index 52364a0f7c..15929b87eb 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn
@@ -1,25 +1,25 @@
<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_wAtdAGrUEeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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="_wAtdAGrUEeaJwpcpVN5gXw" 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="GenericDeleteService" name="GenericDeleteService" isExecutable="true">
<bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
<bpmn2:scriptTask id="processError" name="Process Error" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ExceptionUtil ex = new ExceptionUtil()
ex.processSubflowsBPMNException(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="processError" targetRef="EndEvent_3"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="processError" targetRef="EndEvent_3" />
<bpmn2:startEvent id="StartEvent_2">
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
</bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="processError"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="processError" />
<bpmn2:endEvent id="EndEvent_3">
<bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_25"/>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_25" />
</bpmn2:endEvent>
</bpmn2:subProcess>
<bpmn2:subProcess id="javaExceptionSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
@@ -29,32 +29,32 @@ ex.processSubflowsBPMNException(execution)
<bpmn2:scriptTask id="processJavaError" name="Process Error">
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsJavaException(execution)
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:startEvent id="StartEvent_3">
<bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" />
</bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="StartEvent_3" targetRef="processJavaError"/>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="processJavaError" targetRef="EndEvent_2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="StartEvent_3" targetRef="processJavaError" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="processJavaError" targetRef="EndEvent_2" />
</bpmn2:subProcess>
<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: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_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericDeleteService deleteService = new GenericDeleteService()
deleteService.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="initialization" targetRef="resourceVersionCheck"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="initialization" targetRef="resourceVersionCheck" />
<bpmn2:exclusiveGateway id="resourceVersionCheck" name="Resource Version Provided?" default="yes">
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>no</bpmn2:outgoing>
@@ -63,44 +63,45 @@ deleteService.preProcessRequest(execution)
<bpmn2:sequenceFlow id="no" name="No" sourceRef="resourceVersionCheck" targetRef="queryForResourceVersion">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDS_resourceVersionProvidedFlag" ) == false}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="yes" name="Yes" sourceRef="resourceVersionCheck" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:sequenceFlow id="yes" name="Yes" sourceRef="resourceVersionCheck" targetRef="ExclusiveGateway_2" />
<bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericDeleteService deleteService = new GenericDeleteService()
deleteService.setSuccessIndicator(execution, true)
execution.setVariable("WorkflowResponse", " ") //for junits
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
<bpmn2:exclusiveGateway id="ExclusiveGateway_2">
<bpmn2:incoming>yes</bpmn2:incoming>
<bpmn2:incoming>siExistYes</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="deleteServiceInstance"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="deleteServiceInstance" />
<bpmn2:endEvent id="EndEvent_1">
<bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_24"/>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_24" />
</bpmn2:endEvent>
- <bpmn2:scriptTask id="deleteServiceInstance" name="DELETE&#xD;&#xA;Service Instance" scriptFormat="groovy">
+ <bpmn2:scriptTask id="deleteServiceInstance" name="DELETE
+&#10;Service Instance" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericDeleteService deleteService = new GenericDeleteService()
deleteService.deleteServiceObject(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="deleteServiceInstance" targetRef="toggleSuccess"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="deleteServiceInstance" targetRef="toggleSuccess" />
<bpmn2:scriptTask id="queryForResourceVersion" name="Query SI Resource Version" scriptFormat="groovy">
<bpmn2:incoming>no</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericDeleteService deleteService = new GenericDeleteService()
deleteService.getServiceResourceVersion(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="queryForResourceVersion" targetRef="siExistCheck"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="queryForResourceVersion" targetRef="siExistCheck" />
<bpmn2:exclusiveGateway id="siExistCheck" name="Service Exist?">
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
<bpmn2:outgoing>siExistYes</bpmn2:outgoing>
@@ -109,195 +110,195 @@ deleteService.getServiceResourceVersion(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="siExistYes" name="Yes" sourceRef="siExistCheck" targetRef="ExclusiveGateway_2">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="siExistNo" name="No" sourceRef="siExistCheck" targetRef="EndEvent_4"/>
+ <bpmn2:sequenceFlow id="siExistNo" name="No" sourceRef="siExistCheck" targetRef="EndEvent_4" />
<bpmn2:endEvent id="EndEvent_4">
<bpmn2:incoming>siExistNo</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_38"/>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_38" />
</bpmn2:endEvent>
</bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericDeleteService">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="84.0" y="221.0"/>
+ <dc:Bounds x="84" y="221" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="102.0" y="262.0"/>
+ <dc:Bounds x="102" y="262" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="initialization">
- <dc:Bounds height="80.0" width="100.0" x="216.0" y="199.0"/>
+ <dc:Bounds x="216" y="199" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="resourceVersionCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="365.0" y="213.0"/>
+ <dc:Bounds x="365" y="213" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="169.0" x="401.0" y="243.0"/>
+ <dc:Bounds x="401" y="243" width="169" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_268" bpmnElement="queryForResourceVersion">
- <dc:Bounds height="80.0" width="100.0" x="457.0" y="100.0"/>
+ <dc:Bounds x="457" y="100" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="600.0" y="213.0"/>
+ <dc:Bounds x="600" y="213" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="625.0" y="268.0"/>
+ <dc:Bounds x="625" y="268" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="deleteServiceInstance">
- <dc:Bounds height="80.0" width="100.0" x="684.0" y="199.0"/>
+ <dc:Bounds x="684" y="199" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_213" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1006.0" y="221.0"/>
+ <dc:Bounds x="1006" y="221" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1024.0" y="262.0"/>
+ <dc:Bounds x="1024" y="262" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="169.0" width="321.0" x="155.0" y="384.0"/>
+ <dc:Bounds x="155" y="384" width="321" height="169" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_267">
- <di:waypoint xsi:type="dc:Point" x="120.0" y="239.0"/>
- <di:waypoint xsi:type="dc:Point" x="216.0" y="239.0"/>
+ <di:waypoint xsi:type="dc:Point" x="120" y="239" />
+ <di:waypoint xsi:type="dc:Point" x="216" y="239" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="147.0" y="239.0"/>
+ <dc:Bounds x="147" y="239" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ExclusiveGateway_224">
- <di:waypoint xsi:type="dc:Point" x="316.0" y="239.0"/>
- <di:waypoint xsi:type="dc:Point" x="365.0" y="238.0"/>
+ <di:waypoint xsi:type="dc:Point" x="316" y="239" />
+ <di:waypoint xsi:type="dc:Point" x="365" y="238" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="217.0" y="238.0"/>
+ <dc:Bounds x="217" y="238" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="no" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ScriptTask_268">
- <di:waypoint xsi:type="dc:Point" x="390.0" y="213.0"/>
- <di:waypoint xsi:type="dc:Point" x="390.0" y="140.0"/>
- <di:waypoint xsi:type="dc:Point" x="457.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="390" y="213" />
+ <di:waypoint xsi:type="dc:Point" x="390" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="457" y="140" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="392.0" y="179.0"/>
+ <dc:Bounds x="392" y="179" width="22" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_268" targetElement="_BPMNShape_ExclusiveGateway_241">
- <di:waypoint xsi:type="dc:Point" x="557.0" y="140.0"/>
- <di:waypoint xsi:type="dc:Point" x="600.0" y="139.0"/>
+ <di:waypoint xsi:type="dc:Point" x="557" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="600" y="139" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="492.0" y="140.0"/>
+ <dc:Bounds x="492" y="140" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_269">
- <di:waypoint xsi:type="dc:Point" x="650.0" y="238.0"/>
- <di:waypoint xsi:type="dc:Point" x="684.0" y="239.0"/>
+ <di:waypoint xsi:type="dc:Point" x="650" y="238" />
+ <di:waypoint xsi:type="dc:Point" x="684" y="239" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="556.0" y="239.0"/>
+ <dc:Bounds x="556" y="239" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_ScriptTask_272">
- <di:waypoint xsi:type="dc:Point" x="784.0" y="239.0"/>
- <di:waypoint xsi:type="dc:Point" x="826.0" y="239.0"/>
+ <di:waypoint xsi:type="dc:Point" x="784" y="239" />
+ <di:waypoint xsi:type="dc:Point" x="826" y="239" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="778.0" y="239.0"/>
+ <dc:Bounds x="778" y="239" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="yes" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_225">
- <di:waypoint xsi:type="dc:Point" x="390.0" y="263.0"/>
- <di:waypoint xsi:type="dc:Point" x="390.0" y="310.0"/>
- <di:waypoint xsi:type="dc:Point" x="517.0" y="310.0"/>
- <di:waypoint xsi:type="dc:Point" x="625.0" y="310.0"/>
- <di:waypoint xsi:type="dc:Point" x="625.0" y="263.0"/>
+ <di:waypoint xsi:type="dc:Point" x="390" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="390" y="310" />
+ <di:waypoint xsi:type="dc:Point" x="517" y="310" />
+ <di:waypoint xsi:type="dc:Point" x="625" y="310" />
+ <di:waypoint xsi:type="dc:Point" x="625" y="263" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="389.0" y="278.0"/>
+ <dc:Bounds x="389" y="278" width="29" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_23" bpmnElement="javaExceptionSubProcess" isExpanded="true">
- <dc:Bounds height="157.0" width="306.0" x="163.0" y="576.0"/>
+ <dc:Bounds x="163" y="576" width="306" height="157" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="180.0" y="451.0"/>
+ <dc:Bounds x="180" y="451" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="198.0" y="492.0"/>
+ <dc:Bounds x="198" y="492" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="192.0" y="637.0"/>
+ <dc:Bounds x="192" y="637" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="210.0" y="678.0"/>
+ <dc:Bounds x="210" y="678" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_216" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="408.0" y="637.0"/>
+ <dc:Bounds x="408" y="637" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="426.0" y="678.0"/>
+ <dc:Bounds x="426" y="678" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_217" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="420.0" y="451.0"/>
+ <dc:Bounds x="420" y="451" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="438.0" y="492.0"/>
+ <dc:Bounds x="438" y="492" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="processError">
- <dc:Bounds height="80.0" width="100.0" x="266.0" y="429.0"/>
+ <dc:Bounds x="266" y="429" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_271" bpmnElement="processJavaError">
- <dc:Bounds height="80.0" width="100.0" x="267.0" y="615.0"/>
+ <dc:Bounds x="267" y="615" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_65" targetElement="_BPMNShape_ScriptTask_270">
- <di:waypoint xsi:type="dc:Point" x="216.0" y="469.0"/>
- <di:waypoint xsi:type="dc:Point" x="266.0" y="469.0"/>
+ <di:waypoint xsi:type="dc:Point" x="216" y="469" />
+ <di:waypoint xsi:type="dc:Point" x="266" y="469" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="232.0" y="469.0"/>
+ <dc:Bounds x="232" y="469" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_217">
- <di:waypoint xsi:type="dc:Point" x="366.0" y="469.0"/>
- <di:waypoint xsi:type="dc:Point" x="420.0" y="469.0"/>
+ <di:waypoint xsi:type="dc:Point" x="366" y="469" />
+ <di:waypoint xsi:type="dc:Point" x="420" y="469" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="384.0" y="469.0"/>
+ <dc:Bounds x="384" y="469" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ScriptTask_271">
- <di:waypoint xsi:type="dc:Point" x="228.0" y="655.0"/>
- <di:waypoint xsi:type="dc:Point" x="267.0" y="655.0"/>
+ <di:waypoint xsi:type="dc:Point" x="228" y="655" />
+ <di:waypoint xsi:type="dc:Point" x="267" y="655" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_271" targetElement="_BPMNShape_EndEvent_216">
- <di:waypoint xsi:type="dc:Point" x="367.0" y="655.0"/>
- <di:waypoint xsi:type="dc:Point" x="408.0" y="655.0"/>
+ <di:waypoint xsi:type="dc:Point" x="367" y="655" />
+ <di:waypoint xsi:type="dc:Point" x="408" y="655" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="toggleSuccess">
- <dc:Bounds height="80.0" width="100.0" x="826.0" y="199.0"/>
+ <dc:Bounds x="826" y="199" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_272" targetElement="_BPMNShape_EndEvent_213">
- <di:waypoint xsi:type="dc:Point" x="926.0" y="239.0"/>
- <di:waypoint xsi:type="dc:Point" x="1006.0" y="239.0"/>
+ <di:waypoint xsi:type="dc:Point" x="926" y="239" />
+ <di:waypoint xsi:type="dc:Point" x="1006" y="239" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="828.0" y="239.0"/>
+ <dc:Bounds x="828" y="239" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_241" bpmnElement="siExistCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="600.0" y="114.0"/>
+ <dc:Bounds x="600" y="114" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="59.0" x="596.0" y="94.0"/>
+ <dc:Bounds x="596" y="94" width="59" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="siExistYes" sourceElement="_BPMNShape_ExclusiveGateway_241" targetElement="_BPMNShape_ExclusiveGateway_225">
- <di:waypoint xsi:type="dc:Point" x="625.0" y="164.0"/>
- <di:waypoint xsi:type="dc:Point" x="625.0" y="213.0"/>
+ <di:waypoint xsi:type="dc:Point" x="625" y="164" />
+ <di:waypoint xsi:type="dc:Point" x="625" y="213" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="624.0" y="168.0"/>
+ <dc:Bounds x="624" y="168" width="29" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="siExistNo" sourceElement="_BPMNShape_ExclusiveGateway_241" targetElement="_BPMNShape_EndEvent_241">
- <di:waypoint xsi:type="dc:Point" x="650.0" y="139.0"/>
- <di:waypoint xsi:type="dc:Point" x="733.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="650" y="139" />
+ <di:waypoint xsi:type="dc:Point" x="733" y="140" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="664.0" y="140.0"/>
+ <dc:Bounds x="664" y="140" width="22" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="733.0" y="122.0"/>
+ <dc:Bounds x="733" y="122" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="751.0" y="163.0"/>
+ <dc:Bounds x="751" y="163" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
+</bpmn2:definitions>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn
index b20a26a4c3..f46f86613f 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_oBLSkHqWEea26OhQB97uCQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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="_oBLSkHqWEea26OhQB97uCQ" 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="GenericDeleteVnf" name="GenericDeleteVnf" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -7,12 +7,12 @@
<bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization"/>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="initialization" targetRef="resourceVersionCheck"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="initialization" targetRef="resourceVersionCheck" />
<bpmn2:exclusiveGateway id="resourceVersionCheck" name="Resource Version Provided?" default="resourceVersionProvided">
<bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
<bpmn2:outgoing>resourceVariableNotProvided</bpmn2:outgoing>
@@ -21,56 +21,57 @@ deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="resourceVariableNotProvided" name="No" sourceRef="resourceVersionCheck" targetRef="queryForResourceVersion">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDV_resourceVersionProvided") == false}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="resourceVersionProvided" name="Yes" sourceRef="resourceVersionCheck" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:sequenceFlow id="resourceVersionProvided" name="Yes" sourceRef="resourceVersionCheck" targetRef="ExclusiveGateway_2" />
<bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
<bpmn2:scriptTask id="processBPMNError" name="Process Error" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="processBPMNError" targetRef="EndEvent_2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="processBPMNError" targetRef="EndEvent_2" />
<bpmn2:startEvent id="StartEvent_2">
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
</bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_2" targetRef="processBPMNError"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_2" targetRef="processBPMNError" />
<bpmn2:endEvent id="EndEvent_2">
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_40"/>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_40" />
</bpmn2:endEvent>
</bpmn2:subProcess>
<bpmn2:scriptTask id="queryForResourceVersion" name="Query SI Resource Version" scriptFormat="groovy">
<bpmn2:incoming>resourceVariableNotProvided</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
deleteVnf.getVnfResourceVersion(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="queryForResourceVersion" targetRef="vnfFoundCheck"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="queryForResourceVersion" targetRef="vnfFoundCheck" />
<bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
-deleteVnf.setSuccessIndicator(execution, true)
-
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+deleteVnf.setSuccessIndicator(execution, true)
+
execution.setVariable("WorkflowResponse", " ") //for junits]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
- <bpmn2:scriptTask id="deleteVnf" name="DELETE&#xD;&#xA;Vnf" scriptFormat="groovy">
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="deleteVnf" name="DELETE
+&#10;Vnf" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
deleteVnf.deleteVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="deleteVnf" targetRef="toggleSuccess"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="deleteVnf" targetRef="toggleSuccess" />
<bpmn2:endEvent id="EndEvent_3">
<bpmn2:incoming>vnfFoundNo</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_41"/>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_41" />
</bpmn2:endEvent>
<bpmn2:exclusiveGateway id="vnfFoundCheck" name="Vnf Found?" default="vnfFoundNo">
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
@@ -80,169 +81,169 @@ deleteVnf.deleteVnf(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="vnfFoundYes" name="Yes" sourceRef="vnfFoundCheck" targetRef="ExclusiveGateway_2">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDV_FoundIndicator") == true}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="vnfFoundNo" name="No" sourceRef="vnfFoundCheck" targetRef="EndEvent_3"/>
+ <bpmn2:sequenceFlow id="vnfFoundNo" name="No" sourceRef="vnfFoundCheck" targetRef="EndEvent_3" />
<bpmn2:exclusiveGateway id="ExclusiveGateway_2">
<bpmn2:incoming>resourceVersionProvided</bpmn2:incoming>
<bpmn2:incoming>vnfFoundYes</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="deleteVnf"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="deleteVnf" />
<bpmn2:endEvent id="EndEvent_1">
<bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_39"/>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_39" />
</bpmn2:endEvent>
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericDeleteVnf">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_78" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="74.0" y="216.0"/>
+ <dc:Bounds x="74" y="216" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="92.0" y="257.0"/>
+ <dc:Bounds x="92" y="257" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_310" bpmnElement="initialization">
- <dc:Bounds height="80.0" width="100.0" x="192.0" y="194.0"/>
+ <dc:Bounds x="192" y="194" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_78" targetElement="_BPMNShape_ScriptTask_310">
- <di:waypoint xsi:type="dc:Point" x="110.0" y="234.0"/>
- <di:waypoint xsi:type="dc:Point" x="192.0" y="234.0"/>
+ <di:waypoint xsi:type="dc:Point" x="110" y="234" />
+ <di:waypoint xsi:type="dc:Point" x="192" y="234" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_239" bpmnElement="resourceVersionCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="326.0" y="208.0"/>
+ <dc:Bounds x="326" y="208" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="169.0" x="360.0" y="238.0"/>
+ <dc:Bounds x="360" y="238" width="169" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_310" targetElement="_BPMNShape_ExclusiveGateway_239">
- <di:waypoint xsi:type="dc:Point" x="168.0" y="466.0"/>
- <di:waypoint xsi:type="dc:Point" x="220.0" y="466.0"/>
+ <di:waypoint xsi:type="dc:Point" x="236" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="288" y="476" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="191.0" y="466.0"/>
+ <dc:Bounds x="262" y="476" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_320" bpmnElement="queryForResourceVersion">
- <dc:Bounds height="80.0" width="100.0" x="408.0" y="96.0"/>
+ <dc:Bounds x="408" y="96" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_321" bpmnElement="deleteVnf">
- <dc:Bounds height="80.0" width="100.0" x="658.0" y="194.0"/>
+ <dc:Bounds x="658" y="194" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_240" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="562.0" y="208.0"/>
+ <dc:Bounds x="562" y="208" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="587.0" y="263.0"/>
+ <dc:Bounds x="587" y="263" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_322" bpmnElement="toggleSuccess">
- <dc:Bounds height="80.0" width="100.0" x="802.0" y="194.0"/>
+ <dc:Bounds x="802" y="194" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_240" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1001.0" y="216.0"/>
+ <dc:Bounds x="1001" y="216" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1019.0" y="257.0"/>
+ <dc:Bounds x="1019" y="257" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="resourceVariableNotProvided" sourceElement="_BPMNShape_ExclusiveGateway_239" targetElement="_BPMNShape_ScriptTask_320">
- <di:waypoint xsi:type="dc:Point" x="351.0" y="208.0"/>
- <di:waypoint xsi:type="dc:Point" x="351.0" y="136.0"/>
- <di:waypoint xsi:type="dc:Point" x="408.0" y="136.0"/>
+ <di:waypoint xsi:type="dc:Point" x="351" y="208" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="136" />
+ <di:waypoint xsi:type="dc:Point" x="408" y="136" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="354.0" y="165.0"/>
+ <dc:Bounds x="354" y="165" width="22" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="resourceVersionProvided" sourceElement="_BPMNShape_ExclusiveGateway_239" targetElement="_BPMNShape_ExclusiveGateway_240">
- <di:waypoint xsi:type="dc:Point" x="351.0" y="258.0"/>
- <di:waypoint xsi:type="dc:Point" x="351.0" y="312.0"/>
- <di:waypoint xsi:type="dc:Point" x="459.0" y="312.0"/>
- <di:waypoint xsi:type="dc:Point" x="587.0" y="312.0"/>
- <di:waypoint xsi:type="dc:Point" x="587.0" y="258.0"/>
+ <di:waypoint xsi:type="dc:Point" x="351" y="258" />
+ <di:waypoint xsi:type="dc:Point" x="351" y="312" />
+ <di:waypoint xsi:type="dc:Point" x="459" y="312" />
+ <di:waypoint xsi:type="dc:Point" x="587" y="312" />
+ <di:waypoint xsi:type="dc:Point" x="587" y="258" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="351.0" y="276.0"/>
+ <dc:Bounds x="351" y="276" width="29" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_320" targetElement="_BPMNShape_ExclusiveGateway_242">
- <di:waypoint xsi:type="dc:Point" x="508.0" y="136.0"/>
- <di:waypoint xsi:type="dc:Point" x="562.0" y="135.0"/>
+ <di:waypoint xsi:type="dc:Point" x="508" y="136" />
+ <di:waypoint xsi:type="dc:Point" x="562" y="135" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="558.0" y="135.0"/>
+ <dc:Bounds x="558" y="135" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_240" targetElement="_BPMNShape_ScriptTask_321">
- <di:waypoint xsi:type="dc:Point" x="612.0" y="233.0"/>
- <di:waypoint xsi:type="dc:Point" x="658.0" y="234.0"/>
+ <di:waypoint xsi:type="dc:Point" x="612" y="233" />
+ <di:waypoint xsi:type="dc:Point" x="658" y="234" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="633.0" y="234.0"/>
+ <dc:Bounds x="633" y="234" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_321" targetElement="_BPMNShape_ScriptTask_322">
- <di:waypoint xsi:type="dc:Point" x="758.0" y="234.0"/>
- <di:waypoint xsi:type="dc:Point" x="802.0" y="234.0"/>
+ <di:waypoint xsi:type="dc:Point" x="758" y="234" />
+ <di:waypoint xsi:type="dc:Point" x="802" y="234" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="777.0" y="234.0"/>
+ <dc:Bounds x="777" y="234" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_322" targetElement="_BPMNShape_EndEvent_240">
- <di:waypoint xsi:type="dc:Point" x="902.0" y="234.0"/>
- <di:waypoint xsi:type="dc:Point" x="1001.0" y="234.0"/>
+ <di:waypoint xsi:type="dc:Point" x="902" y="234" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="234" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="949.0" y="234.0"/>
+ <dc:Bounds x="949" y="234" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_310" targetElement="_BPMNShape_ExclusiveGateway_239">
- <di:waypoint xsi:type="dc:Point" x="292.0" y="234.0"/>
- <di:waypoint xsi:type="dc:Point" x="326.0" y="233.0"/>
+ <di:waypoint xsi:type="dc:Point" x="292" y="234" />
+ <di:waypoint xsi:type="dc:Point" x="326" y="233" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="311.0" y="233.0"/>
+ <dc:Bounds x="311" y="233" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_36" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="157.0" width="304.0" x="117.0" y="387.0"/>
+ <dc:Bounds x="185" y="397" width="304" height="157" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_82" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="132.0" y="448.0"/>
+ <dc:Bounds x="200" y="458" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="150.0" y="489.0"/>
+ <dc:Bounds x="218" y="499" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_242" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="372.0" y="448.0"/>
+ <dc:Bounds x="440" y="458" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="390.0" y="489.0"/>
+ <dc:Bounds x="458" y="499" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_323" bpmnElement="processBPMNError">
- <dc:Bounds height="80.0" width="100.0" x="220.0" y="426.0"/>
+ <dc:Bounds x="288" y="436" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_323" targetElement="_BPMNShape_EndEvent_242">
- <di:waypoint xsi:type="dc:Point" x="320.0" y="466.0"/>
- <di:waypoint xsi:type="dc:Point" x="372.0" y="466.0"/>
+ <di:waypoint xsi:type="dc:Point" x="388" y="476" />
+ <di:waypoint xsi:type="dc:Point" x="440" y="476" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="343.0" y="466.0"/>
+ <dc:Bounds x="414" y="476" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_242" bpmnElement="vnfFoundCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="562.0" y="110.0"/>
+ <dc:Bounds x="562" y="110" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="72.0" x="552.0" y="90.0"/>
+ <dc:Bounds x="552" y="90" width="72" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_243" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="708.0" y="118.0"/>
+ <dc:Bounds x="708" y="118" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="726.0" y="159.0"/>
+ <dc:Bounds x="726" y="159" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="vnfFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_242" targetElement="_BPMNShape_ExclusiveGateway_240">
- <di:waypoint xsi:type="dc:Point" x="587.0" y="160.0"/>
- <di:waypoint xsi:type="dc:Point" x="587.0" y="208.0"/>
+ <di:waypoint xsi:type="dc:Point" x="587" y="160" />
+ <di:waypoint xsi:type="dc:Point" x="587" y="208" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="587.0" y="165.0"/>
+ <dc:Bounds x="587" y="165" width="29" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="vnfFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_242" targetElement="_BPMNShape_EndEvent_243">
- <di:waypoint xsi:type="dc:Point" x="612.0" y="135.0"/>
- <di:waypoint xsi:type="dc:Point" x="708.0" y="136.0"/>
+ <di:waypoint xsi:type="dc:Point" x="612" y="135" />
+ <di:waypoint xsi:type="dc:Point" x="708" y="136" />
<bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="637.0" y="135.0"/>
+ <dc:Bounds x="637" y="135" width="22" height="22" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
index cbaec1a29c..af615e379d 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
@@ -1,321 +1,321 @@
-<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_D5VzAHElEeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="GenericGetService" name="GenericGetService" isExecutable="true">
- <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl"/>
- <bpmn2:exclusiveGateway id="getUrl" name="Get Url?" default="getUrlNo">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
- <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrl" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2"/>
- <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_D5VzAHElEeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="GenericGetService" name="GenericGetService" isExecutable="true">
+ <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericGetService getService = new GenericGetService()
+getService.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl"/>
+ <bpmn2:exclusiveGateway id="getUrl" name="Get Url?" default="getUrlNo">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
+ <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrl" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2"/>
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.setSuccessIndicator(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
- <bpmn2:scriptTask id="getServiceInstance" name="GET&#xD;&#xA;Service Instance" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.getServiceObject(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>getUrlNo</bpmn2:incoming>
- <bpmn2:incoming>foundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance"/>
- <bpmn2:scriptTask id="obtainServiceUrlById" name="Obtain Service URL Using&#xD;&#xA;Id" scriptFormat="groovy">
- <bpmn2:incoming>obtainById</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3"/>
- <bpmn2:scriptTask id="obtainServiceUrlByName" name="Obtain Service Url Using&#xD;&#xA;Name" scriptFormat="groovy">
- <bpmn2:incoming>obtainByName</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3"/>
- <bpmn2:exclusiveGateway id="obtain" name="Obtain By?" default="obtainById">
- <bpmn2:incoming>getUrlYes</bpmn2:incoming>
- <bpmn2:outgoing>obtainById</bpmn2:outgoing>
- <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById"/>
- <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>foundYes</bpmn2:outgoing>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29"/>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck"/>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26"/>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>
- </bpmn2:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="108.0" y="264.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="126.0" y="305.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
- <dc:Bounds height="80.0" width="100.0" x="228.0" y="242.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
- <di:waypoint xsi:type="dc:Point" x="144.0" y="282.0"/>
- <di:waypoint xsi:type="dc:Point" x="228.0" y="282.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="177.0" y="282.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="372.0" y="256.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="70.0" x="408.0" y="286.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
- <di:waypoint xsi:type="dc:Point" x="328.0" y="282.0"/>
- <di:waypoint xsi:type="dc:Point" x="372.0" y="281.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="350.0" y="281.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
- <dc:Bounds height="80.0" width="100.0" x="528.0" y="197.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="738.0" y="256.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="763.0" y="311.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
- <dc:Bounds height="80.0" width="100.0" x="820.0" y="242.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
- <di:waypoint xsi:type="dc:Point" x="397.0" y="256.0"/>
- <di:waypoint xsi:type="dc:Point" x="397.0" y="170.0"/>
- <di:waypoint xsi:type="dc:Point" x="446.0" y="170.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="397.0" y="213.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628.0" y="237.0"/>
- <di:waypoint xsi:type="dc:Point" x="671.0" y="237.0"/>
- <di:waypoint xsi:type="dc:Point" x="671.0" y="195.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="668.0" y="221.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
- <di:waypoint xsi:type="dc:Point" x="788.0" y="281.0"/>
- <di:waypoint xsi:type="dc:Point" x="820.0" y="282.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="798.0" y="281.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="397.0" y="306.0"/>
- <di:waypoint xsi:type="dc:Point" x="397.0" y="370.0"/>
- <di:waypoint xsi:type="dc:Point" x="763.0" y="370.0"/>
- <di:waypoint xsi:type="dc:Point" x="763.0" y="306.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="400.0" y="324.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
- <dc:Bounds height="80.0" width="100.0" x="960.0" y="242.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
- <di:waypoint xsi:type="dc:Point" x="920.0" y="282.0"/>
- <di:waypoint xsi:type="dc:Point" x="960.0" y="282.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="937.0" y="282.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1133.0" y="264.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1151.0" y="305.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
- <di:waypoint xsi:type="dc:Point" x="1060.0" y="282.0"/>
- <di:waypoint xsi:type="dc:Point" x="1133.0" y="282.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1100.0" y="282.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="169.0" width="325.0" x="152.0" y="468.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="176.0" y="535.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="194.0" y="576.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="416.0" y="535.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="434.0" y="576.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
- <dc:Bounds height="80.0" width="100.0" x="265.0" y="513.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="212.0" y="553.0"/>
- <di:waypoint xsi:type="dc:Point" x="265.0" y="553.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="233.0" y="553.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
- <di:waypoint xsi:type="dc:Point" x="365.0" y="553.0"/>
- <di:waypoint xsi:type="dc:Point" x="416.0" y="553.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="385.0" y="553.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
- <dc:Bounds height="80.0" width="100.0" x="528.0" y="59.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="446.0" y="145.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="71.0" x="496.0" y="162.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="646.0" y="145.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="671.0" y="200.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
- <di:waypoint xsi:type="dc:Point" x="471.0" y="195.0"/>
- <di:waypoint xsi:type="dc:Point" x="471.0" y="236.0"/>
- <di:waypoint xsi:type="dc:Point" x="528.0" y="237.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="16.0" x="476.0" y="207.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
- <di:waypoint xsi:type="dc:Point" x="471.0" y="145.0"/>
- <di:waypoint xsi:type="dc:Point" x="471.0" y="99.0"/>
- <di:waypoint xsi:type="dc:Point" x="528.0" y="99.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="40.0" x="471.0" y="115.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628.0" y="99.0"/>
- <di:waypoint xsi:type="dc:Point" x="671.0" y="99.0"/>
- <di:waypoint xsi:type="dc:Point" x="671.0" y="145.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="665.0" y="99.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="738.0" y="145.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="59.0" x="735.0" y="125.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
- <di:waypoint xsi:type="dc:Point" x="696.0" y="170.0"/>
- <di:waypoint xsi:type="dc:Point" x="738.0" y="170.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="704.0" y="170.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="763.0" y="195.0"/>
- <di:waypoint xsi:type="dc:Point" x="763.0" y="256.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="762.0" y="205.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="788.0" y="170.0"/>
- <di:waypoint xsi:type="dc:Point" x="877.0" y="171.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="798.0" y="170.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="877.0" y="153.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="895.0" y="194.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2"/>
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericGetService getService = new GenericGetService()
+getService.setSuccessIndicator(execution, true)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
+ <bpmn2:scriptTask id="getServiceInstance" name="GET&#xD;&#xA;Service Instance" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericGetService getService = new GenericGetService()
+getService.getServiceObject(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
+ <bpmn2:incoming>getUrlNo</bpmn2:incoming>
+ <bpmn2:incoming>foundYes</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance"/>
+ <bpmn2:scriptTask id="obtainServiceUrlById" name="Obtain Service URL Using&#xD;&#xA;Id" scriptFormat="groovy">
+ <bpmn2:incoming>obtainById</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericGetService getService = new GenericGetService()
+getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:scriptTask id="obtainServiceUrlByName" name="Obtain Service Url Using&#xD;&#xA;Name" scriptFormat="groovy">
+ <bpmn2:incoming>obtainByName</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+GenericGetService getService = new GenericGetService()
+getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:exclusiveGateway id="obtain" name="Obtain By?" default="obtainById">
+ <bpmn2:incoming>getUrlYes</bpmn2:incoming>
+ <bpmn2:outgoing>obtainById</bpmn2:outgoing>
+ <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById"/>
+ <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>foundYes</bpmn2:outgoing>
+ <bpmn2:outgoing>notFound</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3"/>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>notFound</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29"/>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26"/>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="108.0" y="264.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="126.0" y="305.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
+ <dc:Bounds height="80.0" width="100.0" x="228.0" y="242.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
+ <di:waypoint xsi:type="dc:Point" x="144.0" y="282.0"/>
+ <di:waypoint xsi:type="dc:Point" x="228.0" y="282.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="177.0" y="282.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="372.0" y="256.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="70.0" x="408.0" y="286.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
+ <di:waypoint xsi:type="dc:Point" x="328.0" y="282.0"/>
+ <di:waypoint xsi:type="dc:Point" x="372.0" y="281.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="350.0" y="281.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
+ <dc:Bounds height="80.0" width="100.0" x="528.0" y="197.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="738.0" y="256.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="763.0" y="311.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
+ <dc:Bounds height="80.0" width="100.0" x="820.0" y="242.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="170.0"/>
+ <di:waypoint xsi:type="dc:Point" x="446.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="397.0" y="213.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
+ <di:waypoint xsi:type="dc:Point" x="628.0" y="237.0"/>
+ <di:waypoint xsi:type="dc:Point" x="671.0" y="237.0"/>
+ <di:waypoint xsi:type="dc:Point" x="671.0" y="195.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="668.0" y="221.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
+ <di:waypoint xsi:type="dc:Point" x="788.0" y="281.0"/>
+ <di:waypoint xsi:type="dc:Point" x="820.0" y="282.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="798.0" y="281.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="306.0"/>
+ <di:waypoint xsi:type="dc:Point" x="397.0" y="370.0"/>
+ <di:waypoint xsi:type="dc:Point" x="763.0" y="370.0"/>
+ <di:waypoint xsi:type="dc:Point" x="763.0" y="306.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="400.0" y="324.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
+ <dc:Bounds height="80.0" width="100.0" x="960.0" y="242.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
+ <di:waypoint xsi:type="dc:Point" x="920.0" y="282.0"/>
+ <di:waypoint xsi:type="dc:Point" x="960.0" y="282.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="937.0" y="282.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1133.0" y="264.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1151.0" y="305.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
+ <di:waypoint xsi:type="dc:Point" x="1060.0" y="282.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1133.0" y="282.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1100.0" y="282.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
+ <dc:Bounds height="169.0" width="325.0" x="152.0" y="468.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="176.0" y="535.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="194.0" y="576.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="416.0" y="535.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="434.0" y="576.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
+ <dc:Bounds height="80.0" width="100.0" x="265.0" y="513.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
+ <di:waypoint xsi:type="dc:Point" x="212.0" y="553.0"/>
+ <di:waypoint xsi:type="dc:Point" x="265.0" y="553.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="233.0" y="553.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
+ <di:waypoint xsi:type="dc:Point" x="365.0" y="553.0"/>
+ <di:waypoint xsi:type="dc:Point" x="416.0" y="553.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="385.0" y="553.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
+ <dc:Bounds height="80.0" width="100.0" x="528.0" y="59.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="446.0" y="145.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="71.0" x="496.0" y="162.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="646.0" y="145.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="671.0" y="200.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
+ <di:waypoint xsi:type="dc:Point" x="471.0" y="195.0"/>
+ <di:waypoint xsi:type="dc:Point" x="471.0" y="236.0"/>
+ <di:waypoint xsi:type="dc:Point" x="528.0" y="237.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="16.0" x="476.0" y="207.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
+ <di:waypoint xsi:type="dc:Point" x="471.0" y="145.0"/>
+ <di:waypoint xsi:type="dc:Point" x="471.0" y="99.0"/>
+ <di:waypoint xsi:type="dc:Point" x="528.0" y="99.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="40.0" x="471.0" y="115.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
+ <di:waypoint xsi:type="dc:Point" x="628.0" y="99.0"/>
+ <di:waypoint xsi:type="dc:Point" x="671.0" y="99.0"/>
+ <di:waypoint xsi:type="dc:Point" x="671.0" y="145.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="665.0" y="99.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="738.0" y="145.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="59.0" x="735.0" y="125.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
+ <di:waypoint xsi:type="dc:Point" x="696.0" y="170.0"/>
+ <di:waypoint xsi:type="dc:Point" x="738.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="704.0" y="170.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
+ <di:waypoint xsi:type="dc:Point" x="763.0" y="195.0"/>
+ <di:waypoint xsi:type="dc:Point" x="763.0" y="256.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="762.0" y="205.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
+ <di:waypoint xsi:type="dc:Point" x="788.0" y="170.0"/>
+ <di:waypoint xsi:type="dc:Point" x="877.0" y="171.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="798.0" y="170.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="877.0" y="153.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="895.0" y="194.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn
index 4fe0321820..3300d86084 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_eb5eEHR6EeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_eb5eEHR6EeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
<bpmn2:process id="GenericGetVnf" name="GenericGetVnf" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -7,7 +7,7 @@
<bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericGetVnf genericGetVnf = new GenericGetVnf ()
genericGetVnf.preProcessRequest(execution)
]]></bpmn2:script>
@@ -26,7 +26,7 @@ genericGetVnf.preProcessRequest(execution)
<bpmn2:scriptTask id="getVnfByName" name="GET Vnf By Name" scriptFormat="groovy">
<bpmn2:incoming>noVnfId</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericGetVnf genericGetVnf = new GenericGetVnf()
genericGetVnf.getVnfByName(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -40,7 +40,7 @@ genericGetVnf.getVnfByName(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="getGenericVnf" name="GET Vnf By&#xD;&#xA;Id" scriptFormat="groovy">
<bpmn2:incoming>haveVnfId</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericGetVnf genericGetVnf = new GenericGetVnf()
genericGetVnf.getVnfById(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -53,7 +53,7 @@ genericGetVnf.getVnfById(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="proccessBPMNError" name="Process Error" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ExceptionUtil ex = new ExceptionUtil()
ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
@@ -68,7 +68,7 @@ ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericGetVnf genericGetVnf = new GenericGetVnf()
genericGetVnf.setSuccessIndicator(execution, true)
]]></bpmn2:script>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericNotificationService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericNotificationService.bpmn
new file mode 100644
index 0000000000..23351eb1b1
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericNotificationService.bpmn
@@ -0,0 +1,48 @@
+<?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.6.0">
+ <bpmn:process id="GenericNotificationService" name="GenericNotificationService" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_0zigcpk</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_0u9cxx7">
+ <bpmn:incoming>SequenceFlow_1122k97</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0zigcpk" sourceRef="StartEvent_1" targetRef="Task_1tj48xt" />
+ <bpmn:scriptTask id="Task_1tj48xt" name="Pre Processs" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0zigcpk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1122k97</bpmn:outgoing>
+ <bpmn:script><![CDATA[println "INSIDE --> GenericNotificationService Process"]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1122k97" sourceRef="Task_1tj48xt" targetRef="EndEvent_0u9cxx7" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericNotificationService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="173" y="102" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0u9cxx7_di" bpmnElement="EndEvent_0u9cxx7">
+ <dc:Bounds x="483" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="138" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zigcpk_di" bpmnElement="SequenceFlow_0zigcpk">
+ <di:waypoint xsi:type="dc:Point" x="209" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="300" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="255" y="105" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dhe9cw_di" bpmnElement="Task_1tj48xt">
+ <dc:Bounds x="300" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1122k97_di" bpmnElement="SequenceFlow_1122k97">
+ <di:waypoint xsi:type="dc:Point" x="400" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="483" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="442" y="105" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericPutService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericPutService.bpmn
new file mode 100644
index 0000000000..ca03a9560c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericPutService.bpmn
@@ -0,0 +1,201 @@
+<?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="_FatVcHn0EeaH6vX1RRdc_w" 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="GenericPutService" name="GenericPutService" 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:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+def serviceInstance= new GenericPutService()
+serviceInstance.setSuccessIndicator(execution, true)
+
+execution.setVariable("WorkflowResponse", " ") //for junits]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
+ <bpmn2:scriptTask id="putServiceInstance" name="Put Service Instance" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+def serviceInstance= new GenericPutService()
+serviceInstance.putServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="putServiceInstance" targetRef="toggleSuccess" />
+ <bpmn2:scriptTask id="Initialization" name="Initialization" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+def serviceInstance= new GenericPutService()
+serviceInstance.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="Initialization" targetRef="putServiceInstance" />
+ <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="StartEvent_2" targetRef="processError" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="processError" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="processError" targetRef="EndEvent_2" />
+ </bpmn2:subProcess>
+ <bpmn2:subProcess id="javaExceptionSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="catchJavaExcep">
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="catchJavaExcep" targetRef="processJavaError" />
+ <bpmn2:scriptTask id="processJavaError" name="Process Java Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="processJavaError" targetRef="EndEvent_3" />
+ </bpmn2:subProcess>
+ </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="GenericPutService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="182" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="200" y="221" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="Initialization">
+ <dc:Bounds x="324" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_302">
+ <di:waypoint xsi:type="dc:Point" x="218" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="324" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="250" y="198" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_304" bpmnElement="putServiceInstance">
+ <dc:Bounds x="528" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_ScriptTask_304">
+ <di:waypoint xsi:type="dc:Point" x="424" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="528" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="446" y="198" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="toggleSuccess">
+ <dc:Bounds x="732" y="158" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_304" targetElement="_BPMNShape_ScriptTask_305">
+ <di:waypoint xsi:type="dc:Point" x="628" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="650" y="198" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_230" bpmnElement="EndEvent_1">
+ <dc:Bounds x="908" y="180" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="926" y="221" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_305" targetElement="_BPMNShape_EndEvent_230">
+ <di:waypoint xsi:type="dc:Point" x="832" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="908" y="198" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="854" y="198" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="324" y="312" width="418" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_72" bpmnElement="StartEvent_2">
+ <dc:Bounds x="357" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="375" y="411" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="processError">
+ <dc:Bounds x="466" y="348" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_StartEvent_72" targetElement="_BPMNShape_ScriptTask_306">
+ <di:waypoint xsi:type="dc:Point" x="393" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="466" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="415" y="388" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_231" bpmnElement="EndEvent_2">
+ <dc:Bounds x="615" y="370" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="633" y="411" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_306" targetElement="_BPMNShape_EndEvent_231">
+ <di:waypoint xsi:type="dc:Point" x="566" y="388" />
+ <di:waypoint xsi:type="dc:Point" x="615" y="388" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="588" y="388" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="javaExceptionSubProcess" isExpanded="true">
+ <dc:Bounds x="323" y="486" width="419" height="150" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_73" bpmnElement="catchJavaExcep">
+ <dc:Bounds x="357" y="538" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="375" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="processJavaError">
+ <dc:Bounds x="465" y="516" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_73" targetElement="_BPMNShape_ScriptTask_308">
+ <di:waypoint xsi:type="dc:Point" x="393" y="556" />
+ <di:waypoint xsi:type="dc:Point" x="465" y="556" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="415" y="556" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_232" bpmnElement="EndEvent_3">
+ <dc:Bounds x="615" y="538" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="633" y="579" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_EndEvent_232">
+ <di:waypoint xsi:type="dc:Point" x="565" y="556" />
+ <di:waypoint xsi:type="dc:Point" x="615" y="556" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="587" y="556" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn
index bcda933fa5..f155783e3a 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_ZkRI4HntEea26OhQB97uCQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_ZkRI4HntEea26OhQB97uCQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
<bpmn2:process id="GenericPutVnf" name="GenericPutVnf" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -7,7 +7,7 @@
<bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericPutVnf genericPutVnf = new GenericPutVnf()
genericPutVnf.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -25,7 +25,7 @@ genericPutVnf.preProcessRequest(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
ExceptionUtil ex = new ExceptionUtil()
ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
@@ -36,7 +36,7 @@ ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="putVnf" name="PUT Vnf" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericPutVnf genericPutVnf = new GenericPutVnf()
genericPutVnf.putVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
@@ -44,7 +44,7 @@ genericPutVnf.putVnf(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
GenericPutVnf genericPutVnf = new GenericPutVnf()
genericPutVnf.setSuccessIndicator(execution, true)
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/PrepareUpdateAAIVfModule.bpmn
index bd16398e1a..956192c5af 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/PrepareUpdateAAIVfModule.bpmn
@@ -1,308 +1,308 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="PrepareUpdateAAIVfModule" name="PrepareUpdateAAIVfModule" isExecutable="true">
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="PrepareUpdateAAIVfModule" name="PrepareUpdateAAIVfModule" isExecutable="true">
<bpmn2:documentation><![CDATA[This flow expects its incoming request to be in the variable 'PrepareUpdateAAIVfModuleRequest'. This flow has 2 outputs: The heat stack ID is placed in the variable 'PUAAIVfMod_heatStackId'.
-and the updated VF Module (type=VfModule) is placed in the variable 'PUAAIVfMod_outVfModule'.]]></bpmn2:documentation>
- <bpmn2:scriptTask id="QueryAAIForGenericVnf" name="Query AAI for Generic Vnf" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+and the updated VF Module (type=VfModule) is placed in the variable 'PUAAIVfMod_outVfModule'.]]></bpmn2:documentation>
+ <bpmn2:scriptTask id="QueryAAIForGenericVnf" name="Query AAI for Generic Vnf" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def puvm = new PrepareUpdateAAIVfModule()
-puvm.getGenericVnf(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVnf" targetRef="ExclusiveGateway_3"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_1">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_getVnfResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;Generic Vnf not found" sourceRef="ExclusiveGateway_3" targetRef="VnfNotFound"/>
- <bpmn2:scriptTask id="ScriptTask_1" name="Validate VF Module" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+puvm.getGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVnf" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_getVnfResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;Generic Vnf not found" sourceRef="ExclusiveGateway_3" targetRef="VnfNotFound"/>
+ <bpmn2:scriptTask id="ScriptTask_1" name="Validate VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def puvm= new PrepareUpdateAAIVfModule()
-puvm.validateVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:scriptTask id="VnfNotFound" name="Handle Generic Vnf Not found" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+puvm.validateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="VnfNotFound" name="Handle Generic Vnf Not found" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def puvm= new PrepareUpdateAAIVfModule()
-puvm.handleVnfNotFound(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="VnfNotFound" targetRef="EndEvent_7"/>
- <bpmn2:endEvent id="EndEvent_7">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_2"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2" default="SequenceFlow_12">
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:scriptTask id="ScriptTask_2" name="Handle VF Module Validation Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+puvm.handleVnfNotFound(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="VnfNotFound" targetRef="EndEvent_7"/>
+ <bpmn2:endEvent id="EndEvent_7">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_2"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" default="SequenceFlow_12">
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_2" name="Handle VF Module Validation Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def puvm= new PrepareUpdateAAIVfModule()
-puvm.handleVfModuleValidationError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="VF Module invalid or&#xD;&#xA;not found" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_2"/>
- <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_1"/>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_69" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1" xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+puvm.handleVfModuleValidationError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="VF Module invalid or&#xD;&#xA;not found" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_1"/>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_69" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" xmlns:ns="http://org.openecomp/mso/workflow/schema/v1">
<ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
- </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def puvm= new PrepareUpdateAAIVfModule()
-puvm.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>
- <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+puvm.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>
+ <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def puvm= new PrepareUpdateAAIVfModule()
-puvm.updateVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>
- <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ExclusiveGateway_2" targetRef="UpdateVfModule">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_vfModuleOK')}</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="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+puvm.updateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ExclusiveGateway_2" targetRef="UpdateVfModule">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_vfModuleOK')}</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="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def puvm= new PrepareUpdateAAIVfModule()
-puvm.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForGenericVnf"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="PrepareUpdateAAIVfModule">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="37.0" y="212.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="38.0" y="253.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
- <dc:Bounds height="80.0" width="100.0" x="181.0" y="190.0"/>
- </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="73.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="181.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="95.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">
- <dc:Bounds height="80.0" width="100.0" x="81.0" y="540.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="425.0" y="560.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="418.0" y="601.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="250.0" y="554.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="275.0" y="609.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
- <di:waypoint xsi:type="dc:Point" x="300.0" y="579.0"/>
- <di:waypoint xsi:type="dc:Point" x="402.0" y="579.0"/>
- <di:waypoint xsi:type="dc:Point" x="402.0" y="578.0"/>
- <di:waypoint xsi:type="dc:Point" x="425.0" y="578.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="338.0" y="579.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="257.0" y="348.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="275.0" y="389.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="499.0" y="206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="524.0" y="261.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_162">
- <di:waypoint xsi:type="dc:Point" x="549.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="601.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="601.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="661.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="564.0" y="231.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="VnfNotFound">
- <dc:Bounds height="80.0" width="100.0" x="475.0" y="72.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
- <di:waypoint xsi:type="dc:Point" x="524.0" y="206.0"/>
- <di:waypoint xsi:type="dc:Point" x="524.0" y="173.0"/>
- <di:waypoint xsi:type="dc:Point" x="525.0" y="173.0"/>
- <di:waypoint xsi:type="dc:Point" x="525.0" y="152.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="38.0" width="135.0" x="526.0" y="160.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
- <dc:Bounds height="36.0" width="36.0" x="507.0" y="5.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="525.0" y="46.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
- <di:waypoint xsi:type="dc:Point" x="525.0" y="72.0"/>
- <di:waypoint xsi:type="dc:Point" x="525.0" y="41.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="522.0" y="61.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVnf">
- <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
- </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="281.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="301.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
- <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="499.0" y="231.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="449.0" y="231.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">
- <dc:Bounds height="80.0" width="100.0" x="225.0" y="408.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
- <di:waypoint xsi:type="dc:Point" x="275.0" y="408.0"/>
- <di:waypoint xsi:type="dc:Point" x="275.0" y="384.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="300.0" y="740.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
- <di:waypoint xsi:type="dc:Point" x="181.0" y="580.0"/>
- <di:waypoint xsi:type="dc:Point" x="206.0" y="580.0"/>
- <di:waypoint xsi:type="dc:Point" x="206.0" y="579.0"/>
- <di:waypoint xsi:type="dc:Point" x="250.0" y="579.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="174.0" y="711.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
- <di:waypoint xsi:type="dc:Point" x="275.0" y="554.0"/>
- <di:waypoint xsi:type="dc:Point" x="275.0" y="520.0"/>
- <di:waypoint xsi:type="dc:Point" x="276.0" y="520.0"/>
- <di:waypoint xsi:type="dc:Point" x="276.0" y="488.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="157.0" x="280.0" y="504.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_162" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="661.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_87" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="829.0" y="204.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="854.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_162" targetElement="_BPMNShape_ExclusiveGateway_87">
- <di:waypoint xsi:type="dc:Point" x="761.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="795.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="795.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="829.0" y="229.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="792.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_163" bpmnElement="ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="805.0" y="72.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="837.0" y="5.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="855.0" y="46.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ExclusiveGateway_87" targetElement="_BPMNShape_ScriptTask_163">
- <di:waypoint xsi:type="dc:Point" x="854.0" y="204.0"/>
- <di:waypoint xsi:type="dc:Point" x="854.0" y="178.0"/>
- <di:waypoint xsi:type="dc:Point" x="855.0" y="178.0"/>
- <di:waypoint xsi:type="dc:Point" x="855.0" y="152.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="38.0" width="133.0" x="864.0" y="160.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_163" targetElement="_BPMNShape_EndEvent_161">
- <di:waypoint xsi:type="dc:Point" x="855.0" y="72.0"/>
- <di:waypoint xsi:type="dc:Point" x="855.0" y="41.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="852.0" y="54.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_87" targetElement="_BPMNShape_Task_2">
- <di:waypoint xsi:type="dc:Point" x="854.0" y="254.0"/>
- <di:waypoint xsi:type="dc:Point" x="854.0" y="302.0"/>
- <di:waypoint xsi:type="dc:Point" x="131.0" y="302.0"/>
- <di:waypoint xsi:type="dc:Point" x="131.0" y="540.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="399.0" y="302.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+puvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForGenericVnf"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="PrepareUpdateAAIVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="37.0" y="212.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="38.0" y="253.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
+ <dc:Bounds height="80.0" width="100.0" x="181.0" y="190.0"/>
+ </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="73.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="181.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="95.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="81.0" y="540.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="425.0" y="560.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="418.0" y="601.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="250.0" y="554.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="275.0" y="609.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
+ <di:waypoint xsi:type="dc:Point" x="300.0" y="579.0"/>
+ <di:waypoint xsi:type="dc:Point" x="402.0" y="579.0"/>
+ <di:waypoint xsi:type="dc:Point" x="402.0" y="578.0"/>
+ <di:waypoint xsi:type="dc:Point" x="425.0" y="578.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="338.0" y="579.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="257.0" y="348.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="275.0" y="389.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="499.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="524.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_162">
+ <di:waypoint xsi:type="dc:Point" x="549.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="601.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="601.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="661.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="564.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="VnfNotFound">
+ <dc:Bounds height="80.0" width="100.0" x="475.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
+ <di:waypoint xsi:type="dc:Point" x="524.0" y="206.0"/>
+ <di:waypoint xsi:type="dc:Point" x="524.0" y="173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="152.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="135.0" x="526.0" y="160.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
+ <dc:Bounds height="36.0" width="36.0" x="507.0" y="5.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="525.0" y="46.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="72.0"/>
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="41.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="522.0" y="61.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVnf">
+ <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
+ </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="281.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="301.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
+ <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="499.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="449.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">
+ <dc:Bounds height="80.0" width="100.0" x="225.0" y="408.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
+ <di:waypoint xsi:type="dc:Point" x="275.0" y="408.0"/>
+ <di:waypoint xsi:type="dc:Point" x="275.0" y="384.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="300.0" y="740.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="181.0" y="580.0"/>
+ <di:waypoint xsi:type="dc:Point" x="206.0" y="580.0"/>
+ <di:waypoint xsi:type="dc:Point" x="206.0" y="579.0"/>
+ <di:waypoint xsi:type="dc:Point" x="250.0" y="579.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="174.0" y="711.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
+ <di:waypoint xsi:type="dc:Point" x="275.0" y="554.0"/>
+ <di:waypoint xsi:type="dc:Point" x="275.0" y="520.0"/>
+ <di:waypoint xsi:type="dc:Point" x="276.0" y="520.0"/>
+ <di:waypoint xsi:type="dc:Point" x="276.0" y="488.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="157.0" x="280.0" y="504.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_162" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="661.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_87" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="829.0" y="204.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="854.0" y="259.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_162" targetElement="_BPMNShape_ExclusiveGateway_87">
+ <di:waypoint xsi:type="dc:Point" x="761.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="795.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="795.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="829.0" y="229.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="792.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_163" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="805.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="837.0" y="5.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="855.0" y="46.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ExclusiveGateway_87" targetElement="_BPMNShape_ScriptTask_163">
+ <di:waypoint xsi:type="dc:Point" x="854.0" y="204.0"/>
+ <di:waypoint xsi:type="dc:Point" x="854.0" y="178.0"/>
+ <di:waypoint xsi:type="dc:Point" x="855.0" y="178.0"/>
+ <di:waypoint xsi:type="dc:Point" x="855.0" y="152.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="133.0" x="864.0" y="160.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_163" targetElement="_BPMNShape_EndEvent_161">
+ <di:waypoint xsi:type="dc:Point" x="855.0" y="72.0"/>
+ <di:waypoint xsi:type="dc:Point" x="855.0" y="41.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="852.0" y="54.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_87" targetElement="_BPMNShape_Task_2">
+ <di:waypoint xsi:type="dc:Point" x="854.0" y="254.0"/>
+ <di:waypoint xsi:type="dc:Point" x="854.0" y="302.0"/>
+ <di:waypoint xsi:type="dc:Point" x="131.0" y="302.0"/>
+ <di:waypoint xsi:type="dc:Point" x="131.0" y="540.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="399.0" y="302.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterRestV1.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterRestV1.bpmn
new file mode 100644
index 0000000000..c52612bb95
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterRestV1.bpmn
@@ -0,0 +1,470 @@
+<?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="_GraPIIyxEeWmdMDkx6Uftw" 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="SDNCAdapterRestV1" name="SDNCAdapterRestV1" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_2" name="Log Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdncAdapterRestV1 = new SDNCAdapterRestV1()
+def statusCode = execution.getVariable('SDNCREST_sdncAdapterStatusCode')
+String response = String.valueOf(execution.getVariable('SDNCREST_sdncAdapterResponse'))
+def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+def processKey = sdncAdapterRestV1.getProcessKey(execution)
+sdncAdapterRestV1.logDebug(processKey + " received response from SDNCAdapter: statusCode=" + statusCode +
+ " response=" + (response.isEmpty() ? "" : "\n") + response, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Workflow Exception (no connection)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 5300, "Failed to communicate with SDNCAdapter")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_4" name="Workflow Exception (bad response)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+String res = execution.getVariable('SDNCREST_sdncAdapterResponse')
+
+def sdncAdapterRestV1 = new SDNCAdapterRestV1()
+sdncAdapterRestV1.sdncAdapterBuildWorkflowException(execution, res)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_2" targetRef="ExclusiveGateway_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_23">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="404" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCREST_sdncAdapterStatusCode") == '404'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="other" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="2xx" sourceRef="ExclusiveGateway_1" targetRef="SubProcess_2">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCREST_sdncAdapterStatusCode") == '200' || execution.getVariable("SDNCREST_sdncAdapterStatusCode") == '202'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ScriptTask_3" targetRef="EndEvent_9" />
+ <bpmn2:endEvent id="EndEvent_9">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_22" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_10">
+ <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_23" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_10" />
+ <bpmn2:scriptTask id="ScriptTask_7" name="Send Request to SDNC Adapter" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdncAdapterRestV1 = new SDNCAdapterRestV1()
+sdncAdapterRestV1.sendRequestToSDNCAdapter(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_2" />
+ <bpmn2:scriptTask id="ScriptTask_1" name="Pre-Process Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdncAdapterRestV1 = new SDNCAdapterRestV1()
+sdncAdapterRestV1.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7" />
+ <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
+ <bpmn2:scriptTask id="ScriptTask_5" name="Workflow Exception (timeout)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 5320, "SDNCAdapter Callback Timeout Error")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="ScriptTask_5" targetRef="EndEvent_8" />
+ <bpmn2:endEvent id="EndEvent_8">
+ <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_21" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_setSuccess" name="Set Success Indicator and WorkflowResponse" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_44</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdncAdapterRestV1 = new SDNCAdapterRestV1()
+sdncAdapterRestV1.setSuccessIndicator(execution, true)
+execution.setVariable('WorkflowResponse', sdncAdapterRestV1.getLastCallback(execution))]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_6" />
+ <bpmn2:endEvent id="EndEvent_6" name="End">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Timeout" attachedToRef="SubProcess_2">
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition id="TimerEventDefinition_1">
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${SDNCREST_timeout}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="BoundaryEvent_1" targetRef="ScriptTask_5" />
+ <bpmn2:subProcess id="SubProcess_2" name="Wait for Callbacks">
+ <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_44</bpmn2:outgoing>
+ <bpmn2:scriptTask id="ScriptTask_6" name="Process Callback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_41</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_42</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdncAdapterRestV1 = new SDNCAdapterRestV1()
+sdncAdapterRestV1.processCallback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="ScriptTask_6" targetRef="ExclusiveGateway_3" />
+ <bpmn2:startEvent id="StartEvent_3">
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="StartEvent_3" targetRef="IntermediateCatchEvent_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_7" name="ack-final-indicator" default="SequenceFlow_43">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_43</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="Y" sourceRef="ExclusiveGateway_7" targetRef="EndEvent_12">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable('SDNCREST_ackFinalIndicator')=="Y"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_43" name="N" sourceRef="ExclusiveGateway_7" targetRef="IntermediateCatchEvent_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Callback &#10;Exception?" default="SequenceFlow_30">
+ <bpmn2:incoming>SequenceFlow_42</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="yes" sourceRef="ExclusiveGateway_3" targetRef="EndEvent_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_7" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Catch Event">
+ <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_1" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="IntermediateCatchEvent_1" targetRef="ScriptTask_6" />
+ <bpmn2:endEvent id="EndEvent_12">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_90" errorRef="Error_1" />
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_44" name="" sourceRef="SubProcess_2" targetRef="ScriptTask_setSuccess" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_8" />
+ <bpmn2:scriptTask id="ScriptTask_8" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def exUtil = new ExceptionUtil()
+exUtil.processSubflowsBPMNException(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_8" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="WorkflowMessage" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="SDNCAdapterRestV1">
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_56" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="204" y="148" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_14" bpmnElement="SubProcess_2" isExpanded="true">
+ <dc:Bounds x="744" y="303" width="629" height="280" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_58" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="948" y="404" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_59" bpmnElement="ScriptTask_5">
+ <dc:Bounds x="1418" y="624" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_24" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="1300" y="565" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1341" y="595" width="39" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_20" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds x="871" y="426" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="859" y="468" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_78" bpmnElement="ScriptTask_4">
+ <dc:Bounds x="744" y="148" width="97" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="492" y="148" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_1">
+ <dc:Bounds x="130" y="170" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="131" y="211" width="34" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="744" y="24" width="97" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ScriptTask_56">
+ <di:waypoint xsi:type="dc:Point" x="166" y="188" />
+ <di:waypoint xsi:type="dc:Point" x="204" y="188" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="176" y="188" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_105" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="624" y="162" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="649" y="217" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_ExclusiveGateway_105">
+ <di:waypoint xsi:type="dc:Point" x="592" y="188" />
+ <di:waypoint xsi:type="dc:Point" x="624" y="187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="611" y="187" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ExclusiveGateway_105" targetElement="_BPMNShape_ScriptTask_168">
+ <di:waypoint xsi:type="dc:Point" x="649" y="162" />
+ <di:waypoint xsi:type="dc:Point" x="649" y="64" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="64" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="688" y="64" width="27" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_105" targetElement="_BPMNShape_ScriptTask_78">
+ <di:waypoint xsi:type="dc:Point" x="674" y="187" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="187" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="188" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="188" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="684" y="188" width="35" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_105" targetElement="_BPMNShape_SubProcess_14">
+ <di:waypoint xsi:type="dc:Point" x="649" y="212" />
+ <di:waypoint xsi:type="dc:Point" x="649" y="443" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="443" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689" y="443" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_3">
+ <dc:Bounds x="776" y="426" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="794" y="467" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_StartEvent_55" targetElement="_BPMNShape_IntermediateCatchEvent_20">
+ <di:waypoint xsi:type="dc:Point" x="812" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="444" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1074" y="442" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_BoundaryEvent_24" targetElement="_BPMNShape_ScriptTask_59">
+ <di:waypoint xsi:type="dc:Point" x="1318" y="601" />
+ <di:waypoint xsi:type="dc:Point" x="1318" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="1418" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1153" y="655" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_158" bpmnElement="EndEvent_6">
+ <dc:Bounds x="1562" y="425" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1566" y="466" width="29" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_8">
+ <dc:Bounds x="1562" y="646" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1580" y="687" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_59" targetElement="_BPMNShape_EndEvent_160">
+ <di:waypoint xsi:type="dc:Point" x="1518" y="664" />
+ <di:waypoint xsi:type="dc:Point" x="1562" y="664" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1542" y="664" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_9">
+ <dc:Bounds x="891" y="46" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="909" y="87" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_EndEvent_161">
+ <di:waypoint xsi:type="dc:Point" x="840" y="64" />
+ <di:waypoint xsi:type="dc:Point" x="891" y="64" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="865" y="64" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_10">
+ <dc:Bounds x="892" y="170" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="910" y="211" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ScriptTask_78" targetElement="_BPMNShape_EndEvent_162">
+ <di:waypoint xsi:type="dc:Point" x="840" y="188" />
+ <di:waypoint xsi:type="dc:Point" x="892" y="188" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_setSuccess">
+ <dc:Bounds x="1419" y="401" width="97" height="83" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ScriptTask_236" targetElement="_BPMNShape_EndEvent_158">
+ <di:waypoint xsi:type="dc:Point" x="1515" y="442" />
+ <di:waypoint xsi:type="dc:Point" x="1562" y="443" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1548" y="443" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_7">
+ <dc:Bounds x="360" y="146" width="97" height="83" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_56" targetElement="_BPMNShape_ScriptTask_237">
+ <di:waypoint xsi:type="dc:Point" x="304" y="188" />
+ <di:waypoint xsi:type="dc:Point" x="344" y="188" />
+ <di:waypoint xsi:type="dc:Point" x="344" y="187" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="187" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="317" y="188" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_237" targetElement="_BPMNShape_ScriptTask_79">
+ <di:waypoint xsi:type="dc:Point" x="456" y="187" />
+ <di:waypoint xsi:type="dc:Point" x="474" y="187" />
+ <di:waypoint xsi:type="dc:Point" x="474" y="188" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="188" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_24" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="156" y="516" width="382" height="181" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_2">
+ <dc:Bounds x="204" y="589" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="222" y="630" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ScriptTask_8">
+ <dc:Bounds x="302" y="565" width="97" height="83" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ScriptTask_266">
+ <di:waypoint xsi:type="dc:Point" x="240" y="607" />
+ <di:waypoint xsi:type="dc:Point" x="302" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="280" y="630" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_107" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="1092" y="418" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1093" y="381" width="54" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1100" y="516" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1118" y="557" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_107" targetElement="_BPMNShape_EndEvent_215">
+ <di:waypoint xsi:type="dc:Point" x="1117" y="468" />
+ <di:waypoint xsi:type="dc:Point" x="1118" y="516" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1122" y="468" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_111" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
+ <dc:Bounds x="1204" y="418" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1192" y="472" width="86" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_107" targetElement="_BPMNShape_ExclusiveGateway_111">
+ <di:waypoint xsi:type="dc:Point" x="1142" y="443" />
+ <di:waypoint xsi:type="dc:Point" x="1204" y="443" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1156" y="443" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ExclusiveGateway_111" targetElement="_BPMNShape_EndEvent_219">
+ <di:waypoint xsi:type="dc:Point" x="1254" y="443" />
+ <di:waypoint xsi:type="dc:Point" x="1308" y="444" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1276" y="418" width="7" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_IntermediateCatchEvent_20" targetElement="_BPMNShape_ScriptTask_58">
+ <di:waypoint xsi:type="dc:Point" x="907" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="948" y="444" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="475" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_12">
+ <dc:Bounds x="1308" y="426" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1326" y="467" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_42" sourceElement="_BPMNShape_ScriptTask_58" targetElement="_BPMNShape_ExclusiveGateway_107">
+ <di:waypoint xsi:type="dc:Point" x="1048" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="1070" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="1070" y="443" />
+ <di:waypoint xsi:type="dc:Point" x="1092" y="443" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="905" y="462" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_43" sourceElement="_BPMNShape_ExclusiveGateway_111" targetElement="_BPMNShape_IntermediateCatchEvent_20">
+ <di:waypoint xsi:type="dc:Point" x="1229" y="418" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="351" />
+ <di:waypoint xsi:type="dc:Point" x="889" y="351" />
+ <di:waypoint xsi:type="dc:Point" x="889" y="426" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1240" y="360" width="8" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_44" bpmnElement="SequenceFlow_44" sourceElement="_BPMNShape_SubProcess_14" targetElement="_BPMNShape_ScriptTask_236">
+ <di:waypoint xsi:type="dc:Point" x="1372" y="443" />
+ <di:waypoint xsi:type="dc:Point" x="1395" y="443" />
+ <di:waypoint xsi:type="dc:Point" x="1395" y="442" />
+ <di:waypoint xsi:type="dc:Point" x="1419" y="442" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1404" y="462" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_2">
+ <dc:Bounds x="444" y="589" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="462" y="630" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_EndEvent_220">
+ <di:waypoint xsi:type="dc:Point" x="398" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="444" y="607" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="412" y="606" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn
new file mode 100644
index 0000000000..e0fc14e933
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn
@@ -0,0 +1,550 @@
+<?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="_l2hJ8CccEeW3d--PaFJMbg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="sdncAdapter" name="SDNC Adapter" isExecutable="true">
+ <bpmn2:exclusiveGateway id="isResponseOK" name="is Response Ok?" default="badSynchronousResponse">
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ <bpmn2:outgoing>badSynchronousResponse</bpmn2:outgoing>
+ <bpmn2:outgoing>goodSynchronousResponse</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="badSynchronousResponse" name="Bad synchronous response" sourceRef="isResponseOK" targetRef="setBadResponse" />
+ <bpmn2:sequenceFlow id="goodSynchronousResponse" name="Good synchronous response" sourceRef="isResponseOK" targetRef="resetCallbackRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCA_ResponseCode")=='200'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="setBadResponse" name="Set Bad Response&#10;&#10;Exception" scriptFormat="groovy">
+ <bpmn2:incoming>badSynchronousResponse</bpmn2:incoming>
+ <bpmn2:outgoing>Exception</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+int responseCode = execution.getVariable("SDNCA_ResponseCode")
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 7000, "Could not communicate with the SDNC Adapter" )]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="Exception" name="Exception" sourceRef="setBadResponse" targetRef="badResponseEndFlow" />
+ <bpmn2:serviceTask id="invokeSDNCAdapter" name="Invoke SDNC Adapter" camunda:asyncAfter="true" camunda:class="">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_sdnc_endpoint}</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">#{BasicAuthHeaderValue}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${sdncAdapterRequest}</camunda:inputParameter>
+ <camunda:outputParameter name="sdncAdapterWorkflowResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="SDNCA_ResponseCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>soap-http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" sourceRef="invokeSDNCAdapter" targetRef="isResponseOK" />
+ <bpmn2:endEvent id="badResponseEndFlow" name="Bad Response End Flow">
+ <bpmn2:incoming>Exception</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_77" errorRef="Error_3" />
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="SDNCAdapter_Start" name="Incoming Message">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="_MessageEventDefinition_3" messageRef="Message_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="SDNCAdapter_Start" targetRef="processMessage" />
+ <bpmn2:scriptTask id="processMessage" name="Process message" scriptFormat="groovy">
+ <bpmn2:extensionElements>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="ScriptObject">
+ <camunda:map>
+ <camunda:entry key="MethodName">massageSDNCRequestScript</camunda:entry>
+ <camunda:entry key="Params" />
+ </camunda:map>
+ </camunda:inputParameter>
+ </camunda:inputOutput>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" sourceRef="processMessage" targetRef="invokeSDNCAdapter" />
+ <bpmn2:scriptTask id="returnWorkflowResult" name="Return workflow result" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_11ah5pw</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.postProcessResponse(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" sourceRef="returnWorkflowResult" targetRef="timeoutError" />
+ <bpmn2:exclusiveGateway id="timeoutError" name="Did Timeout occur?" default="noTimeoutError">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>noTimeoutError</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="noTimeoutError" name="No Timeout" sourceRef="timeoutError" targetRef="ExclusiveGateway_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="Timeout" sourceRef="timeoutError" targetRef="endEventException">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("asynchronousResponseTimeout")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:subProcess id="SubProcess" name="Wait for asynchronous message">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:startEvent id="StartEvent" name="Start Event">
+ <bpmn2:outgoing>SequenceFlow_1eciucn</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent" name="Catch Event">
+ <bpmn2:incoming>SequenceFlow_1eciucn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="MessageEventDefinition_2" messageRef="Message_2" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" sourceRef="IntermediateCatchEvent" targetRef="eEndEventSubprocess" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1eciucn" sourceRef="StartEvent" targetRef="IntermediateCatchEvent" />
+ <bpmn2:endEvent id="eEndEventSubprocess" name="End Event Subprocess">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" sourceRef="SubProcess" targetRef="returnWorkflowResult" />
+ <bpmn2:scriptTask id="setTimeoutEx" name="Set Timeout&#10;and Stop Listening for Callback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0mzs1ze</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11ah5pw</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.setTimeout(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="resetCallbackRequest" name="Reset callback request and set timer value" scriptFormat="groovy">
+ <bpmn2:incoming>goodSynchronousResponse</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.resetCallbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="resetCallbackRequest" targetRef="SubProcess" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Check final indicator" default="Done">
+ <bpmn2:incoming>noTimeoutError</bpmn2:incoming>
+ <bpmn2:outgoing>Done</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="Done" name="Done" sourceRef="ExclusiveGateway_1" targetRef="toggleSuccessIndicator" />
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="Not Done" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("continueListening")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="toggleSuccessIndicator" name="Toggle Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>Done</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.toggleSuccessIndicator(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="toggleSuccessIndicator" targetRef="endEventFlow" />
+ <bpmn2:endEvent id="endEventFlow" name="End Event Flow">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:outputParameter name="sdncAdapterResponse">${sdncAdapterWorkflowResponse}</camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:messageEventDefinition id="_MessageEventDefinition_6" />
+ </bpmn2:endEvent>
+ <bpmn2:parallelGateway id="ParallelGateway_3">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+ </bpmn2:parallelGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ParallelGateway_3" targetRef="toggleSuccess" />
+ <bpmn2:sequenceFlow id="SequenceFlow_26" name="Continue listening for asynchronous message" sourceRef="ParallelGateway_3" targetRef="resetCallbackRequest" />
+ <bpmn2:subProcess id="errorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:startEvent id="catchErrors" name="Catch">
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_78" errorRef="Error_3" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="catchErrors" targetRef="assignError" />
+ <bpmn2:scriptTask id="assignError" name="Assign Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.assignError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="assignError" targetRef="EndEvent_5" />
+ <bpmn2:endEvent id="EndEvent_5">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.toggleSuccessIndicator(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="toggleSuccess" targetRef="ExclusiveGateway_2" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Service Config Activate?" default="SequenceFlow_23">
+ <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="Yes" sourceRef="ExclusiveGateway_2" targetRef="CallActivity_11xgv33">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("serviceConfigActivate")==true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="No" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Boundary Event" cancelActivity="false" attachedToRef="SubProcess">
+ <bpmn2:documentation>this is a non interupting time to prevent an Optimistic Locking Exception if timer expires the same time we correlate a message</bpmn2:documentation>
+ <bpmn2:outgoing>SequenceFlow_0mzs1ze</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${sdncTimeoutValue}</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ <bpmn2:endEvent id="endEventException" name="Timeout Exception">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0mzs1ze" sourceRef="BoundaryEvent_1" targetRef="setTimeoutEx" />
+ <bpmn2:sequenceFlow id="SequenceFlow_11ah5pw" sourceRef="setTimeoutEx" targetRef="returnWorkflowResult" />
+ <bpmn2:callActivity id="CallActivity_11xgv33" name="Call Notification Service" calledElement="${URN_mso_workflow_notification_name}" camunda:calledElementBinding="deployment">
+ <bpmn2:extensionElements>
+ <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 variables="all" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ </bpmn2:callActivity>
+ </bpmn2:process>
+ <bpmn2:message id="Message_1" name="sdncAdapterWorkflowRequest" />
+ <bpmn2:message id="Message_2" name="sdncAdapterCallbackRequest" />
+ <bpmn2:error id="Error_3" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:signal id="Signal_1" name="InterimStatus" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="sdncAdapter">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_33" bpmnElement="SDNCAdapter_Start">
+ <dc:Bounds x="111" y="161" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="202" width="115" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_62" bpmnElement="invokeSDNCAdapter">
+ <dc:Bounds x="342" y="139" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_29" bpmnElement="isResponseOK" isMarkerVisible="true">
+ <dc:Bounds x="519" y="153" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="569" y="182" width="106" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_64" bpmnElement="endEventFlow">
+ <dc:Bounds x="1560" y="366" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1595" y="373" width="96" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_65" bpmnElement="badResponseEndFlow">
+ <dc:Bounds x="762" y="104" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="804" y="111" width="149" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="badSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_24">
+ <di:waypoint xsi:type="dc:Point" x="544" y="153" />
+ <di:waypoint xsi:type="dc:Point" x="544" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="600" y="122" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="441" y="99" width="164" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_33" targetElement="_BPMNShape_ScriptTask_3">
+ <di:waypoint xsi:type="dc:Point" x="147" y="179" />
+ <di:waypoint xsi:type="dc:Point" x="194" y="179" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="179" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="goodSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_27">
+ <di:waypoint xsi:type="dc:Point" x="544" y="203" />
+ <di:waypoint xsi:type="dc:Point" x="544" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="459" y="208" width="172" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_68" bpmnElement="returnWorkflowResult">
+ <dc:Bounds x="1104" y="237" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_3" bpmnElement="processMessage">
+ <dc:Bounds x="194" y="139" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_3" targetElement="_BPMNShape_ServiceTask_62">
+ <di:waypoint xsi:type="dc:Point" x="294" y="179" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="179" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="300" y="153" width="30" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ServiceTask_68" targetElement="_BPMNShape_ExclusiveGateway_53">
+ <di:waypoint xsi:type="dc:Point" x="1204" y="277" />
+ <di:waypoint xsi:type="dc:Point" x="1248" y="276" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1211" y="251" width="37" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ServiceTask_62" targetElement="_BPMNShape_ExclusiveGateway_29">
+ <di:waypoint xsi:type="dc:Point" x="442" y="179" />
+ <di:waypoint xsi:type="dc:Point" x="480" y="179" />
+ <di:waypoint xsi:type="dc:Point" x="480" y="178" />
+ <di:waypoint xsi:type="dc:Point" x="519" y="178" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="468" y="153" width="37" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_16" bpmnElement="IntermediateCatchEvent">
+ <dc:Bounds x="781" y="257" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="739" y="292" width="60" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_11" bpmnElement="SubProcess" isExpanded="true">
+ <dc:Bounds x="619" y="209" width="379" height="137" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_38" bpmnElement="StartEvent">
+ <dc:Bounds x="655" y="257" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="630" y="292" width="54" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_SubProcess_11">
+ <di:waypoint xsi:type="dc:Point" x="998" y="278" />
+ <di:waypoint xsi:type="dc:Point" x="1104" y="277" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1051" y="262.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_24" bpmnElement="setBadResponse">
+ <dc:Bounds x="600" y="82" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="Exception" sourceElement="_BPMNShape_ScriptTask_24" targetElement="_BPMNShape_EndEvent_65">
+ <di:waypoint xsi:type="dc:Point" x="700" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="762" y="122" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="99" width="64" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_25" bpmnElement="setTimeoutEx">
+ <dc:Bounds x="941" y="372" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateCatchEvent_16">
+ <di:waypoint xsi:type="dc:Point" x="817" y="275" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="275" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="872" y="260" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_53" bpmnElement="timeoutError" isMarkerVisible="true">
+ <dc:Bounds x="1248" y="251" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1300" y="266" width="118" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="noTimeoutError" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="1273" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="1273" y="359" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1280" y="324" width="72" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ScriptTask_25">
+ <di:waypoint xsi:type="dc:Point" x="1273" y="251" />
+ <di:waypoint xsi:type="dc:Point" x="1273" y="95" />
+ <di:waypoint xsi:type="dc:Point" x="1560" y="95" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1301" y="169.45283018867923" width="39" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="1248" y="359" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1194" y="372" width="57" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="Done" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_247">
+ <di:waypoint xsi:type="dc:Point" x="1298" y="384" />
+ <di:waypoint xsi:type="dc:Point" x="1383" y="384" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1316" y="384" width="36" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_27" bpmnElement="resetCallbackRequest">
+ <dc:Bounds x="494" y="246" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_27" targetElement="_BPMNShape_SubProcess_11">
+ <di:waypoint xsi:type="dc:Point" x="594" y="286" />
+ <di:waypoint xsi:type="dc:Point" x="607" y="286" />
+ <di:waypoint xsi:type="dc:Point" x="607" y="275" />
+ <di:waypoint xsi:type="dc:Point" x="619" y="275" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="622" y="280.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ParallelGateway_14">
+ <di:waypoint xsi:type="dc:Point" x="1273" y="409" />
+ <di:waypoint xsi:type="dc:Point" x="1273" y="467" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1273" y="423" width="60" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_55" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds x="1248" y="663" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1105" y="678" width="145" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="CallActivity_11xgv33_di">
+ <di:waypoint xsi:type="dc:Point" x="1273" y="713" />
+ <di:waypoint xsi:type="dc:Point" x="1273" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1279" y="722.5754830930483" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_14" bpmnElement="ParallelGateway_3">
+ <dc:Bounds x="1248" y="467" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1273" y="522" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ScriptTask_255">
+ <di:waypoint xsi:type="dc:Point" x="1273" y="517" />
+ <di:waypoint xsi:type="dc:Point" x="1274" y="552" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1270" y="533" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_96" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1444" y="671" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1462" y="712" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_EndEvent_96">
+ <di:waypoint xsi:type="dc:Point" x="1298" y="688" />
+ <di:waypoint xsi:type="dc:Point" x="1444" y="689" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1320" y="688" width="22" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ScriptTask_27">
+ <di:waypoint xsi:type="dc:Point" x="1248" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="544" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="544" y="326" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="782" y="467" width="73" height="48" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_247" bpmnElement="toggleSuccessIndicator">
+ <dc:Bounds x="1383" y="344" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_247" targetElement="_BPMNShape_EndEvent_64">
+ <di:waypoint xsi:type="dc:Point" x="1483" y="384" />
+ <di:waypoint xsi:type="dc:Point" x="1560" y="384" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1499" y="384" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_19" bpmnElement="errorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="378" y="797" width="353" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="catchErrors">
+ <dc:Bounds x="413" y="876" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="416" y="917" width="29" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_213" bpmnElement="EndEvent_5">
+ <dc:Bounds x="653" y="876" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="671" y="917" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_249" bpmnElement="assignError">
+ <dc:Bounds x="497" y="854" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_249">
+ <di:waypoint xsi:type="dc:Point" x="449" y="894" />
+ <di:waypoint xsi:type="dc:Point" x="497" y="894" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="479" y="894" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_249" targetElement="_BPMNShape_EndEvent_213">
+ <di:waypoint xsi:type="dc:Point" x="597" y="894" />
+ <di:waypoint xsi:type="dc:Point" x="653" y="894" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="625" y="894" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="toggleSuccess">
+ <dc:Bounds x="1224" y="552" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_ExclusiveGateway_55">
+ <di:waypoint xsi:type="dc:Point" x="1274" y="632" />
+ <di:waypoint xsi:type="dc:Point" x="1274" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="1273" y="646" />
+ <di:waypoint xsi:type="dc:Point" x="1273" y="663" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1271" y="646" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eciucn_di" bpmnElement="SequenceFlow_1eciucn">
+ <di:waypoint xsi:type="dc:Point" x="691" y="275" />
+ <di:waypoint xsi:type="dc:Point" x="781" y="275" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="736" y="260" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="BoundaryEvent_1e5qjpm_di" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="782" y="328" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="715" y="361" width="78" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0vl0pvg_di" bpmnElement="endEventException">
+ <dc:Bounds x="1560" y="77" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1607" y="84" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mzs1ze_di" bpmnElement="SequenceFlow_0mzs1ze">
+ <di:waypoint xsi:type="dc:Point" x="800" y="364" />
+ <di:waypoint xsi:type="dc:Point" x="800" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="412" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="815" y="388" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11ah5pw_di" bpmnElement="SequenceFlow_11ah5pw">
+ <di:waypoint xsi:type="dc:Point" x="1041" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="1154" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="1154" y="317" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1098" y="397" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0xhvk12_di" bpmnElement="eEndEventSubprocess">
+ <dc:Bounds x="926" y="257" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="905" y="292" width="59" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_11xgv33_di" bpmnElement="CallActivity_11xgv33">
+ <dc:Bounds x="1223" y="782" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/UpdateAAIGenericVnf.bpmn
index 32206bd7ac..0932221944 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/UpdateAAIGenericVnf.bpmn
@@ -1,216 +1,216 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="UpdateAAIGenericVnf" name="UpdateAAIGenericVnf" isExecutable="true">
- <bpmn2:documentation>This flow expects its incoming request to be in the variable 'UpdateAAIGenericVnfRequest'. This flow produces no output.</bpmn2:documentation>
- <bpmn2:scriptTask id="QueryAAIForGenericVNF" name="Query AAI for Generic VNF" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="UpdateAAIGenericVnf" name="UpdateAAIGenericVnf" isExecutable="true">
+ <bpmn2:documentation>This flow expects its incoming request to be in the variable 'UpdateAAIGenericVnfRequest'. This flow produces no output.</bpmn2:documentation>
+ <bpmn2:scriptTask id="QueryAAIForGenericVNF" name="Query AAI for Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def ugv = new UpdateAAIGenericVnf()
-ugv.getGenericVnf(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVNF" targetRef="ExclusiveGateway_3"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIGenVnf_updateGenericVnfResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update Generic VNF Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateGenericVNFFailure"/>
- <bpmn2:scriptTask id="HandleUpdateGenericVNFFailure" name="Handle Update Generic VNF Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ugv.getGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVNF" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIGenVnf_updateGenericVnfResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update Generic VNF Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateGenericVNFFailure"/>
+ <bpmn2:scriptTask id="HandleUpdateGenericVNFFailure" name="Handle Update Generic VNF Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def ugv = new UpdateAAIGenericVnf()
-ugv.handleUpdateGenericVnfFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateGenericVNFFailure" targetRef="EndEvent_2"/>
- <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1" xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+ugv.handleUpdateGenericVnfFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateGenericVNFFailure" targetRef="EndEvent_2"/>
+ <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" xmlns:ns="http://org.openecomp/mso/workflow/schema/v1">
<ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
- </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="UpdateGenericVNF" name="Update Generic VNF" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="UpdateGenericVNF" name="Update Generic VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def ugv = new UpdateAAIGenericVnf()
-ugv.updateGenericVnf(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateGenericVNF" targetRef="ExclusiveGateway_1"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateGenericVNF">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIGenVnf_getGenericVnfResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;Generic VNF not found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>
- <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ugv.updateGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateGenericVNF" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateGenericVNF">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIGenVnf_getGenericVnfResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;Generic VNF not found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>
+ <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def ugv = new UpdateAAIGenericVnf()
-ugv.handleAAIQueryFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
- <bpmn2:endEvent id="EndEvent_7">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <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="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ugv.handleAAIQueryFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
+ <bpmn2:endEvent id="EndEvent_7">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <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="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def ugv = new UpdateAAIGenericVnf()
-ugv.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForGenericVNF"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateAAIGenericVnf">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="43.0" y="212.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="44.0" y="253.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
- <dc:Bounds height="80.0" width="100.0" x="168.0" y="190.0"/>
- </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="79.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="168.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="101.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateGenericVNF">
- <dc:Bounds height="80.0" width="100.0" x="683.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="984.0" y="214.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="977.0" y="255.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="840.0" y="206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="865.0" y="261.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
- <di:waypoint xsi:type="dc:Point" x="890.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="984.0" y="232.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="904.0" y="231.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="500.0" y="204.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="525.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">
- <di:waypoint xsi:type="dc:Point" x="550.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="683.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="565.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
- <dc:Bounds height="80.0" width="100.0" x="476.0" y="60.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
- <di:waypoint xsi:type="dc:Point" x="525.0" y="204.0"/>
- <di:waypoint xsi:type="dc:Point" x="525.0" y="190.0"/>
- <di:waypoint xsi:type="dc:Point" x="526.0" y="190.0"/>
- <di:waypoint xsi:type="dc:Point" x="526.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="38.0" width="142.0" x="543.0" y="149.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
- <dc:Bounds height="36.0" width="36.0" x="508.0" y="0.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="526.0" y="41.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
- <di:waypoint xsi:type="dc:Point" x="526.0" y="60.0"/>
- <di:waypoint xsi:type="dc:Point" x="526.0" y="36.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="523.0" y="49.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVNF">
- <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
- </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="268.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="288.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
- <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="500.0" y="229.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="450.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateGenericVNFFailure">
- <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
- <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>
- <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
- <di:waypoint xsi:type="dc:Point" x="783.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="840.0" y="231.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="813.0" y="231.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
- <di:waypoint xsi:type="dc:Point" x="865.0" y="206.0"/>
- <di:waypoint xsi:type="dc:Point" x="866.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="169.0" x="867.0" y="157.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+ugv.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForGenericVNF"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateAAIGenericVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="43.0" y="212.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="44.0" y="253.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
+ <dc:Bounds height="80.0" width="100.0" x="168.0" y="190.0"/>
+ </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="79.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="168.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="101.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateGenericVNF">
+ <dc:Bounds height="80.0" width="100.0" x="683.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="984.0" y="214.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="977.0" y="255.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="840.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="865.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
+ <di:waypoint xsi:type="dc:Point" x="890.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="984.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="904.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="500.0" y="204.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="525.0" y="259.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">
+ <di:waypoint xsi:type="dc:Point" x="550.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="683.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="565.0" y="229.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
+ <dc:Bounds height="80.0" width="100.0" x="476.0" y="60.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="204.0"/>
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="190.0"/>
+ <di:waypoint xsi:type="dc:Point" x="526.0" y="190.0"/>
+ <di:waypoint xsi:type="dc:Point" x="526.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="142.0" x="543.0" y="149.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
+ <dc:Bounds height="36.0" width="36.0" x="508.0" y="0.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="526.0" y="41.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
+ <di:waypoint xsi:type="dc:Point" x="526.0" y="60.0"/>
+ <di:waypoint xsi:type="dc:Point" x="526.0" y="36.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="523.0" y="49.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVNF">
+ <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
+ </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="268.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="288.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
+ <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="500.0" y="229.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="450.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateGenericVNFFailure">
+ <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="783.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="840.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="813.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
+ <di:waypoint xsi:type="dc:Point" x="865.0" y="206.0"/>
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="169.0" x="867.0" y="157.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/UpdateAAIVfModule.bpmn
index fabd9c2f9d..6eacaee530 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/UpdateAAIVfModule.bpmn
@@ -1,224 +1,224 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="UpdateAAIVfModule" name="UpdateAAIVfModule" isExecutable="true">
- <bpmn2:documentation>This flow expects its incoming request to be in the variable 'UpdateAAIVfModuleRequest'. This flow produces no output.</bpmn2:documentation>
- <bpmn2:scriptTask id="QueryAAIForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="UpdateAAIVfModule" name="UpdateAAIVfModule" isExecutable="true">
+ <bpmn2:documentation>This flow expects its incoming request to be in the variable 'UpdateAAIVfModuleRequest'. This flow produces no output.</bpmn2:documentation>
+ <bpmn2:scriptTask id="QueryAAIForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def uvm = new UpdateAAIVfModule()
-uvm.getVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVfModule" targetRef="ExclusiveGateway_3"/>
- <bpmn2:endEvent id="EndEvent_7">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+uvm.getVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVfModule" targetRef="ExclusiveGateway_3"/>
+ <bpmn2:endEvent id="EndEvent_7">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def uvm= new UpdateAAIVfModule()
-uvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1" xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+uvm.handleAAIQueryFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_4" name="TheEnd">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" xmlns:ns="http://org.openecomp/mso/workflow/schema/v1">
<ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
- </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateVfModule">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIVfMod_getVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;VF Module not found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>
- <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">
+ <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateVfModule">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIVfMod_getVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;VF Module not found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>
+ <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def uvm= new UpdateAAIVfModule()
-uvm.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIVfMod_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>
- <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+uvm.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIVfMod_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>
+ <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def uvm= new UpdateAAIVfModule()
-uvm.updateVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>
- <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="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+uvm.updateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>
+ <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="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
def uvm= new UpdateAAIVfModule()
-uvm.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForVfModule"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateAAIVfModule">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="69.0" y="212.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="70.0" y="253.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
- <dc:Bounds height="80.0" width="100.0" x="180.0" y="190.0"/>
- </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="105.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="180.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="127.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">
- <dc:Bounds height="80.0" width="100.0" x="672.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1016.0" y="212.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="1009.0" y="253.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="840.0" y="206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="865.0" y="261.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
- <di:waypoint xsi:type="dc:Point" x="890.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="993.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="993.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="1016.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="928.0" y="231.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="493.0" y="204.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="518.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">
- <di:waypoint xsi:type="dc:Point" x="543.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="607.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="607.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="672.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="558.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
- <dc:Bounds height="80.0" width="100.0" x="468.0" y="60.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
- <di:waypoint xsi:type="dc:Point" x="518.0" y="204.0"/>
- <di:waypoint xsi:type="dc:Point" x="518.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="38.0" width="130.0" x="528.0" y="152.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
- <dc:Bounds height="36.0" width="36.0" x="500.0" y="0.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="518.0" y="41.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
- <di:waypoint xsi:type="dc:Point" x="518.0" y="60.0"/>
- <di:waypoint xsi:type="dc:Point" x="518.0" y="36.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="515.0" y="49.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVfModule">
- <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
- </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="280.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="300.0" y="230.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
- <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="452.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="493.0" y="229.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="449.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">
- <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
- <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>
- <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
- <di:waypoint xsi:type="dc:Point" x="772.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="797.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="797.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="840.0" y="231.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="801.0" y="231.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
- <di:waypoint xsi:type="dc:Point" x="865.0" y="206.0"/>
- <di:waypoint xsi:type="dc:Point" x="865.0" y="172.0"/>
- <di:waypoint xsi:type="dc:Point" x="867.0" y="172.0"/>
- <di:waypoint xsi:type="dc:Point" x="867.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="157.0" x="883.0" y="160.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+uvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForVfModule"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateAAIVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="69.0" y="212.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="70.0" y="253.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
+ <dc:Bounds height="80.0" width="100.0" x="180.0" y="190.0"/>
+ </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="105.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="180.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="127.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="672.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="1016.0" y="212.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="1009.0" y="253.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="840.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="865.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">
+ <di:waypoint xsi:type="dc:Point" x="890.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="993.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="993.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1016.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="928.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="493.0" y="204.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="518.0" y="259.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">
+ <di:waypoint xsi:type="dc:Point" x="543.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="607.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="607.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="672.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="558.0" y="229.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">
+ <dc:Bounds height="80.0" width="100.0" x="468.0" y="60.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="204.0"/>
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="130.0" x="528.0" y="152.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">
+ <dc:Bounds height="36.0" width="36.0" x="500.0" y="0.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="518.0" y="41.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="60.0"/>
+ <di:waypoint xsi:type="dc:Point" x="518.0" y="36.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="515.0" y="49.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>
+ </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="280.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="300.0" y="230.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">
+ <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="452.0" y="229.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="229.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="449.0" y="229.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">
+ <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>
+ <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">
+ <di:waypoint xsi:type="dc:Point" x="772.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="797.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="797.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="840.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="801.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">
+ <di:waypoint xsi:type="dc:Point" x="865.0" y="206.0"/>
+ <di:waypoint xsi:type="dc:Point" x="865.0" y="172.0"/>
+ <di:waypoint xsi:type="dc:Point" x="867.0" y="172.0"/>
+ <di:waypoint xsi:type="dc:Point" x="867.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="157.0" x="883.0" y="160.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn
index 04f9d02fe9..82d89b0c64 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn
@@ -1,33 +1,33 @@
<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_GraPIIyxEeWmdMDkx6Uftw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_GraPIIyxEeWmdMDkx6Uftw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
<bpmn2:process id="vnfAdapterRestV1" name="vnfAdapterRestV1" isExecutable="true">
<bpmn2:scriptTask id="ScriptTask_2" name="Log Response" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def vnfAdapterRestV1 = new VnfAdapterRestV1()
-def statusCode = execution.getVariable('VNFREST_vnfAdapterStatusCode')
-String response = String.valueOf(execution.getVariable('VNFREST_vnfAdapterResponse'))
-def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-def processKey = vnfAdapterRestV1.getProcessKey(execution)
-vnfAdapterRestV1.logDebug(processKey + " received response from VnfAdapter: statusCode=" + statusCode +
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+def statusCode = execution.getVariable('VNFREST_vnfAdapterStatusCode')
+String response = String.valueOf(execution.getVariable('VNFREST_vnfAdapterResponse'))
+def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+def processKey = vnfAdapterRestV1.getProcessKey(execution)
+vnfAdapterRestV1.logDebug(processKey + " received response from VnfAdapter: statusCode=" + statusCode +
" response=" + (response.isEmpty() ? "" : "\n") + response, isDebugLogEnabled)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:scriptTask id="ScriptTask_3" name="Workflow Exception (no connection)">
<bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def exceptionUtil = new ExceptionUtil()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def exceptionUtil = new ExceptionUtil()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Failed to communicate with VnfAdapter")]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:scriptTask id="ScriptTask_4" name="Workflow Exception (bad response)" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-
-String res = execution.getVariable(VNFREST_vnfAdapterResponse)
-
-def vnfAdapterRestV1 = new VnfAdapterRestV1()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+
+String res = execution.getVariable(VNFREST_vnfAdapterResponse)
+
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
vnfAdapterRestV1.vnfAdapterWorkflowException(execution, res)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_2" targetRef="ExclusiveGateway_1"/>
@@ -71,17 +71,17 @@ vnfAdapterRestV1.vnfAdapterWorkflowException(execution, res)]]></bpmn2:script>
<bpmn2:scriptTask id="ScriptTask_5" name="Workflow Exception (timeout)" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def exceptionUtil = new ExceptionUtil()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def exceptionUtil = new ExceptionUtil()
exceptionUtil.buildAndThrowWorkflowException(execution, 7010, "VnfAdapter Callback Timeout Error")]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="waitForAsyncMessage" targetRef="ScriptTask_6"/>
<bpmn2:scriptTask id="ScriptTask_6" name="Process Callback" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def vnfAdapterRestV1 = new VnfAdapterRestV1()
-vnfAdapterRestV1.processCallback(execution)
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+vnfAdapterRestV1.processCallback(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="ScriptTask_6" targetRef="ExclusiveGateway_2"/>
@@ -116,8 +116,8 @@ vnfAdapterRestV1.processCallback(execution)
<bpmn2:scriptTask id="ScriptTask_setSuccess" name="Set Success Indicator" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def vnfAdapterRestV1 = new VnfAdapterRestV1()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
vnfAdapterRestV1.setSuccessIndicator(execution, true)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_6"/>
@@ -127,8 +127,8 @@ vnfAdapterRestV1.setSuccessIndicator(execution, true)]]></bpmn2:script>
<bpmn2:scriptTask id="ScriptTask_7" name="Send Request to Vnf Adapter" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def vnfAdapterRestV1 = new VnfAdapterRestV1()
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
vnfAdapterRestV1.sendRequestToVnfAdapter(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_2"/>
@@ -136,9 +136,9 @@ vnfAdapterRestV1.sendRequestToVnfAdapter(execution)]]></bpmn2:script>
<bpmn2:scriptTask id="ScriptTask_8" name="Process Error" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def exUtil = new ExceptionUtil()
-exUtil.processSubflowsBPMNException(execution)
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def exUtil = new ExceptionUtil()
+exUtil.processSubflowsBPMNException(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_8" targetRef="EndEvent_1"/>
@@ -154,9 +154,9 @@ exUtil.processSubflowsBPMNException(execution)
<bpmn2:scriptTask id="ScriptTask_1" name="Pre-Process Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def vnfAdapterRestV1 = new VnfAdapterRestV1()
-vnfAdapterRestV1.preProcessRequest(execution)
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+vnfAdapterRestV1.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7"/>
@@ -166,7 +166,7 @@ vnfAdapterRestV1.preProcessRequest(execution)
<bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>
</bpmn2:process>
<bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmn2:message id="Message_1" name="vnfAdapterRestCallbackMessage"/>
+ <bpmn2:message id="Message_1" name="WorkflowMessage"/>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="vnfAdapterRestV1">
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_56" bpmnElement="ScriptTask_1">
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/urn.properties b/bpmn/MSOCommonBPMN/src/main/resources/urn.properties
new file mode 100644
index 0000000000..5bf8e24815
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/urn.properties
@@ -0,0 +1,29 @@
+###
+# ============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=========================================================
+###
+
+# URN mappings for this project.
+
+# TODO: Remove all the non-URN stuff that's in here.
+# TODO: Implement a real URN mapping capability.
+
+#AAIEndPoint= http://localhost:28080/SoapUIMocks
+AAIEndPoint= http://localhost:28090/
+SDNCEndPoint=http://localhost:28090/SDNCAdapter/
+msoRollback = true
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl b/bpmn/MSOCommonBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl
index 471745cda2..a4f194045a 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl
+++ b/bpmn/MSOCommonBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
- xmlns:tns="http://com.att.mso/vnfNotify"
+ xmlns:tns="http://org.openecomp.mso/vnfNotify"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
name="vnfAdapterNotify"
- targetNamespace="http://com.att.mso/vnfNotify">
+ targetNamespace="http://org.openecomp.mso/vnfNotify">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://com.att.mso/vnfNotify"
+ targetNamespace="http://org.openecomp.mso/vnfNotify"
version="1.0">
<xs:element name="createVnfNotification" type="tns:createVnfNotification"/>
@@ -172,23 +172,23 @@
<portType name="vnfAdapterNotify">
<operation name="rollbackVnfNotification">
<input message="tns:rollbackVnfNotification"
- wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest"/>
+ wsam:Action="http://org.openecomp.mso/notify/adapterNotify/rollbackVnfNotificationRequest"/>
</operation>
<operation name="queryVnfNotification">
<input message="tns:queryVnfNotification"
- wsam:Action="http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest"/>
+ wsam:Action="http://org.openecomp.mso/notify/adapterNotify/queryVnfNotificationRequest"/>
</operation>
<operation name="createVnfNotification">
<input message="tns:createVnfNotification"
- wsam:Action="http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest"/>
+ wsam:Action="http://org.openecomp.mso/notify/adapterNotify/createVnfNotificationRequest"/>
</operation>
<operation name="updateVnfNotification">
<input message="tns:updateVnfNotification"
- wsam:Action="http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest"/>
+ wsam:Action="http://org.openecomp.mso/notify/adapterNotify/updateVnfNotificationRequest"/>
</operation>
<operation name="deleteVnfNotification">
<input message="tns:deleteVnfNotification"
- wsam:Action="http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest"/>
+ wsam:Action="http://org.openecomp.mso/notify/adapterNotify/deleteVnfNotificationRequest"/>
</operation>
</portType>
<binding name="MsoVnfAdapterAsyncImplPortBinding" type="tns:vnfAdapterNotify">
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
index 130f95e171..3dbfcce36f 100644
--- a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
+++ b/bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -1,31 +1,31 @@
-<!--
- ============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=========================================================
- -->
-
-<jboss-deployment-structure>
- <deployment>
- <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
- <exclusions>
- <module name="org.apache.log4j" />
- <module name="org.slf4j" />
- <module name="org.slf4j.impl" />
- </exclusions>
- </deployment>
-</jboss-deployment-structure>
-
+<!--
+ ============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=========================================================
+ -->
+
+<jboss-deployment-structure>
+ <deployment>
+ <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
+ <exclusions>
+ <module name="org.apache.log4j" />
+ <module name="org.slf4j" />
+ <module name="org.slf4j.impl" />
+ </exclusions>
+ </deployment>
+</jboss-deployment-structure>
+
diff --git a/bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/jboss-web.xml b/bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000000..a9a263b684
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/jboss-web.xml
@@ -0,0 +1,26 @@
+<?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=========================================================
+ -->
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+<jboss-web>
+ <security-domain>other</security-domain>
+ <context-root>/mso/common</context-root>
+</jboss-web>
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml b/bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/web.xml
index e046d1512d..6c822a9be5 100644
--- a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml
+++ b/bpmn/MSOCommonBPMN/src/main/webapp/WEB-INF/web.xml
@@ -1,102 +1,74 @@
-<?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=========================================================
- -->
-
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
- <display-name>MSO Gamma BPMN Workflow Servlet</display-name>
-
- <!-- <load-on-startup>1</load-on-startup> -->
-
- <servlet>
- <servlet-name>resteasy-servlet</servlet-name>
- <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
- <init-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>org.openecomp.mso.bpmn.gamma.workflow.service.WorkflowResourceApplication</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>resteasy-servlet</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
- <!--
- <context-param>
- <param-name>resteasy.scan</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>resteasy.scan.providers</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>resteasy.scan.resources</param-name>
- <param-value>false</param-value>
- </context-param>
- -->
- <context-param>
- <param-name>mso.configuration</param-name>
- <param-value></param-value>
- </context-param>
-
- <context-param>
- <param-name>log.configuration</param-name>
- <param-value>logback.bpmn.xml</param-value>
- </context-param>
-
- <context-param>
- <param-name>resteasy.resources</param-name>
- <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.bpmn.core.HealthCheckHandler</param-value>
- </context-param>
-
- <filter>
- <filter-name>LogFilter</filter-name>
- <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>LogFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>HTTPBasicAuth</web-resource-name>
- <description>Authentication for Client Apps</description>
- <url-pattern>/workflow/*</url-pattern>
- <http-method>GET</http-method>
- <http-method>POST</http-method>
- </web-resource-collection>
- <auth-constraint>
- <role-name>BPMN-Client</role-name>
- </auth-constraint>
- </security-constraint>
-
- <login-config>
- <auth-method>BASIC</auth-method>
- <realm-name>ApplicationRealm</realm-name>
- </login-config>
-
- <security-role>
- <role-name>BPMN-Client</role-name>
- </security-role>
-
-</web-app>
+<?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=========================================================
+ -->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+ <display-name>MSO Common BPMN Workflow Servlet</display-name>
+ <servlet>
+ <servlet-name>resteasy-servlet</servlet-name>
+ <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+ <init-param>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>org.openecomp.mso.bpmn.common.workflow.service.WorkflowResourceApplication</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>resteasy-servlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+ <context-param>
+ <param-name>mso.configuration</param-name>
+ <param-value>MSO_PROP_TOPOLOGY=topology.properties</param-value>
+ </context-param>
+ <context-param>
+ <param-name>log.configuration</param-name>
+ <param-value>logback.bpmn.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>resteasy.resources</param-name>
+ <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.bpmn.core.HealthCheckHandler</param-value>
+ </context-param>
+ <filter>
+ <filter-name>LogFilter</filter-name>
+ <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>LogFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>HTTPBasicAuth</web-resource-name>
+ <description>Authentication for Client Apps</description>
+ <url-pattern>/workflow/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>BPMN-Client</role-name>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>ApplicationRealm</realm-name>
+ </login-config>
+ <security-role>
+ <role-name>BPMN-Client</role-name>
+ </security-role>
+</web-app> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy
new file mode 100644
index 0000000000..914725ca1f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy
@@ -0,0 +1,306 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import org.openecomp.mso.rest.HttpHeader
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.junit.Before
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+import org.junit.Before;
+import org.junit.Test;
+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
+
+@RunWith(MockitoJUnitRunner.class)
+class AaiUtilTest extends MsoGroovyTest {
+
+ @Test
+ public void testGetVersionDefault() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+ assertEquals('8', version)
+ }
+
+ @Test
+ public void testGetVersionResourceSpecific() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_l3_network_version")).thenReturn('7')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+ assertEquals('7', version)
+ }
+
+ @Test
+ public void testGetVersionFlowSpecific() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_custom_CreateAAIVfModule_aai_version")).thenReturn('6')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_l3_network_version")).thenReturn('7')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+ assertEquals('6', version)
+ }
+
+ @Test(expected=java.lang.Exception.class)
+ public void testGetVersionNotDefined() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+ }
+
+ @Test
+ public void testGetUriDefaultVersion() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getUri(mockExecution, 'l3-network')
+ assertEquals('/aai/v8/network/l3-networks/l3-network', uri)
+ }
+
+ @Test
+ public void testGetUriFlowAndResourceSpecific() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_CreateAAIVfModule_aai_l3_network_uri")).thenReturn('/aai/v6/network/l3-networks/l3-network')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getUri(mockExecution, 'l3-network')
+ assertEquals('/aai/v6/network/l3-networks/l3-network', uri)
+ }
+
+ @Test
+ public void testGetNetworkGenericVnfEndpoint() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_vnf_uri")).thenReturn('/aai/v8/network/generic-vnfs/generic-vnf')
+ when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def endpoint = aaiUtil.getNetworkGenericVnfEndpoint(mockExecution)
+ assertEquals('http://localhost:28090/aai/v8/network/generic-vnfs/generic-vnf', endpoint)
+ }
+
+ @Test
+ public void testGetNetworkGenericVnfUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_vnf_uri")).thenReturn('/aai/v8/network/generic-vnfs/generic-vnf')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getNetworkGenericVnfUri(mockExecution)
+ assertEquals('/aai/v8/network/generic-vnfs/generic-vnf', uri)
+ }
+
+ @Test
+ public void testGetNetworkVpnBindingUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn('/aai/v8/network/vpn-bindings/vpn-binding')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getNetworkVpnBindingUri(mockExecution)
+ assertEquals('/aai/v8/network/vpn-bindings/vpn-binding', uri)
+ }
+
+ @Test
+ public void testGetNetworkPolicyUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_network_policy_uri")).thenReturn('/aai/v8/network/network-policies/network-policy')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getNetworkPolicyUri(mockExecution)
+ assertEquals('/aai/v8/network/network-policies/network-policy', uri)
+ }
+
+ @Test
+ public void testGetNetworkTableReferencesUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_route_table_reference_uri")).thenReturn('/aai/v8/network/route-table-references/route-table-reference')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getNetworkTableReferencesUri(mockExecution)
+ assertEquals('/aai/v8/network/route-table-references/route-table-reference', uri)
+ }
+
+ @Test
+ public void testGetNetworkVceUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vce_uri")).thenReturn('/aai/v8/network/vces/vce')
+
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getNetworkVceUri(mockExecution)
+ assertEquals('/aai/v8/network/vces/vce', uri)
+ }
+
+ @Test
+ public void testGetNetworkL3NetworkUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getNetworkL3NetworkUri(mockExecution)
+ assertEquals('/aai/v8/network/l3-networks/l3-network', uri)
+ }
+
+ @Test
+ public void testGetBusinessCustomerUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_customer_uri")).thenReturn('/aai/v8/business/customers/customer')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getBusinessCustomerUri(mockExecution)
+ assertEquals('/aai/v8/business/customers/customer', uri)
+ }
+
+ @Test
+ public void testGetCloudInfrastructureCloudRegionEndpoint() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic')
+ when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(mockExecution)
+ assertEquals('http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic', uri)
+ }
+
+ @Test
+ public void testGetCloudInfrastructureCloudRegionUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getCloudInfrastructureCloudRegionUri(mockExecution)
+ assertEquals('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic', uri)
+ }
+
+ @Test
+ public void testGetCloudInfrastructureTenantUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_tenant_uri")).thenReturn('/aai/v8/cloud-infrastructure/tenants/tenant')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getCloudInfrastructureTenantUri(mockExecution)
+ assertEquals('/aai/v8/cloud-infrastructure/tenants/tenant', uri)
+ }
+
+ @Test
+ public void testGetSearchNodesQueryUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_nodes_query_uri")).thenReturn('/aai/v8/search/nodes-query')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getSearchNodesQueryUri(mockExecution)
+ assertEquals('/aai/v8/search/nodes-query', uri)
+ }
+
+ @Test
+ public void testGetSearchNodesQueryEndpoint() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_nodes_query_uri")).thenReturn('/aai/v8/search/nodes-query')
+ when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getSearchNodesQueryEndpoint(mockExecution)
+ assertEquals('http://localhost:28090/aai/v8/search/nodes-query', uri)
+ }
+
+ @Test
+ public void testGetSearchGenericQueryUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_query_uri")).thenReturn('/aai/v8/search/generic-query')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def uri = aaiUtil.getSearchGenericQueryUri(mockExecution)
+ assertEquals('/aai/v8/search/generic-query', uri)
+ }
+
+ @Test
+ public void testGetNamespaceFromUri() {
+ ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ CreateAAIVfModule myproc = new CreateAAIVfModule()
+ AaiUtil aaiUtil = new AaiUtil(myproc)
+ def ns = aaiUtil.getNamespaceFromUri('/aai/v6/search/generic-query')
+ assertEquals('http://org.openecomp.aai.inventory/v6', ns)
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy
new file mode 100644
index 0000000000..abb369725e
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy
@@ -0,0 +1,201 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.junit.Assert
+import org.junit.Ignore
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+
+
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.CommonExceptionUtil;
+@RunWith(MockitoJUnitRunner.class)
+import org.junit.Test
+
+class CommonExceptionUtilTest {
+
+ def aotsFault ="""<n1:Fault xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="http://csi.cingular.com/CSI/Namespaces/ATTOneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd" xmlns:cer="http://csi.cingular.com/CSI/Namespaces/ATTOneTicketingSystem/InfrastructureCommon/Types/Public/ErrorResponse.xsd" xsi:schemaLocation="http://csi.cingular.com/CSI/Namespaces/ATTOneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd SoapFault-CDM.xsd">
+ <n1:faultcode>xml:space</n1:faultcode>
+ <n1:faultstring>String</n1:faultstring>
+ <n1:faultactor>http://csi.att.com</n1:faultactor>
+ <n1:detail>
+ <n1:CSIApplicationException>
+ <cer:Response>
+ <cer:code>400</cer:code>
+ <cer:description>bad stuff</cer:description>
+ </cer:Response>
+ <cer:ServiceProviderEntity>
+ <cer:reportingServiceEntity>String</cer:reportingServiceEntity>
+ <cer:faultDate>*** ERROR ***</cer:faultDate>
+ <cer:faultSequenceNumber>String</cer:faultSequenceNumber>
+ <cer:faultLevel>String</cer:faultLevel>
+ <cer:faultCode>String</cer:faultCode>
+ <cer:faultDescription>String</cer:faultDescription>
+ <cer:ServiceProviderRawError>
+ <cer:code>String</cer:code>
+ <cer:description>String</cer:description>
+ <cer:BISError>
+ <cer:code>String</cer:code>
+ <cer:description>String</cer:description>
+ <cer:origination>String</cer:origination>
+ <cer:severity>String</cer:severity>
+ </cer:BISError>
+ </cer:ServiceProviderRawError>
+ </cer:ServiceProviderEntity>
+ </n1:CSIApplicationException>
+ <n1:CSIInternalException>
+ <cer:reportingServiceEntity>String</cer:reportingServiceEntity>
+ <cer:faultDate>*** ERROR ***</cer:faultDate>
+ <cer:faultSequenceNumber>String</cer:faultSequenceNumber>
+ <cer:faultLevel>String</cer:faultLevel>
+ <cer:faultCode>String</cer:faultCode>
+ <cer:faultDescription>String</cer:faultDescription>
+ <cer:cingularErrorCode>String</cer:cingularErrorCode>
+ <cer:cingularErrorDescription>String</cer:cingularErrorDescription>
+ <cer:cingularErrorCategory>String</cer:cingularErrorCategory>
+ </n1:CSIInternalException>
+ </n1:detail>
+</n1:Fault>"""
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ @Ignore
+ public void testMapAAIExceptionTCommonException() {
+
+
+
+ String restFault = """
+ <Fault>
+<requestError>
+<serviceException>
+<messageId>SVC3002</messageId>
+<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
+<variables>
+<variable>PUTcustomer</variable>
+<variable>SubName01</variable>
+<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
+<variable>ERR.5.4.5105</variable>
+</variables>
+</serviceException>
+</requestError>
+</Fault>
+ """
+ def errorString = """<requestError>
+<serviceException>
+<messageId>SVC3002</messageId>
+<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
+<variables>
+<variable>PUTcustomer</variable>
+<variable>SubName01</variable>
+<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
+<variable>ERR.5.4.5105</variable>
+</variables>
+</serviceException>
+</requestError>""" as String
+
+
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ CommonExceptionUtil util = new CommonExceptionUtil()
+ Assert.assertEquals(errorString, util.mapAAIExceptionTCommonException(restFault, mockExecution))
+ }
+
+
+
+
+ @Test
+ public void testBuildException() {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("prefix")).thenReturn("test_")
+ when(mockExecution.getVariable("test_ResponseCode")).thenReturn("400")
+ ArrayList msgVars = new ArrayList()
+ msgVars.add("var1")
+ msgVars.add("var2")
+ when(mockExecution.getVariable("test_errVariables")).thenReturn(msgVars)
+
+
+ CommonExceptionUtil util = new CommonExceptionUtil()
+ String msg = "Bad request"
+ String errorString = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ <tns:serviceException>
+ <tns:messageId>SVC2000</tns:messageId>
+ <tns:text>The following service error occurred: %1. Error code is %2.</tns:text>
+ <tns:variables>var1</tns:variables>
+ <tns:variables>var2</tns:variables>
+ </tns:serviceException>
+</tns:requestError>"""
+ Assert.assertEquals(errorString, util.buildException(msg, mockExecution))
+ }
+
+ @Test
+ public void testMapAOTSExecptionToCommonException() {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("prefix")).thenReturn("test_")
+ when(mockExecution.getVariable("test_ResponseCode")).thenReturn("400")
+
+ CommonExceptionUtil util = new CommonExceptionUtil()
+ String errorString = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ <tns:serviceException>
+ <tns:messageId>SVC2000</tns:messageId>
+ <tns:text>The following service error occurred: %1. Error code is %2.</tns:text>
+ <tns:variables>Received error from AOTS: bad stuff</tns:variables>
+ <tns:variables>400</tns:variables>
+ </tns:serviceException>
+</tns:requestError>"""
+ Assert.assertEquals(errorString, util.mapAOTSExecptionToCommonException(aotsFault, mockExecution))
+ }
+
+
+ @Test
+ public void testParseError() {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ String errorString = "The following service error occurred: %1. Error code is %2."
+ ArrayList msgVars = new ArrayList()
+ msgVars.add("var1")
+ msgVars.add("var2")
+ when(mockExecution.getVariable("prefix")).thenReturn("test_")
+ when(mockExecution.getVariable("test_errTxt")).thenReturn(errorString)
+ when(mockExecution.getVariable("test_errVariables")).thenReturn(msgVars)
+
+ CommonExceptionUtil util = new CommonExceptionUtil()
+
+ Assert.assertEquals("The following service error occurred: var1. Error code is var2.", util.parseError(mockExecution))
+}
+
+
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy
new file mode 100644
index 0000000000..cd70fa9949
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy
@@ -0,0 +1,219 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.junit.runner.RunWith;
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+@RunWith(MockitoJUnitRunner.class)
+class CompleteMsoProcessTest {
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ private String completeMsoProcessRequest = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:ns="http://org.openecomp/mso/request/types/v1" xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <ns:request-information>
+ <ns:request-id>uCPE1020_STUW105_5002</ns:request-id>
+ <ns:request-action>Layer3ServiceActivateRequest</ns:request-action>
+ <ns:request-sub-action>COMPLETE</ns:request-sub-action>
+ <ns:source>OMX</ns:source>
+ <ns:notification-url>http://localhost:28090/CCD/StatusNotification</ns:notification-url>
+ <ns:order-number>10205000</ns:order-number>
+ <ns:order-version>1</ns:order-version>
+ </ns:request-information>
+ <sdncadapterworkflow:mso-bpel-name>UCPELayer3ServiceActivateV1</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+
+ private String completeMsoProcessResponse = """<sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:out>BPEL UCPELayer3ServiceActivateV1 completed</sdncadapterworkflow:out>
+</sdncadapterworkflow:MsoCompletionResponse>"""
+
+
+ @Test
+ public void testPreProcessRequest() {
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("CompleteMsoProcessRequest")).thenReturn(completeMsoProcessRequest)
+
+ CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
+ completeMsoProcess.preProcessRequest(mockExecution)
+
+ /* Initialize all the process request variables in this block */
+ verify(mockExecution).setVariable("prefix","CMSO_")
+ //verify(mockExecution).setVariable("getLayer3ServiceDetailsV1Response","")
+ verify(mockExecution).setVariable("CMSO_request_id","")
+ verify(mockExecution).setVariable("CMSO_notification-url","")
+ verify(mockExecution).setVariable("CMSO_mso-bpel-name","")
+ verify(mockExecution).setVariable("CMSO_request_action","")
+
+ verify(mockExecution).setVariable("CMSO_notification-url-Ok", false)
+ verify(mockExecution).setVariable("CMSO_request_id-Ok", false)
+
+ //updateRequest Adapter process variables
+ verify(mockExecution).setVariable("CMSO_updateRequestResponse", "")
+ verify(mockExecution).setVariable("CMSO_updateRequestResponseCode", "")
+ verify(mockExecution).setVariable("CMSO_updateFinalNotifyAckStatusFailedPayload", "")
+
+ //Set DB adapter variables here
+ verify(mockExecution).setVariable("CMSO_updateDBStatusToSuccessPayload", "")
+ verify(mockExecution).setVariable("CMSO_updateInfraRequestDBPayload", "")
+ verify(mockExecution).setVariable("CMSO_setUpdateDBstatustoSuccessPayload", "")
+
+ //Auth variables
+ verify(mockExecution).setVariable("BasicAuthHeaderValue","")
+
+ //Response variables
+ verify(mockExecution).setVariable("CompletionHandlerResponse","")
+ verify(mockExecution).setVariable("CMSO_ErrorResponse", null)
+ verify(mockExecution).setVariable("CMSO_ResponseCode", "")
+
+ verify(mockExecution).setVariable("CMSO_notification-url-Ok",true)
+ verify(mockExecution).setVariable("CMSO_request_id-Ok",true)
+ verify(mockExecution).setVariable("CMSO_notification-url","http://localhost:28090/CCD/StatusNotification")
+ verify(mockExecution).setVariable("CMSO_request_id","uCPE1020_STUW105_5002")
+ verify(mockExecution).setVariable("CMSO_request_action","Layer3ServiceActivateRequest")
+ verify(mockExecution).setVariable("CMSO_source","OMX")
+
+ }
+
+ @Test
+ public void testpostProcessResponse(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("UCPELayer3ServiceActivateV1")
+
+ CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
+ completeMsoProcess.postProcessResponse(mockExecution)
+
+ verify(mockExecution).setVariable("CompleteMsoProcessResponse", completeMsoProcessResponse)
+ verify(mockExecution).setVariable("CMSO_ResponseCode","200")
+ }
+
+ private String updateDBStatusToSuccessPayload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateStatus>
+ <requestId>testReqId</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <status>COMPLETED</status>
+ </req:updateStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ @Test
+ public void testupdateDBStatusToSuccessPayload(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("CMSO_request_id")).thenReturn("testReqId")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC");
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
+
+ CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
+ completeMsoProcess.updateDBStatusToSuccessPayload(mockExecution)
+
+ verify(mockExecution).setVariable("CMSO_updateDBStatusToSuccessPayload",updateDBStatusToSuccessPayload)
+ }
+
+ private String setUpdateDBstatustoSuccessPayload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>testReqId</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <statusMessage>Resource Completed Successfully</statusMessage>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ @Test
+ public void testsetUpdateDBstatustoSuccessPayload(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("CMSO_request_id")).thenReturn("testReqId")
+ when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("BPEL")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC");
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
+
+ CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
+ completeMsoProcess.setUpdateDBstatustoSuccessPayload(mockExecution)
+
+ verify(mockExecution).setVariable("CMSO_setUpdateDBstatustoSuccessPayload",setUpdateDBstatustoSuccessPayload)
+ }
+
+ private String msoCompletionResponse = """onse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:out>BPEL BPEL-NAME FAILED</sdncadapterworkflow:out>
+</sdncadapterworkflow:MsoCompletionResponse>"""
+
+/*
+ private String msoCompletionResponse = """<sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:out>BPEL BPEL-NAME FAILED</sdncadapterworkflow:out>
+</sdncadapterworkflow:MsoCompletionResponse>"""
+*/
+ @Test
+ public void testbuildDataError(){
+
+ boolean thrown = false;
+ String msg = "Some-Message";
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("BPEL-NAME")
+ when(mockExecution.getVariable("testProcessKey")).thenReturn("CompleteMsoProcess")
+
+ WorkflowException exception = new WorkflowException("CompleteMsoProcess", 500, msg);
+
+ try{
+ CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
+ completeMsoProcess.buildDataError(mockExecution, msg)
+ }
+ catch (BpmnError e){
+ thrown = true;
+ }
+
+
+ verify(mockExecution).setVariable("CompleteMsoProcessResponse",msoCompletionResponse)
+ // Can't seem to figure out how to verify the exception and have spent way too much time on fixing this test case!
+ //verify(mockExecution).setVariable("WorkflowException",exception)
+ assertTrue(thrown);
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtilTest.groovy
new file mode 100644
index 0000000000..a011ebb335
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtilTest.groovy
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.junit.Assert
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+
+import org.junit.Ignore;
+
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+@RunWith(MockitoJUnitRunner.class)
+import org.junit.Test
+
+
+
+class ExceptionUtilTest {
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ public void testMapErrorCode5010(){
+ String msg = "Connect to njcdtl20ew2988:8070 failed: Connection refused: connect"
+ ExceptionUtil util = new ExceptionUtil()
+ Assert.assertEquals("5010",util.MapErrorCode(msg))
+ }
+
+ @Test
+ public void testMapErrorCode5020(){
+ String msg = "Connection timed out"
+ ExceptionUtil util = new ExceptionUtil()
+ Assert.assertEquals("5020",util.MapErrorCode(msg))
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/FalloutHandlerTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/FalloutHandlerTest.groovy
new file mode 100644
index 0000000000..fcc55d0933
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/FalloutHandlerTest.groovy
@@ -0,0 +1,311 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.junit.runner.RunWith;
+import static org.mockito.Mockito.*
+import static org.junit.Assert.*;
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor;
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.MsoUtils;
+import org.openecomp.mso.bpmn.common.scripts.FalloutHandler;
+
+@RunWith(MockitoJUnitRunner.class)
+class FalloutHandlerTest {
+
+ public MsoUtils utils = new MsoUtils()
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ private String falloutHandlerRequest = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" xmlns:ns7="http://org.openecomp/mso/request/types/v1">
+ <ns7:request-information>
+ <ns7:request-id>uCPE1020_STUW105_5002</ns7:request-id>
+ <ns7:request-action>Layer3ServiceActivateRequest</ns7:request-action>
+ <ns7:request-sub-action>CANCEL</ns7:request-sub-action>
+ <ns7:source>OMX</ns7:source>
+ <ns7:order-number>10205000</ns7:order-number>
+ <ns7:order-version>1</ns7:order-version>
+ </ns7:request-information>
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>
+ <sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+
+ private String falloutHandlerResponse = """<workflow:FalloutHandlerResponse xmlns:workflow="http://org.openecomp/mso/workflow/schema/v1">
+ <workflow:out>Fallout Handler Failed</workflow:out>
+</workflow:FalloutHandlerResponse>"""
+
+ @Test
+ public void testPreProcessRequest() {
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("FalloutHandlerRequest")).thenReturn(falloutHandlerRequest)
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC");
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
+
+ FalloutHandler falloutHandler = new FalloutHandler()
+ falloutHandler.preProcessRequest(mockExecution)
+
+ /* Initialize all the process request variables in this block */
+ verify(mockExecution).setVariable("prefix","FH_")
+ //verify(mockExecution).setVariable("getLayer3ServiceDetailsV1Response","")
+
+ //These variables are form the input Message to the BPMN
+ verify(mockExecution).setVariable("FH_request_id","")
+ verify(mockExecution).setVariable("FH_request_action","")
+ verify(mockExecution).setVariable("FH_notification-url","")
+ verify(mockExecution).setVariable("FH_mso-bpel-name","")
+ verify(mockExecution).setVariable("FH_ErrorCode", "")
+ verify(mockExecution).setVariable("FH_ErrorMessage", "")
+
+ verify(mockExecution).setVariable("FH_notification-url-Ok", false)
+ verify(mockExecution).setVariable("FH_request_id-Ok", false)
+
+ //These variables are for Get Mso Aai Password Adapter
+ verify(mockExecution).setVariable("FH_deliveryStatus", true)
+
+ //update Response Status to pending ...Adapter variables
+ verify(mockExecution).setVariable("FH_updateResponseStatusPayload", null)
+ verify(mockExecution).setVariable("FH_updateResponseStatusResponse", null)
+
+ //update Request Gamma ...Adapter variables
+ verify(mockExecution).setVariable("FH_updateRequestGammaPayload", "")
+ verify(mockExecution).setVariable("FH_updateRequestGammaResponse", null)
+ verify(mockExecution).setVariable("FH_updateRequestGammaResponseCode", null)
+
+ //update Request Infra ...Adapter variables
+ verify(mockExecution).setVariable("FH_updateRequestInfraPayload", "")
+ verify(mockExecution).setVariable("FH_updateRequestInfraResponse", null)
+ verify(mockExecution).setVariable("FH_updateRequestInfraResponseCode", null)
+
+ //assign False to success variable
+ verify(mockExecution).setVariable("FH_success", true)
+
+ //Set notify status to Failed variable
+ verify(mockExecution).setVariable("FH_NOTIFY_STATUS", "SUCCESS")
+
+ //Set DB update variable
+ verify(mockExecution).setVariable("FH_updateRequestPayload", "")
+ verify(mockExecution).setVariable("FH_updateRequestResponse", null)
+ verify(mockExecution).setVariable("FH_updateRequestResponseCode", null)
+
+ //Auth variables
+ verify(mockExecution).setVariable("BasicAuthHeaderValue","")
+
+ //Response variables
+ verify(mockExecution).setVariable("FalloutHandlerResponse","")
+ verify(mockExecution).setVariable("FH_ErrorResponse", null)
+ verify(mockExecution).setVariable("FH_ResponseCode", "")
+
+ verify(mockExecution).setVariable("FH_request_id-Ok",true)
+ verify(mockExecution).setVariable("FH_request_id","uCPE1020_STUW105_5002")
+ verify(mockExecution).setVariable("FH_request_action","Layer3ServiceActivateRequest")
+ verify(mockExecution).setVariable("FH_source","OMX")
+ verify(mockExecution).setVariable("FH_ErrorCode","Some Error Code - Fallout Handler")
+ verify(mockExecution).setVariable("FH_ErrorMessage","Some Error Message - Fallout Handler")
+
+ }
+
+ @Test
+ public void testpostProcessResponse(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("FH_success")).thenReturn(false)
+
+ FalloutHandler falloutHandler = new FalloutHandler()
+ falloutHandler.postProcessResponse(mockExecution)
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(4)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadResponseActual = arg2List.get(1)
+
+ assertEquals(falloutHandlerResponse.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
+
+ verify(mockExecution).setVariable("FH_ResponseCode","500")
+ }
+
+ private String updateRequestPayload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateRequest>
+ <requestId>testReqId</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <finalErrorMessage>ErrorMessage</finalErrorMessage>
+ <finalErrorCode>ErrorCode</finalErrorCode>
+ <status>FAILED</status>
+ <responseStatus>NotifyStatus</responseStatus>
+ </req:updateRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ @Test
+ public void testupdateRequestPayload(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
+ when(mockExecution.getVariable("FH_ErrorMessage")).thenReturn("ErrorMessage")
+ when(mockExecution.getVariable("FH_ErrorCode")).thenReturn("ErrorCode")
+ when(mockExecution.getVariable("FH_NOTIFY_STATUS")).thenReturn("NotifyStatus")
+
+ FalloutHandler falloutHandler = new FalloutHandler()
+ falloutHandler.updateRequestPayload(mockExecution)
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadRequestActual = arg2List.get(0)
+
+ assertEquals(updateRequestPayload.replaceAll("\\s+", ""), payloadRequestActual.replaceAll("\\s+", ""))
+ }
+
+ private String updateRequestInfraPayload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>testReqId</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <statusMessage>ErrorMessage</statusMessage>
+ <requestStatus>FAILED</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ @Test
+ public void testupdateRequestInfraPayload(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
+ when(mockExecution.getVariable("FH_ErrorMessage")).thenReturn("ErrorMessage")
+
+ FalloutHandler falloutHandler = new FalloutHandler()
+ falloutHandler.updateRequestInfraPayload(mockExecution)
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadRequestActual = arg2List.get(0)
+
+ assertEquals(updateRequestInfraPayload.replaceAll("\\s+", ""), payloadRequestActual.replaceAll("\\s+", ""))
+ }
+
+ private String updateRequestGammaPayload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateRequest>
+ <requestId>testReqId</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <finalErrorMessage>ErrorMessage</finalErrorMessage>
+ <finalErrorCode>ErrorCode</finalErrorCode>
+ <status>FAILED</status>
+ </req:updateRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ @Test
+ public void testupdateRequestGammaPayload(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
+ when(mockExecution.getVariable("FH_ErrorMessage")).thenReturn("ErrorMessage")
+ when(mockExecution.getVariable("FH_ErrorCode")).thenReturn("ErrorCode")
+
+ FalloutHandler falloutHandler = new FalloutHandler()
+ falloutHandler.updateRequestGammaPayload(mockExecution)
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadRequestActual = arg2List.get(0)
+
+ assertEquals(updateRequestGammaPayload.replaceAll("\\s+", ""), payloadRequestActual.replaceAll("\\s+", ""))
+ }
+
+
+ String updateResponseStatusPayload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateResponseStatus>
+ <requestId>testReqId</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
+ </req:updateResponseStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ @Test
+ public void testupdateResponseStatusPayload(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
+
+ FalloutHandler falloutHandler = new FalloutHandler()
+ falloutHandler.updateResponseStatusPayload(mockExecution)
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadResponseActual = arg2List.get(0)
+
+ assertEquals(updateResponseStatusPayload.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
+ }
+
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoGroovyTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoGroovyTest.groovy
new file mode 100644
index 0000000000..174ca65bfd
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoGroovyTest.groovy
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.mockito.Mockito.*
+
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+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
+
+abstract class MsoGroovyTest {
+
+ protected ExecutionEntity setupMock(String procName) {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn(procName)
+
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn(procName)
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+
+ return mockExecution
+ }
+
+ protected ExecutionEntity setupMockWithPrefix(String procName, String prefix) {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+
+ ProcessEngineServices processEngineServices = mock(ProcessEngineServices.class)
+ RepositoryService repositoryService = mock(RepositoryService.class)
+ ProcessDefinition processDefinition = mock(ProcessDefinition.class)
+
+ when(mockExecution.getProcessEngineServices()).thenReturn(processEngineServices)
+ when(processEngineServices.getRepositoryService()).thenReturn(repositoryService)
+ when(repositoryService.getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(processDefinition)
+ when(processDefinition.getKey()).thenReturn(procName)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ return mockExecution
+ }
+
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtilsTest.groovy
new file mode 100644
index 0000000000..8e109bb6c8
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtilsTest.groovy
@@ -0,0 +1,233 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+// JUnit 4
+import org.junit.Test
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+
+import static groovy.test.GroovyAssert.shouldFail
+import static groovy.test.GroovyAssert.assertTrue
+import static groovy.test.GroovyAssert.assertEquals
+
+import org.openecomp.mso.bpmn.common.scripts.MsoUtils;
+import org.apache.commons.lang3.*
+
+
+class MsoUtilsTest {
+
+ def utils = new MsoUtils()
+ def origXmlResponse = null
+ // Expected rebuilds
+ def expected_buildElements = "<tns2:internet-service-change-details><tns2:internet-evc-speed-value>10</tns2:internet-evc-speed-value><tns2:internet-evc-speed-units>Kbps</tns2:internet-evc-speed-units><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.15</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>2</tns2:request-index><tns2:v4-next-hop-address>192.168.1.16</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.16</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes></tns2:internet-service-change-details>"
+ def expected_rebuildDhcp = "<tns2:dhcp><tns2:v4-dhcp-server-enabled>Y</tns2:v4-dhcp-server-enabled><tns2:v6-dhcp-server-enabled>N</tns2:v6-dhcp-server-enabled><tns2:use-v4-default-pool>Y</tns2:use-v4-default-pool><tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:excluded-v4-address>192.168.1.7</tns2:excluded-v4-address></tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:excluded-v4-address>192.168.1.8</tns2:excluded-v4-address></tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:v4-dhcp-pools><tns2:v4-dhcp-pool-prefix>192.155.2.3</tns2:v4-dhcp-pool-prefix><tns2:v4-dhcp-pool-prefix-length>28</tns2:v4-dhcp-pool-prefix-length><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.5</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.6</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:v4-dhcp-relay-gateway-address>2.2.2.1</tns2:v4-dhcp-relay-gateway-address><tns2:v4-dhcp-relay-next-hop-address>1.1.1.1</tns2:v4-dhcp-relay-next-hop-address></tns2:v4-dhcp-pools><tns2:v4-dhcp-pools><tns2:v4-dhcp-pool-prefix>192.155.2.4</tns2:v4-dhcp-pool-prefix><tns2:v4-dhcp-pool-prefix-length>28</tns2:v4-dhcp-pool-prefix-length><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.6</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.7</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:v4-dhcp-relay-gateway-address>2.2.2.2</tns2:v4-dhcp-relay-gateway-address><tns2:v4-dhcp-relay-next-hop-address>1.1.1.2</tns2:v4-dhcp-relay-next-hop-address></tns2:v4-dhcp-pools><tns2:use-v6-default-pool>N</tns2:use-v6-default-pool><tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:excluded-v6-address>1:5</tns2:excluded-v6-address></tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:excluded-v6-address>1:6</tns2:excluded-v6-address></tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:v6-dhcp-pools><tns2:v6-dhcp-pool-prefix>0:0</tns2:v6-dhcp-pool-prefix><tns2:v6-dhcp-pool-prefix-length>28</tns2:v6-dhcp-pool-prefix-length><tns2:excluded-v6-addresses><tns2:excluded-v6-address>1:1</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:excluded-v6-addresses><tns2:excluded-v6-address>2:2</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:v6-dhcp-relay-gateway-address>3:3</tns2:v6-dhcp-relay-gateway-address><tns2:v6-dhcp-relay-next-hop-address>4:4</tns2:v6-dhcp-relay-next-hop-address></tns2:v6-dhcp-pools><tns2:v6-dhcp-pools><tns2:v6-dhcp-pool-prefix>0:0</tns2:v6-dhcp-pool-prefix><tns2:v6-dhcp-pool-prefix-length>28</tns2:v6-dhcp-pool-prefix-length><tns2:excluded-v6-addresses><tns2:excluded-v6-address>1:1</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:excluded-v6-addresses><tns2:excluded-v6-address>2:2</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:v6-dhcp-relay-gateway-address>3:3</tns2:v6-dhcp-relay-gateway-address><tns2:v6-dhcp-relay-next-hop-address>4:4</tns2:v6-dhcp-relay-next-hop-address></tns2:v6-dhcp-pools></tns2:dhcp>"
+ def expected_rebuildFirewallLite = "<tns2:firewall-lite><tns2:stateful-firewall-lite-v4-enabled>Y</tns2:stateful-firewall-lite-v4-enabled><tns2:stateful-firewall-lite-v6-enabled>N</tns2:stateful-firewall-lite-v6-enabled><tns2:v4-firewall-packet-filters><tns2:v4-firewall-prefix>0.0.0.1</tns2:v4-firewall-prefix><tns2:v4-firewall-prefix-length>1</tns2:v4-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>1</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>1</tns2:port-number></tns2:tcp-ports></tns2:v4-firewall-packet-filters><tns2:v4-firewall-packet-filters><tns2:v4-firewall-prefix>0.0.0.2</tns2:v4-firewall-prefix><tns2:v4-firewall-prefix-length>2</tns2:v4-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>2</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>2</tns2:port-number></tns2:tcp-ports></tns2:v4-firewall-packet-filters><tns2:v6-firewall-packet-filters><tns2:v6-firewall-prefix>:</tns2:v6-firewall-prefix><tns2:v6-firewall-prefix-length>0</tns2:v6-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>3</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>3</tns2:port-number></tns2:tcp-ports></tns2:v6-firewall-packet-filters><tns2:v6-firewall-packet-filters><tns2:v6-firewall-prefix>:</tns2:v6-firewall-prefix><tns2:v6-firewall-prefix-length>1</tns2:v6-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>4</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>4</tns2:port-number></tns2:tcp-ports></tns2:v6-firewall-packet-filters></tns2:firewall-lite>"
+ def expected_rebuildInternetEvcAccess = "<tns2:internet-evc-access-information><tns2:internet-evc-speed-value>8</tns2:internet-evc-speed-value><tns2:internet-evc-speed-units>Mbps</tns2:internet-evc-speed-units><tns2:ip-version>ds</tns2:ip-version></tns2:internet-evc-access-information>"
+ def expected_rebuildInternetServiceChangeDetails = "<tns:internet-service-change-details><tns2:internet-evc-speed-value>10</tns2:internet-evc-speed-value><tns2:internet-evc-speed-units>Kbps</tns2:internet-evc-speed-units><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.15</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>2</tns2:request-index><tns2:v4-next-hop-address>192.168.1.16</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.16</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:2da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:2da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes></tns:internet-service-change-details>"
+ def expected_rebuildL2Home = "<tns2:l2-homing-information><tns2:evc-name>AS/VLXM/003717//SW</tns2:evc-name><tns2:topology>MultiPoint</tns2:topology><tns2:preferred-aic-clli>MTSNJA4LCP1</tns2:preferred-aic-clli></tns2:l2-homing-information>"
+ def expected_rebuildNat = "<tns2:nat><tns2:v4-nat-enabled>Y</tns2:v4-nat-enabled><tns2:v4-nat-mapping-entries><tns2:v4-nat-internal>0.0.0.0</tns2:v4-nat-internal><tns2:v4-nat-next-hop-address>0.0.0.0</tns2:v4-nat-next-hop-address><tns2:v4-nat-external>0.0.0.0</tns2:v4-nat-external></tns2:v4-nat-mapping-entries><tns2:v4-nat-mapping-entries><tns2:v4-nat-internal>0.0.0.1</tns2:v4-nat-internal><tns2:v4-nat-next-hop-address>0.0.0.1</tns2:v4-nat-next-hop-address><tns2:v4-nat-external>0.0.0.1</tns2:v4-nat-external></tns2:v4-nat-mapping-entries></tns2:nat>"
+ def expected_rebuildPat = "<tns2:pat><tns2:v4-pat-enabled>N</tns2:v4-pat-enabled><tns2:use-v4-default-pool>Y</tns2:use-v4-default-pool><tns2:v4-pat-pools><tns2:v4-pat-pool-prefix>192.168.1.44</tns2:v4-pat-pool-prefix><tns2:v4-pat-pool-prefix-length>0</tns2:v4-pat-pool-prefix-length><tns2:v4-pat-pool-next-hop-address>192.168.1.5</tns2:v4-pat-pool-next-hop-address></tns2:v4-pat-pools><tns2:v4-pat-pools><tns2:v4-pat-pool-prefix>192.168.1.45</tns2:v4-pat-pool-prefix><tns2:v4-pat-pool-prefix-length>28</tns2:v4-pat-pool-prefix-length><tns2:v4-pat-pool-next-hop-address>192.168.1.6</tns2:v4-pat-pool-next-hop-address></tns2:v4-pat-pools></tns2:pat>"
+ def expected_rebuildStaticRoutes = "<tns2:static-routes><tns2:v4-static-routes><tns2:v4-static-route-prefix>255.255.252.1</tns2:v4-static-route-prefix><tns2:v4-static-route-prefix-length>28</tns2:v4-static-route-prefix-length><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address></tns2:v4-static-routes><tns2:v4-static-routes><tns2:v4-static-route-prefix>255.255.252.2</tns2:v4-static-route-prefix><tns2:v4-static-route-prefix-length>28</tns2:v4-static-route-prefix-length><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address></tns2:v4-static-routes><tns2:v4-static-routes><tns2:v4-static-route-prefix>255.255.252.3</tns2:v4-static-route-prefix><tns2:v4-static-route-prefix-length>28</tns2:v4-static-route-prefix-length><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address></tns2:v4-static-routes><tns2:v6-static-routes><tns2:v6-static-route-prefix>2001:1890:12e3:2da::</tns2:v6-static-route-prefix><tns2:v6-static-route-prefix-length>28</tns2:v6-static-route-prefix-length><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address></tns2:v6-static-routes><tns2:v6-static-routes><tns2:v6-static-route-prefix>2001:1890:12e3:2da::</tns2:v6-static-route-prefix><tns2:v6-static-route-prefix-length>28</tns2:v6-static-route-prefix-length><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address></tns2:v6-static-routes></tns2:static-routes>"
+ def expected_rebuildUcpeVmsServiceInformation = "<tns2:ucpe-vms-service-information><tns2:transport-service-information><tns2:transport-service-type>AVPN</tns2:transport-service-type><tns2:access-circuit-info><tns2:access-circuit-id>1</tns2:access-circuit-id><tns2:dual-mode>Active</tns2:dual-mode></tns2:access-circuit-info><tns2:access-circuit-info><tns2:access-circuit-id>2</tns2:access-circuit-id><tns2:dual-mode>Standby</tns2:dual-mode></tns2:access-circuit-info></tns2:transport-service-information><tns2:ucpe-information><tns2:ucpe-host-name>hostname</tns2:ucpe-host-name><tns2:ucpe-activation-code>activecode</tns2:ucpe-activation-code><tns2:out-of-band-management-modem>OOB</tns2:out-of-band-management-modem></tns2:ucpe-information><tns2:vnf-list><tns2:vnf-information><tns2:vnf-instance-id>1</tns2:vnf-instance-id><tns2:vnf-sequence-number>1</tns2:vnf-sequence-number><tns2:vnf-type>ZZ</tns2:vnf-type><tns2:vnf-vendor>JUNIPER</tns2:vnf-vendor><tns2:vnf-model>MODEL1</tns2:vnf-model><tns2:vnf-id>1</tns2:vnf-id><tns2:prov-status>1</tns2:prov-status><tns2:operational-state>1</tns2:operational-state><tns2:orchestration-status>1</tns2:orchestration-status><tns2:equipment-role>1</tns2:equipment-role></tns2:vnf-information><tns2:vnf-information><tns2:vnf-instance-id>2</tns2:vnf-instance-id><tns2:vnf-sequence-number>2</tns2:vnf-sequence-number><tns2:vnf-type>HY</tns2:vnf-type><tns2:vnf-vendor>JUNIPER</tns2:vnf-vendor><tns2:vnf-model>MODEL2</tns2:vnf-model><tns2:vnf-id>2</tns2:vnf-id><tns2:prov-status>2</tns2:prov-status><tns2:operational-state>2</tns2:operational-state><tns2:orchestration-status>2</tns2:orchestration-status><tns2:equipment-role>2</tns2:equipment-role></tns2:vnf-information></tns2:vnf-list></tns2:ucpe-vms-service-information>"
+ def expected_rebuildVrLan = "<tns2:vr-lan><tns2:routing-protocol>none</tns2:routing-protocol><tns2:vr-lan-interface><tns2:vr-designation>primary</tns2:vr-designation><tns2:v4-vr-lan-prefix>10.192.27.254</tns2:v4-vr-lan-prefix><tns2:v4-vr-lan-prefix-length>24</tns2:v4-vr-lan-prefix-length><tns2:v6-vr-lan-prefix>2620:0:10d0:f:ffff:ffff:ffff:fffe</tns2:v6-vr-lan-prefix><tns2:v6-vr-lan-prefix-length>64</tns2:v6-vr-lan-prefix-length><tns2:v4-vce-loopback-address>162.200.3.144</tns2:v4-vce-loopback-address><tns2:v6-vce-wan-address>2001:1890:12e3:2da::</tns2:v6-vce-wan-address><tns2:v4-public-lan-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.2</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.1</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.72</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.71</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.68</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.67</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes></tns2:v4-public-lan-prefixes><tns2:v6-public-lan-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:2da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:3da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:4da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes></tns2:v6-public-lan-prefixes><tns2:dhcp><tns2:v4-dhcp-server-enabled>Y</tns2:v4-dhcp-server-enabled><tns2:v6-dhcp-server-enabled>N</tns2:v6-dhcp-server-enabled><tns2:use-v4-default-pool>Y</tns2:use-v4-default-pool><tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:excluded-v4-address>192.168.1.7</tns2:excluded-v4-address></tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:excluded-v4-address>192.168.1.8</tns2:excluded-v4-address></tns2:excluded-v4-dhcp-addresses-from-default-pool><tns2:v4-dhcp-pools><tns2:v4-dhcp-pool-prefix>192.155.2.3</tns2:v4-dhcp-pool-prefix><tns2:v4-dhcp-pool-prefix-length>28</tns2:v4-dhcp-pool-prefix-length><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.5</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.6</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:v4-dhcp-relay-gateway-address>2.2.2.1</tns2:v4-dhcp-relay-gateway-address><tns2:v4-dhcp-relay-next-hop-address>1.1.1.1</tns2:v4-dhcp-relay-next-hop-address></tns2:v4-dhcp-pools><tns2:v4-dhcp-pools><tns2:v4-dhcp-pool-prefix>192.155.2.4</tns2:v4-dhcp-pool-prefix><tns2:v4-dhcp-pool-prefix-length>28</tns2:v4-dhcp-pool-prefix-length><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.6</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:excluded-v4-addresses><tns2:excluded-v4-address>192.168.1.7</tns2:excluded-v4-address></tns2:excluded-v4-addresses><tns2:v4-dhcp-relay-gateway-address>2.2.2.2</tns2:v4-dhcp-relay-gateway-address><tns2:v4-dhcp-relay-next-hop-address>1.1.1.2</tns2:v4-dhcp-relay-next-hop-address></tns2:v4-dhcp-pools><tns2:use-v6-default-pool>N</tns2:use-v6-default-pool><tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:excluded-v6-address>1:5</tns2:excluded-v6-address></tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:excluded-v6-address>1:6</tns2:excluded-v6-address></tns2:excluded-v6-dhcp-addresses-from-default-pool><tns2:v6-dhcp-pools><tns2:v6-dhcp-pool-prefix>0:0</tns2:v6-dhcp-pool-prefix><tns2:v6-dhcp-pool-prefix-length>28</tns2:v6-dhcp-pool-prefix-length><tns2:excluded-v6-addresses><tns2:excluded-v6-address>1:1</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:excluded-v6-addresses><tns2:excluded-v6-address>2:2</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:v6-dhcp-relay-gateway-address>3:3</tns2:v6-dhcp-relay-gateway-address><tns2:v6-dhcp-relay-next-hop-address>4:4</tns2:v6-dhcp-relay-next-hop-address></tns2:v6-dhcp-pools><tns2:v6-dhcp-pools><tns2:v6-dhcp-pool-prefix>0:0</tns2:v6-dhcp-pool-prefix><tns2:v6-dhcp-pool-prefix-length>28</tns2:v6-dhcp-pool-prefix-length><tns2:excluded-v6-addresses><tns2:excluded-v6-address>1:1</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:excluded-v6-addresses><tns2:excluded-v6-address>2:2</tns2:excluded-v6-address></tns2:excluded-v6-addresses><tns2:v6-dhcp-relay-gateway-address>3:3</tns2:v6-dhcp-relay-gateway-address><tns2:v6-dhcp-relay-next-hop-address>4:4</tns2:v6-dhcp-relay-next-hop-address></tns2:v6-dhcp-pools></tns2:dhcp><tns2:pat><tns2:v4-pat-enabled>N</tns2:v4-pat-enabled><tns2:use-v4-default-pool>Y</tns2:use-v4-default-pool><tns2:v4-pat-pools><tns2:v4-pat-pool-prefix>192.168.1.44</tns2:v4-pat-pool-prefix><tns2:v4-pat-pool-prefix-length>0</tns2:v4-pat-pool-prefix-length><tns2:v4-pat-pool-next-hop-address>192.168.1.5</tns2:v4-pat-pool-next-hop-address></tns2:v4-pat-pools><tns2:v4-pat-pools><tns2:v4-pat-pool-prefix>192.168.1.45</tns2:v4-pat-pool-prefix><tns2:v4-pat-pool-prefix-length>28</tns2:v4-pat-pool-prefix-length><tns2:v4-pat-pool-next-hop-address>192.168.1.6</tns2:v4-pat-pool-next-hop-address></tns2:v4-pat-pools></tns2:pat><tns2:nat><tns2:v4-nat-enabled>Y</tns2:v4-nat-enabled><tns2:v4-nat-mapping-entries><tns2:v4-nat-internal>0.0.0.0</tns2:v4-nat-internal><tns2:v4-nat-next-hop-address>0.0.0.0</tns2:v4-nat-next-hop-address><tns2:v4-nat-external>0.0.0.0</tns2:v4-nat-external></tns2:v4-nat-mapping-entries><tns2:v4-nat-mapping-entries><tns2:v4-nat-internal>0.0.0.1</tns2:v4-nat-internal><tns2:v4-nat-next-hop-address>0.0.0.1</tns2:v4-nat-next-hop-address><tns2:v4-nat-external>0.0.0.1</tns2:v4-nat-external></tns2:v4-nat-mapping-entries></tns2:nat><tns2:firewall-lite><tns2:stateful-firewall-lite-v4-enabled>Y</tns2:stateful-firewall-lite-v4-enabled><tns2:stateful-firewall-lite-v6-enabled>N</tns2:stateful-firewall-lite-v6-enabled><tns2:v4-firewall-packet-filters><tns2:v4-firewall-prefix>0.0.0.1</tns2:v4-firewall-prefix><tns2:v4-firewall-prefix-length>1</tns2:v4-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>1</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>1</tns2:port-number></tns2:tcp-ports></tns2:v4-firewall-packet-filters><tns2:v4-firewall-packet-filters><tns2:v4-firewall-prefix>0.0.0.2</tns2:v4-firewall-prefix><tns2:v4-firewall-prefix-length>2</tns2:v4-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>2</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>2</tns2:port-number></tns2:tcp-ports></tns2:v4-firewall-packet-filters><tns2:v6-firewall-packet-filters><tns2:v6-firewall-prefix>:</tns2:v6-firewall-prefix><tns2:v6-firewall-prefix-length>0</tns2:v6-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>3</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>3</tns2:port-number></tns2:tcp-ports></tns2:v6-firewall-packet-filters><tns2:v6-firewall-packet-filters><tns2:v6-firewall-prefix>:</tns2:v6-firewall-prefix><tns2:v6-firewall-prefix-length>1</tns2:v6-firewall-prefix-length><tns2:allow-icmp-ping>Y</tns2:allow-icmp-ping><tns2:udp-ports><tns2:port-number>4</tns2:port-number></tns2:udp-ports><tns2:tcp-ports><tns2:port-number>4</tns2:port-number></tns2:tcp-ports></tns2:v6-firewall-packet-filters></tns2:firewall-lite><tns2:static-routes><tns2:v4-static-routes><tns2:v4-static-route-prefix>255.255.252.1</tns2:v4-static-route-prefix><tns2:v4-static-route-prefix-length>28</tns2:v4-static-route-prefix-length><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address></tns2:v4-static-routes><tns2:v4-static-routes><tns2:v4-static-route-prefix>255.255.252.2</tns2:v4-static-route-prefix><tns2:v4-static-route-prefix-length>28</tns2:v4-static-route-prefix-length><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address></tns2:v4-static-routes><tns2:v4-static-routes><tns2:v4-static-route-prefix>255.255.252.3</tns2:v4-static-route-prefix><tns2:v4-static-route-prefix-length>28</tns2:v4-static-route-prefix-length><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address></tns2:v4-static-routes><tns2:v6-static-routes><tns2:v6-static-route-prefix>2001:1890:12e3:2da::</tns2:v6-static-route-prefix><tns2:v6-static-route-prefix-length>28</tns2:v6-static-route-prefix-length><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address></tns2:v6-static-routes><tns2:v6-static-routes><tns2:v6-static-route-prefix>2001:1890:12e3:2da::</tns2:v6-static-route-prefix><tns2:v6-static-route-prefix-length>28</tns2:v6-static-route-prefix-length><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address></tns2:v6-static-routes></tns2:static-routes></tns2:vr-lan-interface></tns2:vr-lan>"
+ def expected_rebuildVrLanInterfacePartial = "<tns2:vr-designation>primary</tns2:vr-designation><tns2:v4-vr-lan-prefix>10.192.27.254</tns2:v4-vr-lan-prefix><tns2:v4-vr-lan-prefix-length>24</tns2:v4-vr-lan-prefix-length><tns2:v6-vr-lan-prefix>2620:0:10d0:f:ffff:ffff:ffff:fffe</tns2:v6-vr-lan-prefix><tns2:v6-vr-lan-prefix-length>64</tns2:v6-vr-lan-prefix-length><tns2:v4-vce-loopback-address>162.200.3.144</tns2:v4-vce-loopback-address><tns2:v6-vce-wan-address>2001:1890:12e3:2da::</tns2:v6-vce-wan-address><tns2:v4-public-lan-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.2</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.1</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.72</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.71</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.68</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.67</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v4-next-hop-address>192.168.1.15</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.15</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes><tns2:t-provided-v4-lan-public-prefixes><tns2:request-index>2</tns2:request-index><tns2:v4-next-hop-address>192.168.1.16</tns2:v4-next-hop-address><tns2:v4-lan-public-prefix>192.168.1.16</tns2:v4-lan-public-prefix><tns2:v4-lan-public-prefix-length>28</tns2:v4-lan-public-prefix-length></tns2:t-provided-v4-lan-public-prefixes></tns2:v4-public-lan-prefixes><tns2:v6-public-lan-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:2da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:3da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:4da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:2da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes><tns2:t-provided-v6-lan-public-prefixes><tns2:request-index>1</tns2:request-index><tns2:v6-next-hop-address>2001:1890:12e3:2da::</tns2:v6-next-hop-address><tns2:v6-lan-public-prefix>2001:1890:12e3:2da::</tns2:v6-lan-public-prefix><tns2:v6-lan-public-prefix-length>28</tns2:v6-lan-public-prefix-length></tns2:t-provided-v6-lan-public-prefixes></tns2:v6-public-lan-prefixes>"
+
+ @Before
+ public void setUp() {
+ def responseAsString = getFile("sdncadaptercallbackrequest.xml")
+ def varrequestData=utils.getNodeText(responseAsString,"RequestData")
+ //def varResponseListData = StringEscapeUtils.unescapeXml(varrequestData)
+ def varResponseListData = varrequestData.replace("&", "&amp;")
+ origXmlResponse = utils.getNodeXml(varResponseListData, "layer3-service-list").drop(38).trim()
+
+ }
+
+ @Test
+ public void testBuildL2Home() {
+ def rebuildL2Home = utils.buildL2HomingInformation(origXmlResponse)
+ println " rebuildL2Home: "
+ println " actual - " + rebuildL2Home
+ println " expected - " + expected_rebuildL2Home
+ assertEquals("rebuildL2Home - expected vs actual", expected_rebuildL2Home, rebuildL2Home)
+ }
+
+ @Test
+ public void testBuildInternetEvcAccess() {
+ def rebuildInternetEvcAccess = utils.buildInternetEvcAccessInformation(origXmlResponse)
+ println " rebuildInternetEvcAccess: "
+ println " actual - " + rebuildInternetEvcAccess
+ println " expected - " + expected_rebuildInternetEvcAccess
+ assertEquals("rebuildInternetEvcAccess - expected vs actual", expected_rebuildInternetEvcAccess, rebuildInternetEvcAccess)
+ }
+
+ @Test
+ public void testBuildInternetServiceChangeDetails() {
+ def rebuildInternetServiceChangeDetails = utils.buildInternetServiceChangeDetails(origXmlResponse)
+ println " rebuildInternetServiceChangeDetails: "
+ println " actual - " + rebuildInternetServiceChangeDetails
+ println " expected - " + expected_rebuildInternetServiceChangeDetails
+ assertEquals("rebuildInternetServiceChangeDetails - expected vs actual", expected_rebuildInternetServiceChangeDetails, rebuildInternetServiceChangeDetails)
+ }
+
+ // Coming v100
+ @Test
+ @Ignore
+ public void testBuildUcpeVmsServiceInformation() {
+ def rebuildUcpeVmsServiceInformation = utils.buildUcpeVmsServiceInformation(origXmlResponse)
+ println " rebuildUcpeVmsServiceInformation: "
+ println " actual - " + rebuildUcpeVmsServiceInformation
+ println " expected - " + expected_rebuildUcpeVmsServiceInformation
+ assertEquals("rebuildUcpeVmsServiceInformation - expected vs actual", expected_rebuildUcpeVmsServiceInformation, rebuildUcpeVmsServiceInformation)
+ }
+
+ @Test
+ public void testBuildElements() {
+ // testing utility codes: buildElements() & buildElementsUnblunded()
+ def internetServiceChangeDetails = utils.getNodeXml(origXmlResponse, "internet-service-change-details").drop(38).trim()
+ def buildElements = ''
+ buildElements = "<tns2:internet-service-change-details>"
+ buildElements += utils.buildElements(internetServiceChangeDetails, ["internet-evc-speed-value"], "")
+ buildElements += utils.buildElements(internetServiceChangeDetails, ["internet-evc-speed-units"], "")
+ def tProvidedV4LanPublicPrefixesChangesList = ["request-index", "v4-next-hop-address", "v4-lan-public-prefix", "v4-lan-public-prefix-length"]
+ buildElements += utils.buildElementsUnbounded(internetServiceChangeDetails, tProvidedV4LanPublicPrefixesChangesList, "t-provided-v4-lan-public-prefixes")
+ buildElements += "</tns2:internet-service-change-details>"
+ println " buildElements: "
+ println " actual - " + buildElements
+ println " expected - " + expected_buildElements
+ assertEquals("buildElements - expected vs actual", expected_buildElements, buildElements)
+ }
+
+ @Test
+ public void testBuildVrLan() {
+ def rebuildVrLan = utils.buildVrLan(origXmlResponse)
+ println " rebuildVrLans: "
+ println " actual - " + rebuildVrLan
+ println " expected - " + expected_rebuildVrLan
+ assertEquals("rebuildVrLan - expected vs actual", expected_rebuildVrLan, rebuildVrLan)
+ }
+
+ @Test
+ public void testBuildVrLanInterfacePartial() {
+ def rebuildVrLanInterfacePartial = utils.buildVrLanInterfacePartial(origXmlResponse)
+ println " rebuildVrLanInterfacePartial: "
+ println " actual - " + rebuildVrLanInterfacePartial
+ println " expected - " + expected_rebuildVrLanInterfacePartial
+ assertEquals("rebuildVrLanInterfacePartial - expected vs actual", expected_rebuildVrLanInterfacePartial, rebuildVrLanInterfacePartial)
+ }
+
+ @Test
+ public void testBuildDhcp() {
+ def rebuildDhcp = utils.buildDhcp(origXmlResponse)
+ println " rebuildDhcp: "
+ println " actual - " + rebuildDhcp
+ println " expected - " + expected_rebuildDhcp
+ assertEquals("rebuildDhcp - expected vs actual", expected_rebuildDhcp, rebuildDhcp)
+ }
+
+ @Test
+ public void testBuildPat() {
+ def rebuildPat = utils.buildPat(origXmlResponse)
+ println " rebuildPat: "
+ println " actual - " + rebuildPat
+ println " expected - " + expected_rebuildPat
+ assertEquals("rebuildPat - expected vs actual", expected_rebuildPat, rebuildPat)
+ }
+
+ @Test
+ public void testBuildNat() {
+ def rebuildNat = utils.buildNat(origXmlResponse)
+ println " rebuildNat: "
+ println " actual - " + rebuildNat
+ println " expected - " + expected_rebuildNat
+ assertEquals("rebuildNat - expected vs actual", expected_rebuildNat, rebuildNat)
+ }
+
+ @Test
+ public void testBuildFirewallLite() {
+ def rebuildFirewallLite = utils.buildFirewallLite(origXmlResponse)
+ println " rebuildFirewallLite: "
+ println " actual - " + rebuildFirewallLite
+ println " expected - " + expected_rebuildFirewallLite
+ assertEquals("rebuildFirewallLite - expected vs actual", expected_rebuildFirewallLite, rebuildFirewallLite)
+ }
+
+ @Test
+ public void testBuildStaticRoutes() {
+ def rebuildStaticRoutes = utils.buildStaticRoutes(origXmlResponse)
+ println " rebuildStaticRoutes: "
+ println " actual - " + rebuildStaticRoutes
+ println " expected - " + expected_rebuildStaticRoutes
+ assertEquals("rebuildStaticRoutes - expected vs actual", expected_rebuildStaticRoutes, rebuildStaticRoutes)
+ }
+
+ @Test
+ public void testGetBasicAuth(){
+ def encodedAuth = utils.getBasicAuth("3E3CFA7BE2F6107AAD4AAA65F8976690","07a7159d3bf51a0e53be7a8f89699be7")
+ assertEquals("Basic bXlTdHJpbmc=", encodedAuth)
+ }
+
+ @Test
+ public void testEncrypt(){
+ def encrypted = utils.encrypt("myString","07a7159d3bf51a0e53be7a8f89699be7")
+ assertEquals("3E3CFA7BE2F6107AAD4AAA65F8976690", encrypted)
+
+ //use to get value for urn properties
+ //println(utils.encrypt("password"))
+ }
+
+ @Test
+ public void testDecrypt(){
+ def decrypted = utils.decrypt("3E3CFA7BE2F6107AAD4AAA65F8976690", "07a7159d3bf51a0e53be7a8f89699be7")
+ assertEquals("myString", decrypted)
+ }
+
+ @Test
+ public void testGetPBGFList(){
+ def responseAsString = getFile("sdncDeleteResponse.xml")
+ def nodes = utils.getPBGFList("true", responseAsString)
+ //assertEquals(2, nodes.size())
+ while(!nodes.empty){
+ def myBGFXML = nodes.remove(0)
+ def myBGF= new XmlSlurper().parseText(myBGFXML)
+ println "borderElmtId: " + myBGF.'border-element-id'
+ println "vlanid: " + myBGF.'vlan-id' +"\n"
+ }
+ }
+
+ public String getFile(String fileName) {
+ def SLASH = File.separator
+ def pathBase = ' '
+ def fileAsString = ''
+ try {
+ pathBase = new File(".").getCanonicalPath()
+ //println "pathBase " + pathBase + "${SLASH}src${SLASH}test${SLASH}resources${SLASH}${fileName}"
+ fileAsString = new File(pathBase, "${SLASH}src${SLASH}test${SLASH}resources${SLASH}${fileName}").getText()
+ } catch (Exception ex) {
+ println " *** getFile error: " + ex.getStackTrace()
+ } finally {
+ return fileAsString
+ }
+ }
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterTest.groovy
new file mode 100644
index 0000000000..014dba6984
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/SDNCAdapterTest.groovy
@@ -0,0 +1,948 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.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.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapter;
+
+import org.openecomp.mso.bpmn.mock.FileUtil
+
+@RunWith(MockitoJUnitRunner.class)
+public class SDNCAdapterTest {
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ System.setProperty("jboss.qualified.host.name","myhost.com")
+ }
+
+
+ def workflowResponse = """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:CallbackHeader>
+ <tag0:RequestId>testRequestId</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+ </tag0:CallbackHeader>
+ <tag0:RequestData xsi:type="xs:string"> &lt;layer3-service-list xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;service-status&gt;
+ &lt;rpc-name&gt;service-configuration-operation&lt;/rpc-name&gt;
+ &lt;rpc-action&gt;activate&lt;/rpc-action&gt;
+ &lt;request-status&gt;synccomplete&lt;/request-status&gt;
+ &lt;final-indicator&gt;N&lt;/final-indicator&gt;
+ &lt;l3sdn-action&gt;Layer3ServiceActivateRequest&lt;/l3sdn-action&gt;
+ &lt;l3sdn-subaction&gt;SUPP&lt;/l3sdn-subaction&gt;
+ &lt;response-timestamp&gt;2015-04-28T21:32:11.386Z&lt;/response-timestamp&gt;
+ &lt;/service-status&gt;
+ &lt;service-data&gt;
+ &lt;internet-evc-access-information&gt;
+ &lt;ip-version&gt;ds&lt;/ip-version&gt;
+ &lt;internet-evc-speed-value&gt;8&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Mbps&lt;/internet-evc-speed-units&gt;
+ &lt;/internet-evc-access-information&gt;
+ &lt;vr-lan xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;vr-lan-interface&gt;
+ &lt;static-routes&gt;
+ &lt;v6-static-routes&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-static-route-prefix&gt;2001:1890:12e3:2da::&lt;/v6-static-route-prefix&gt;
+ &lt;v6-static-route-prefix-length&gt;28&lt;/v6-static-route-prefix-length&gt;
+ &lt;/v6-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.1&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;v6-static-routes&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-static-route-prefix&gt;2001:1890:12e3:2da::&lt;/v6-static-route-prefix&gt;
+ &lt;v6-static-route-prefix-length&gt;28&lt;/v6-static-route-prefix-length&gt;
+ &lt;/v6-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.2&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.3&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;/static-routes&gt;
+ &lt;dhcp&gt;
+ &lt;v6-dhcp-server-enabled&gt;N&lt;/v6-dhcp-server-enabled&gt;
+ &lt;v4-dhcp-server-enabled&gt;Y&lt;/v4-dhcp-server-enabled&gt;
+ &lt;use-v6-default-pool&gt;N&lt;/use-v6-default-pool&gt;
+ &lt;excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-address&gt;192.168.1.7&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-address&gt;192.168.1.8&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;v4-dhcp-pools&gt;
+ &lt;v4-dhcp-relay-next-hop-address&gt;1.1.1.1&lt;/v4-dhcp-relay-next-hop-address&gt;
+ &lt;v4-dhcp-pool-prefix-length&gt;28&lt;/v4-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.5&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-relay-gateway-address&gt;2.2.2.1&lt;/v4-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.6&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-pool-prefix&gt;192.155.2.3&lt;/v4-dhcp-pool-prefix&gt;
+ &lt;/v4-dhcp-pools&gt;
+ &lt;v4-dhcp-pools&gt;
+ &lt;v4-dhcp-relay-next-hop-address&gt;1.1.1.2&lt;/v4-dhcp-relay-next-hop-address&gt;
+ &lt;v4-dhcp-pool-prefix-length&gt;28&lt;/v4-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.6&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-relay-gateway-address&gt;2.2.2.2&lt;/v4-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.7&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-pool-prefix&gt;192.155.2.4&lt;/v4-dhcp-pool-prefix&gt;
+ &lt;/v4-dhcp-pools&gt;
+ &lt;use-v4-default-pool&gt;Y&lt;/use-v4-default-pool&gt;
+ &lt;excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-address&gt;1:5&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-address&gt;1:6&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;v6-dhcp-pools&gt;
+ &lt;v6-dhcp-relay-next-hop-address&gt;4:4&lt;/v6-dhcp-relay-next-hop-address&gt;
+ &lt;v6-dhcp-pool-prefix-length&gt;28&lt;/v6-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;1:1&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-relay-gateway-address&gt;3:3&lt;/v6-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;2:2&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-pool-prefix&gt;0:0&lt;/v6-dhcp-pool-prefix&gt;
+ &lt;/v6-dhcp-pools&gt;
+ &lt;v6-dhcp-pools&gt;
+ &lt;v6-dhcp-relay-next-hop-address&gt;4:4&lt;/v6-dhcp-relay-next-hop-address&gt;
+ &lt;v6-dhcp-pool-prefix-length&gt;28&lt;/v6-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;1:1&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-relay-gateway-address&gt;3:3&lt;/v6-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;2:2&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-pool-prefix&gt;0:0&lt;/v6-dhcp-pool-prefix&gt;
+ &lt;/v6-dhcp-pools&gt;
+ &lt;/dhcp&gt;
+ &lt;firewall-lite&gt;
+ &lt;stateful-firewall-lite-v6-enabled&gt;N&lt;/stateful-firewall-lite-v6-enabled&gt;
+ &lt;stateful-firewall-lite-v4-enabled&gt;Y&lt;/stateful-firewall-lite-v4-enabled&gt;
+ &lt;v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-prefix&gt;0.0.0.1&lt;/v4-firewall-prefix&gt;
+ &lt;v4-firewall-prefix-length&gt;1&lt;/v4-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;1&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;1&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-prefix&gt;0.0.0.2&lt;/v4-firewall-prefix&gt;
+ &lt;v4-firewall-prefix-length&gt;2&lt;/v4-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;2&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;2&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v4-firewall-packet-filters&gt;
+ &lt;v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-prefix&gt;:&lt;/v6-firewall-prefix&gt;
+ &lt;v6-firewall-prefix-length&gt;0&lt;/v6-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;3&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;3&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-prefix&gt;:&lt;/v6-firewall-prefix&gt;
+ &lt;v6-firewall-prefix-length&gt;1&lt;/v6-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;4&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;4&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v6-firewall-packet-filters&gt;
+ &lt;/firewall-lite&gt;
+ &lt;pat&gt;
+ &lt;v4-pat-pools&gt;
+ &lt;v4-pat-pool-prefix&gt;192.168.1.44&lt;/v4-pat-pool-prefix&gt;
+ &lt;v4-pat-pool-next-hop-address&gt;192.168.1.5&lt;/v4-pat-pool-next-hop-address&gt;
+ &lt;v4-pat-pool-prefix-length&gt;0&lt;/v4-pat-pool-prefix-length&gt;
+ &lt;/v4-pat-pools&gt;
+ &lt;use-v4-default-pool&gt;Y&lt;/use-v4-default-pool&gt;
+ &lt;v4-pat-enabled&gt;N&lt;/v4-pat-enabled&gt;
+ &lt;v4-pat-pools&gt;
+ &lt;v4-pat-pool-prefix&gt;192.168.1.45&lt;/v4-pat-pool-prefix&gt;
+ &lt;v4-pat-pool-next-hop-address&gt;192.168.1.6&lt;/v4-pat-pool-next-hop-address&gt;
+ &lt;v4-pat-pool-prefix-length&gt;28&lt;/v4-pat-pool-prefix-length&gt;
+ &lt;/v4-pat-pools&gt;
+ &lt;/pat&gt;
+ &lt;nat&gt;
+ &lt;v4-nat-enabled&gt;Y&lt;/v4-nat-enabled&gt;
+ &lt;v4-nat-mapping-entries&gt;
+ &lt;v4-nat-internal&gt;0.0.0.0&lt;/v4-nat-internal&gt;
+ &lt;v4-nat-next-hop-address&gt;0.0.0.0&lt;/v4-nat-next-hop-address&gt;
+ &lt;v4-nat-external&gt;0.0.0.0&lt;/v4-nat-external&gt;
+ &lt;/v4-nat-mapping-entries&gt;
+ &lt;v4-nat-mapping-entries&gt;
+ &lt;v4-nat-internal&gt;0.0.0.1&lt;/v4-nat-internal&gt;
+ &lt;v4-nat-next-hop-address&gt;0.0.0.1&lt;/v4-nat-next-hop-address&gt;
+ &lt;v4-nat-external&gt;0.0.0.1&lt;/v4-nat-external&gt;
+ &lt;/v4-nat-mapping-entries&gt;
+ &lt;/nat&gt;
+ &lt;vr-designation&gt;primary&lt;/vr-designation&gt;
+ &lt;v4-vce-loopback-address&gt;162.200.3.144&lt;/v4-vce-loopback-address&gt;
+ &lt;v6-vr-lan-prefix-length&gt;64&lt;/v6-vr-lan-prefix-length&gt;
+ &lt;v6-vce-wan-address&gt;2001:1890:12e3:2da::&lt;/v6-vce-wan-address&gt;
+ &lt;v6-vr-lan-prefix&gt;2620:0:10d0:f:ffff:ffff:ffff:fffe&lt;/v6-vr-lan-prefix&gt;
+ &lt;v4-vr-lan-prefix-length&gt;24&lt;/v4-vr-lan-prefix-length&gt;
+ &lt;v4-vr-lan-prefix&gt;10.192.27.254&lt;/v4-vr-lan-prefix&gt;
+ &lt;v4-public-lan-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.2&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.1&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.72&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.71&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.68&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.67&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;/v4-public-lan-prefixes&gt;
+ &lt;v6-public-lan-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:3da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:4da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;/v6-public-lan-prefixes&gt;
+ &lt;/vr-lan-interface&gt;
+ &lt;routing-protocol&gt;none&lt;/routing-protocol&gt;
+ &lt;/vr-lan&gt;
+&lt;ucpe-vms-service-information&gt;
+ &lt;transport-service-information&gt;
+ &lt;transport-service-type&gt;AVPN&lt;/transport-service-type&gt;
+ &lt;access-circuit-info&gt;
+ &lt;access-circuit-id&gt;1&lt;/access-circuit-id&gt;
+ &lt;dual-mode&gt;Active&lt;/dual-mode&gt;
+ &lt;/access-circuit-info&gt;
+ &lt;access-circuit-info&gt;
+ &lt;access-circuit-id&gt;2&lt;/access-circuit-id&gt;
+ &lt;dual-mode&gt;Standby&lt;/dual-mode&gt;
+ &lt;/access-circuit-info&gt;
+ &lt;/transport-service-information&gt;
+ &lt;ucpe-information&gt;
+ &lt;ucpe-host-name&gt;hostname&lt;/ucpe-host-name&gt;
+ &lt;ucpe-activation-code&gt;activecode&lt;/ucpe-activation-code&gt;
+ &lt;out-of-band-management-modem&gt;OOB&lt;/out-of-band-management-modem&gt;
+ &lt;/ucpe-information&gt;
+ &lt;vnf-list&gt;
+ &lt;vnf-information&gt;
+ &lt;vnf-instance-id&gt;1&lt;/vnf-instance-id&gt;
+ &lt;vnf-sequence-number&gt;1&lt;/vnf-sequence-number&gt;
+ &lt;vnf-type&gt;ZZ&lt;/vnf-type&gt;
+ &lt;vnf-vendor&gt;JUNIPER&lt;/vnf-vendor&gt;
+ &lt;vnf-model&gt;MODEL1&lt;/vnf-model&gt;
+ &lt;vnf-id&gt;1&lt;/vnf-id&gt;
+ &lt;prov-status&gt;1&lt;/prov-status&gt;
+ &lt;operational-state&gt;1&lt;/operational-state&gt;
+ &lt;orchestration-status&gt;1&lt;/orchestration-status&gt;
+ &lt;equipment-role&gt;1&lt;/equipment-role&gt;
+ &lt;/vnf-information&gt;
+ &lt;vnf-information&gt;
+ &lt;vnf-instance-id&gt;2&lt;/vnf-instance-id&gt;
+ &lt;vnf-sequence-number&gt;2&lt;/vnf-sequence-number&gt;
+ &lt;vnf-type&gt;HY&lt;/vnf-type&gt;
+ &lt;vnf-vendor&gt;JUNIPER&lt;/vnf-vendor&gt;
+ &lt;vnf-model&gt;MODEL2&lt;/vnf-model&gt;
+ &lt;vnf-id&gt;2&lt;/vnf-id&gt;
+ &lt;prov-status&gt;2&lt;/prov-status&gt;
+ &lt;operational-state&gt;2&lt;/operational-state&gt;
+ &lt;orchestration-status&gt;2&lt;/orchestration-status&gt;
+ &lt;equipment-role&gt;2&lt;/equipment-role&gt;
+ &lt;/vnf-information&gt;
+ &lt;/vnf-list&gt;
+ &lt;/ucpe-vms-service-information&gt;
+ &lt;request-information&gt;
+ &lt;request-action&gt;Layer3ServiceActivateRequest&lt;/request-action&gt;
+ &lt;order-number&gt;4281555&lt;/order-number&gt;
+ &lt;request-id&gt;155415ab-b4a7-4382-b4c6-d17d9sm42855&lt;/request-id&gt;
+ &lt;notification-url&gt;https://csi-tst-q22.it.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws&lt;/notification-url&gt;
+ &lt;source&gt;OMX&lt;/source&gt;
+ &lt;order-version&gt;1&lt;/order-version&gt;
+ &lt;/request-information&gt;
+ &lt;sdnc-request-header&gt;
+ &lt;svc-action&gt;activate&lt;/svc-action&gt;
+ &lt;svc-notification-url&gt;https://msojra.mtsnjdcp1.aic.cip.com:8443/adapters/rest/SDNCNotify&lt;/svc-notification-url&gt;
+ &lt;svc-request-id&gt;5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760&lt;/svc-request-id&gt;
+ &lt;/sdnc-request-header&gt;
+ &lt;l2-homing-information&gt;
+ &lt;topology&gt;MultiPoint&lt;/topology&gt;
+ &lt;preferred-aic-clli&gt;MTSNJA4LCP1&lt;/preferred-aic-clli&gt;
+ &lt;evc-name&gt;AS/VLXM/003717//SW&lt;/evc-name&gt;
+ &lt;/l2-homing-information&gt;
+ &lt;service-information&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;subscriber-name&gt;ST E2E Test42855_1300004281555&lt;/subscriber-name&gt;
+ &lt;service-type&gt;SDN-ETHERNET-INTERNET&lt;/service-type&gt;
+ &lt;/service-information&gt;
+ &lt;internet-service-change-details&gt;
+ &lt;internet-evc-speed-value&gt;10&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Kbps&lt;/internet-evc-speed-units&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.15&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;2&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.16&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.16&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;/internet-service-change-details&gt;
+ &lt;/service-data&gt;
+ &lt;/layer3-service-list&gt;
+</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterRequest = """
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <SOAP-ENV:Body>
+ <aetgt:SDNCAdapterRequest xmlns:aetgt="http://org.openecomp/workflow/sdnc/adapter/schema/v1" xmlns:sdncadaptersc="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</sdncadapter:RequestId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>services/layer3-service-list/AS%2FVLXM%2F000199%2F%2FSB_INTERNET</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://myhost.com:28080/mso/sdncAdapterCallbackServiceImpl</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadaptersc:RequestData><rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ <service-request xmlns="http://org.openecomp/mso/request/details/schema/v1">
+ <request-information>
+ <request-id>12570a36-7388-4c0a-bec4-189ce3kg9956</request-id>
+ <request-action>GetLayer3ServiceDetailsRequest</request-action>
+ <source>OMX</source>
+ </request-information>
+ <service-information>
+ <service-type>SDN-ETHERNET-INTERNET</service-type>
+ <service-instance-id>PD/VLXM/003717//SW_INTERNET</service-instance-id>
+ </service-information>
+ </service-request>
+</rest:payload></sdncadaptersc:RequestData></aetgt:SDNCAdapterRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>"""
+
+def sdncAdapterResponse = """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+<sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>39542e39-ccc3-4d1a-8b79-04ce88526613</tag0:RequestId>
+ <tag0:ResponseCode>404</tag0:ResponseCode>
+ <tag0:ResponseMessage>Error processing request to SDNC. Not Found.
+ https://sdncodl.us.aic.cip.com:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
+ SDNC Returned-[error-type:application, error-tag:data-missing,
+ error-message:Request could not be completed because the relevant
+ data model content does not exist.]</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+</sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>
+"""
+
+def workflowErrorResponse = """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: Error processing request to SDNC. Not Found.
+ https://sdncodl.us.aic.cip.com:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
+ SDNC Returned-[error-type:application, error-tag:data-missing,
+ error-message:Request could not be completed because the relevant
+ data model content does not exist.]</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ <aetgt:SourceSystemErrorCode>404</aetgt:SourceSystemErrorCode>
+ </aetgt:WorkflowException>"""
+
+def workflowErrorResponse1 = """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Invalid Callback Response from SDNC Adapter</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+def enhancedCallbackRequestData =
+ """<tag0:RequestData xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string"> <layer3-service-list xmlns="com:att:sdnctl:l3api">
+ <service-instance-id>FK/VLXM/003717//SW_INTERNET</service-instance-id>
+ <service-status>
+ <rpc-name>service-configuration-operation</rpc-name>
+ <rpc-action>activate</rpc-action>
+ <request-status>synccomplete</request-status>
+ <final-indicator>N</final-indicator>
+ <l3sdn-action>Layer3ServiceActivateRequest</l3sdn-action>
+ <l3sdn-subaction>SUPP</l3sdn-subaction>
+ <response-timestamp>2015-04-28T21:32:11.386Z</response-timestamp>
+ </service-status>
+ <service-data>
+ <internet-evc-access-information>
+ <ip-version>ds</ip-version>
+ <internet-evc-speed-value>8</internet-evc-speed-value>
+ <internet-evc-speed-units>Mbps</internet-evc-speed-units>
+ </internet-evc-access-information>
+ <vr-lan xmlns="com:att:sdnctl:l3api">
+ <vr-lan-interface>
+ <static-routes>
+ <v6-static-routes>
+ <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
+ <v6-static-route-prefix>2001:1890:12e3:2da::</v6-static-route-prefix>
+ <v6-static-route-prefix-length>28</v6-static-route-prefix-length>
+ </v6-static-routes>
+ <v4-static-routes>
+ <v4-static-route-prefix>255.255.252.1</v4-static-route-prefix>
+ <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
+ <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
+ </v4-static-routes>
+ <v6-static-routes>
+ <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
+ <v6-static-route-prefix>2001:1890:12e3:2da::</v6-static-route-prefix>
+ <v6-static-route-prefix-length>28</v6-static-route-prefix-length>
+ </v6-static-routes>
+ <v4-static-routes>
+ <v4-static-route-prefix>255.255.252.2</v4-static-route-prefix>
+ <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
+ <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
+ </v4-static-routes>
+ <v4-static-routes>
+ <v4-static-route-prefix>255.255.252.3</v4-static-route-prefix>
+ <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
+ <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
+ </v4-static-routes>
+ </static-routes>
+ <dhcp>
+ <v6-dhcp-server-enabled>N</v6-dhcp-server-enabled>
+ <v4-dhcp-server-enabled>Y</v4-dhcp-server-enabled>
+ <use-v6-default-pool>N</use-v6-default-pool>
+ <excluded-v4-dhcp-addresses-from-default-pool>
+ <excluded-v4-address>192.168.1.7</excluded-v4-address>
+ </excluded-v4-dhcp-addresses-from-default-pool>
+ <excluded-v4-dhcp-addresses-from-default-pool>
+ <excluded-v4-address>192.168.1.8</excluded-v4-address>
+ </excluded-v4-dhcp-addresses-from-default-pool>
+ <v4-dhcp-pools>
+ <v4-dhcp-relay-next-hop-address>1.1.1.1</v4-dhcp-relay-next-hop-address>
+ <v4-dhcp-pool-prefix-length>28</v4-dhcp-pool-prefix-length>
+ <excluded-v4-addresses>
+ <excluded-v4-address>192.168.1.5</excluded-v4-address>
+ </excluded-v4-addresses>
+ <v4-dhcp-relay-gateway-address>2.2.2.1</v4-dhcp-relay-gateway-address>
+ <excluded-v4-addresses>
+ <excluded-v4-address>192.168.1.6</excluded-v4-address>
+ </excluded-v4-addresses>
+ <v4-dhcp-pool-prefix>192.155.2.3</v4-dhcp-pool-prefix>
+ </v4-dhcp-pools>
+ <v4-dhcp-pools>
+ <v4-dhcp-relay-next-hop-address>1.1.1.2</v4-dhcp-relay-next-hop-address>
+ <v4-dhcp-pool-prefix-length>28</v4-dhcp-pool-prefix-length>
+ <excluded-v4-addresses>
+ <excluded-v4-address>192.168.1.6</excluded-v4-address>
+ </excluded-v4-addresses>
+ <v4-dhcp-relay-gateway-address>2.2.2.2</v4-dhcp-relay-gateway-address>
+ <excluded-v4-addresses>
+ <excluded-v4-address>192.168.1.7</excluded-v4-address>
+ </excluded-v4-addresses>
+ <v4-dhcp-pool-prefix>192.155.2.4</v4-dhcp-pool-prefix>
+ </v4-dhcp-pools>
+ <use-v4-default-pool>Y</use-v4-default-pool>
+ <excluded-v6-dhcp-addresses-from-default-pool>
+ <excluded-v6-address>1:5</excluded-v6-address>
+ </excluded-v6-dhcp-addresses-from-default-pool>
+ <excluded-v6-dhcp-addresses-from-default-pool>
+ <excluded-v6-address>1:6</excluded-v6-address>
+ </excluded-v6-dhcp-addresses-from-default-pool>
+ <v6-dhcp-pools>
+ <v6-dhcp-relay-next-hop-address>4:4</v6-dhcp-relay-next-hop-address>
+ <v6-dhcp-pool-prefix-length>28</v6-dhcp-pool-prefix-length>
+ <excluded-v6-addresses>
+ <excluded-v6-address>1:1</excluded-v6-address>
+ </excluded-v6-addresses>
+ <v6-dhcp-relay-gateway-address>3:3</v6-dhcp-relay-gateway-address>
+ <excluded-v6-addresses>
+ <excluded-v6-address>2:2</excluded-v6-address>
+ </excluded-v6-addresses>
+ <v6-dhcp-pool-prefix>0:0</v6-dhcp-pool-prefix>
+ </v6-dhcp-pools>
+ <v6-dhcp-pools>
+ <v6-dhcp-relay-next-hop-address>4:4</v6-dhcp-relay-next-hop-address>
+ <v6-dhcp-pool-prefix-length>28</v6-dhcp-pool-prefix-length>
+ <excluded-v6-addresses>
+ <excluded-v6-address>1:1</excluded-v6-address>
+ </excluded-v6-addresses>
+ <v6-dhcp-relay-gateway-address>3:3</v6-dhcp-relay-gateway-address>
+ <excluded-v6-addresses>
+ <excluded-v6-address>2:2</excluded-v6-address>
+ </excluded-v6-addresses>
+ <v6-dhcp-pool-prefix>0:0</v6-dhcp-pool-prefix>
+ </v6-dhcp-pools>
+ </dhcp>
+ <firewall-lite>
+ <stateful-firewall-lite-v6-enabled>N</stateful-firewall-lite-v6-enabled>
+ <stateful-firewall-lite-v4-enabled>Y</stateful-firewall-lite-v4-enabled>
+ <v4-firewall-packet-filters>
+ <v4-firewall-prefix>0.0.0.1</v4-firewall-prefix>
+ <v4-firewall-prefix-length>1</v4-firewall-prefix-length>
+ <allow-icmp-ping>Y</allow-icmp-ping>
+ <udp-ports>
+ <port-number>1</port-number>
+ </udp-ports>
+ <tcp-ports>
+ <port-number>1</port-number>
+ </tcp-ports>
+ </v4-firewall-packet-filters>
+ <v4-firewall-packet-filters>
+ <v4-firewall-prefix>0.0.0.2</v4-firewall-prefix>
+ <v4-firewall-prefix-length>2</v4-firewall-prefix-length>
+ <allow-icmp-ping>Y</allow-icmp-ping>
+ <udp-ports>
+ <port-number>2</port-number>
+ </udp-ports>
+ <tcp-ports>
+ <port-number>2</port-number>
+ </tcp-ports>
+ </v4-firewall-packet-filters>
+ <v6-firewall-packet-filters>
+ <v6-firewall-prefix>:</v6-firewall-prefix>
+ <v6-firewall-prefix-length>0</v6-firewall-prefix-length>
+ <allow-icmp-ping>Y</allow-icmp-ping>
+ <udp-ports>
+ <port-number>3</port-number>
+ </udp-ports>
+ <tcp-ports>
+ <port-number>3</port-number>
+ </tcp-ports>
+ </v6-firewall-packet-filters>
+ <v6-firewall-packet-filters>
+ <v6-firewall-prefix>:</v6-firewall-prefix>
+ <v6-firewall-prefix-length>1</v6-firewall-prefix-length>
+ <allow-icmp-ping>Y</allow-icmp-ping>
+ <udp-ports>
+ <port-number>4</port-number>
+ </udp-ports>
+ <tcp-ports>
+ <port-number>4</port-number>
+ </tcp-ports>
+ </v6-firewall-packet-filters>
+ </firewall-lite>
+ <pat>
+ <v4-pat-pools>
+ <v4-pat-pool-prefix>192.168.1.44</v4-pat-pool-prefix>
+ <v4-pat-pool-next-hop-address>192.168.1.5</v4-pat-pool-next-hop-address>
+ <v4-pat-pool-prefix-length>0</v4-pat-pool-prefix-length>
+ </v4-pat-pools>
+ <use-v4-default-pool>Y</use-v4-default-pool>
+ <v4-pat-enabled>N</v4-pat-enabled>
+ <v4-pat-pools>
+ <v4-pat-pool-prefix>192.168.1.45</v4-pat-pool-prefix>
+ <v4-pat-pool-next-hop-address>192.168.1.6</v4-pat-pool-next-hop-address>
+ <v4-pat-pool-prefix-length>28</v4-pat-pool-prefix-length>
+ </v4-pat-pools>
+ </pat>
+ <nat>
+ <v4-nat-enabled>Y</v4-nat-enabled>
+ <v4-nat-mapping-entries>
+ <v4-nat-internal>0.0.0.0</v4-nat-internal>
+ <v4-nat-next-hop-address>0.0.0.0</v4-nat-next-hop-address>
+ <v4-nat-external>0.0.0.0</v4-nat-external>
+ </v4-nat-mapping-entries>
+ <v4-nat-mapping-entries>
+ <v4-nat-internal>0.0.0.1</v4-nat-internal>
+ <v4-nat-next-hop-address>0.0.0.1</v4-nat-next-hop-address>
+ <v4-nat-external>0.0.0.1</v4-nat-external>
+ </v4-nat-mapping-entries>
+ </nat>
+ <vr-designation>primary</vr-designation>
+ <v4-vce-loopback-address>162.200.3.144</v4-vce-loopback-address>
+ <v6-vr-lan-prefix-length>64</v6-vr-lan-prefix-length>
+ <v6-vce-wan-address>2001:1890:12e3:2da::</v6-vce-wan-address>
+ <v6-vr-lan-prefix>2620:0:10d0:f:ffff:ffff:ffff:fffe</v6-vr-lan-prefix>
+ <v4-vr-lan-prefix-length>24</v4-vr-lan-prefix-length>
+ <v4-vr-lan-prefix>10.192.27.254</v4-vr-lan-prefix>
+ <v4-public-lan-prefixes>
+ <t-provided-v4-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v4-next-hop-address>192.168.1.2</v4-next-hop-address>
+ <v4-lan-public-prefix>192.168.1.1</v4-lan-public-prefix>
+ <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
+ </t-provided-v4-lan-public-prefixes>
+ <t-provided-v4-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v4-next-hop-address>192.168.1.72</v4-next-hop-address>
+ <v4-lan-public-prefix>192.168.1.71</v4-lan-public-prefix>
+ <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
+ </t-provided-v4-lan-public-prefixes>
+ <t-provided-v4-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v4-next-hop-address>192.168.1.68</v4-next-hop-address>
+ <v4-lan-public-prefix>192.168.1.67</v4-lan-public-prefix>
+ <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
+ </t-provided-v4-lan-public-prefixes>
+ </v4-public-lan-prefixes>
+ <v6-public-lan-prefixes>
+ <t-provided-v6-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
+ <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
+ <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
+ </t-provided-v6-lan-public-prefixes>
+ <t-provided-v6-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
+ <v6-lan-public-prefix>2001:1890:12e3:3da::</v6-lan-public-prefix>
+ <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
+ </t-provided-v6-lan-public-prefixes>
+ <t-provided-v6-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
+ <v6-lan-public-prefix>2001:1890:12e3:4da::</v6-lan-public-prefix>
+ <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
+ </t-provided-v6-lan-public-prefixes>
+ </v6-public-lan-prefixes>
+ </vr-lan-interface>
+ <routing-protocol>none</routing-protocol>
+ </vr-lan>
+<ucpe-vms-service-information>
+ <transport-service-information>
+ <transport-service-type>AVPN</transport-service-type>
+ <access-circuit-info>
+ <access-circuit-id>1</access-circuit-id>
+ <dual-mode>Active</dual-mode>
+ </access-circuit-info>
+ <access-circuit-info>
+ <access-circuit-id>2</access-circuit-id>
+ <dual-mode>Standby</dual-mode>
+ </access-circuit-info>
+ </transport-service-information>
+ <ucpe-information>
+ <ucpe-host-name>hostname</ucpe-host-name>
+ <ucpe-activation-code>activecode</ucpe-activation-code>
+ <out-of-band-management-modem>OOB</out-of-band-management-modem>
+ </ucpe-information>
+ <vnf-list>
+ <vnf-information>
+ <vnf-instance-id>1</vnf-instance-id>
+ <vnf-sequence-number>1</vnf-sequence-number>
+ <vnf-type>ZZ</vnf-type>
+ <vnf-vendor>JUNIPER</vnf-vendor>
+ <vnf-model>MODEL1</vnf-model>
+ <vnf-id>1</vnf-id>
+ <prov-status>1</prov-status>
+ <operational-state>1</operational-state>
+ <orchestration-status>1</orchestration-status>
+ <equipment-role>1</equipment-role>
+ </vnf-information>
+ <vnf-information>
+ <vnf-instance-id>2</vnf-instance-id>
+ <vnf-sequence-number>2</vnf-sequence-number>
+ <vnf-type>HY</vnf-type>
+ <vnf-vendor>JUNIPER</vnf-vendor>
+ <vnf-model>MODEL2</vnf-model>
+ <vnf-id>2</vnf-id>
+ <prov-status>2</prov-status>
+ <operational-state>2</operational-state>
+ <orchestration-status>2</orchestration-status>
+ <equipment-role>2</equipment-role>
+ </vnf-information>
+ </vnf-list>
+ </ucpe-vms-service-information>
+ <request-information>
+ <request-action>Layer3ServiceActivateRequest</request-action>
+ <order-number>4281555</order-number>
+ <request-id>155415ab-b4a7-4382-b4c6-d17d9sm42855</request-id>
+ <notification-url>https://csi-tst-q22.it.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</notification-url>
+ <source>OMX</source>
+ <order-version>1</order-version>
+ </request-information>
+ <sdnc-request-header>
+ <svc-action>activate</svc-action>
+ <svc-notification-url>https://msojra.mtsnjdcp1.aic.cip.com:8443/adapters/rest/SDNCNotify</svc-notification-url>
+ <svc-request-id>5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760</svc-request-id>
+ </sdnc-request-header>
+ <l2-homing-information>
+ <topology>MultiPoint</topology>
+ <preferred-aic-clli>MTSNJA4LCP1</preferred-aic-clli>
+ <evc-name>AS/VLXM/003717//SW</evc-name>
+ </l2-homing-information>
+ <service-information>
+ <service-instance-id>FK/VLXM/003717//SW_INTERNET</service-instance-id>
+ <subscriber-name>ST E2E Test42855_1300004281555</subscriber-name>
+ <service-type>SDN-ETHERNET-INTERNET</service-type>
+ </service-information>
+ <internet-service-change-details>
+ <internet-evc-speed-value>10</internet-evc-speed-value>
+ <internet-evc-speed-units>Kbps</internet-evc-speed-units>
+ <t-provided-v4-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
+ <v4-lan-public-prefix>192.168.1.15</v4-lan-public-prefix>
+ <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
+ </t-provided-v4-lan-public-prefixes>
+ <t-provided-v4-lan-public-prefixes>
+ <request-index>2</request-index>
+ <v4-next-hop-address>192.168.1.16</v4-next-hop-address>
+ <v4-lan-public-prefix>192.168.1.16</v4-lan-public-prefix>
+ <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
+ </t-provided-v4-lan-public-prefixes>
+ <t-provided-v6-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
+ <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
+ <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
+ </t-provided-v6-lan-public-prefixes>
+ <t-provided-v6-lan-public-prefixes>
+ <request-index>1</request-index>
+ <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
+ <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
+ <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
+ </t-provided-v6-lan-public-prefixes>
+ </internet-service-change-details>
+ </service-data>
+ </layer3-service-list>
+</tag0:RequestData>
+"""
+
+def sdncAdapterResponseEmpty =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:response-data/>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+def sdncAdapterResponseError =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:CallbackHeader>
+ <tag0:RequestId>39542e39-ccc3-4d1a-8b79-04ce88526613</tag0:RequestId>
+ <tag0:ResponseCode>404</tag0:ResponseCode>
+ <tag0:ResponseMessage>Error processing request to SDNC. Not Found.
+ https://sdncodl.us.aic.cip.com:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
+ SDNC Returned-[error-type:application, error-tag:data-missing,
+ error-message:Request could not be completed because the relevant
+ data model content does not exist.]</tag0:ResponseMessage>
+ </tag0:CallbackHeader>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+
+ @Test
+ public void testPreProcessRequest() {
+
+ String sdncAdapterWorkflowRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1/sdncadapterworkflowrequest.xml");
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("sdncAdapterWorkflowRequest")).thenReturn(sdncAdapterWorkflowRequest)
+ when(mockExecution.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("http://someurl.someting.com:28080/mso/sdncAdapterCallbackServiceImpl")
+ when(mockExecution.getVariable("URN_mso_use_qualified_host")).thenReturn("true")
+ when(mockExecution.getProcessInstanceId()).thenReturn("745b1b50-e39e-4685-9cc8-c71f0bde8bf0")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+
+ SDNCAdapter sdncAdapter = new SDNCAdapter()
+ sdncAdapter.preProcessRequest(mockExecution)
+
+ MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ debugger.printInvocations(mockExecution)
+
+
+ verify(mockExecution).setVariable("prefix","SDNCA_")
+ verify(mockExecution).setVariable("sdncAdapterResponse","")
+ verify(mockExecution).setVariable("asynchronousResponseTimeout",false)
+ verify(mockExecution).setVariable("continueListening",false)
+ verify(mockExecution).setVariable("BasicAuthHeaderValue","Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("serviceConfigActivate",false)
+ verify(mockExecution).setVariable("SDNCA_requestId", "745b1b50-e39e-4685-9cc8-c71f0bde8bf0")
+ verify(mockExecution).setVariable("SDNCA_SuccessIndicator",false)
+ verify(mockExecution).setVariable("source","")
+ verify(mockExecution).setVariable("sdncAdapterRequest", sdncAdapterRequest)
+ }
+
+ @Test
+ public void testProcessResponse()
+ {
+ String sdncAdapterCallbackResponse = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1mock/sdncadaptercallbackrequest.xml");
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn(sdncAdapterCallbackResponse)
+ SDNCAdapter sdncAdapter = new SDNCAdapter()
+ sdncAdapter.postProcessResponse(mockExecution)
+
+// MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+// debugger.printInvocations(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
+ verify(mockExecution).setVariable("sdncAdapterResponse",workflowResponse)
+ verify(mockExecution).setVariable("enhancedCallbackRequestData",enhancedCallbackRequestData)
+ verify(mockExecution).setVariable("continueListening",false)
+
+ }
+
+ @Test
+ public void testProcessResponse_ErrorCase_404()
+ {
+ String sdncAdapterCallbackErrorResponse = FileUtil.readResourceFile("sdncadaptercallbackrequest_404CallBack.xml");
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn(sdncAdapterCallbackErrorResponse)
+ SDNCAdapter sdncAdapter = new SDNCAdapter()
+ sdncAdapter.postProcessResponse(mockExecution)
+
+ verify(mockExecution, times(1)).getVariable("isDebugLogEnabled")
+ verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
+ verify(mockExecution).setVariable("sdncAdapterResponse", sdncAdapterResponseError)
+ verify(mockExecution).setVariable("enhancedCallbackRequestData", "")
+ verify(mockExecution).setVariable("continueListening",false)
+
+ }
+
+ @Test
+ public void testProcessResponse_ErrorCase_InvalidCallback()
+ {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn("<h1>Service Unavailable</h1>")
+ SDNCAdapter sdncAdapter = new SDNCAdapter()
+ sdncAdapter.postProcessResponse(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
+ verify(mockExecution).setVariable("sdncAdapterResponse", sdncAdapterResponseEmpty)
+ verify(mockExecution).setVariable("enhancedCallbackRequestData", "")
+ verify(mockExecution).setVariable("continueListening",false)
+
+ }
+
+ @Test
+ public void postProcessResponse()
+ {
+
+ String SDNCAdapterCallbackRequest =
+ """<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<SDNCAdapterCallbackRequest
+ xmlns="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>3bb02798-b344-4d28-9bca-1f029954d1c9</RequestId>
+ <ResponseCode>404</ResponseCode>
+ <ResponseMessage>Error processing request to SDNC. Not Found.
+ https://sdncodl.us.infra.aic.net:8443/restconf/config/L3SDN-API:services/layer3-service-list/85%2FCSIP%2F141203%2FPT_CSI9999998693.
+ SDNC Returned-[error-type:application, error-tag:data-missing,
+ error-message:Request could not be completed because the relevant
+ data model content does not exist ]</ResponseMessage>
+ </CallbackHeader>
+</SDNCAdapterCallbackRequest>"""
+
+ String sdncAdapterResponse =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:CallbackHeader>
+ <tag0:RequestId>3bb02798-b344-4d28-9bca-1f029954d1c9</tag0:RequestId>
+ <tag0:ResponseCode>404</tag0:ResponseCode>
+ <tag0:ResponseMessage>Error processing request to SDNC. Not Found.
+ https://sdncodl.us.infra.aic.net:8443/restconf/config/L3SDN-API:services/layer3-service-list/85%2FCSIP%2F141203%2FPT_CSI9999998693.
+ SDNC Returned-[error-type:application, error-tag:data-missing,
+ error-message:Request could not be completed because the relevant
+ data model content does not exist ]</tag0:ResponseMessage>
+ </tag0:CallbackHeader>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn(SDNCAdapterCallbackRequest)
+ SDNCAdapter sdncAdapter = new SDNCAdapter()
+ sdncAdapter.postProcessResponse(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
+ verify(mockExecution).setVariable("sdncAdapterResponse", sdncAdapterResponse)
+ verify(mockExecution).setVariable("enhancedCallbackRequestData", "")
+ verify(mockExecution).setVariable("continueListening",false)
+
+ }
+
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtilTest.groovy
new file mode 100644
index 0000000000..b525967569
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/TrinityExceptionUtilTest.groovy
@@ -0,0 +1,201 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import org.junit.Assert
+import org.junit.Ignore
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+
+
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.TrinityExceptionUtil;
+@RunWith(MockitoJUnitRunner.class)
+import org.junit.Test
+
+class TrinityExceptionUtilTest {
+
+ def aotsFault ="""<n1:Fault xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd" xmlns:cer="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/ErrorResponse.xsd" xsi:schemaLocation="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd SoapFault-CDM.xsd">
+ <n1:faultcode>xml:space</n1:faultcode>
+ <n1:faultstring>String</n1:faultstring>
+ <n1:faultactor>http://test.com</n1:faultactor>
+ <n1:detail>
+ <n1:CSIApplicationException>
+ <cer:Response>
+ <cer:code>400</cer:code>
+ <cer:description>bad stuff</cer:description>
+ </cer:Response>
+ <cer:ServiceProviderEntity>
+ <cer:reportingServiceEntity>String</cer:reportingServiceEntity>
+ <cer:faultDate>*** ERROR ***</cer:faultDate>
+ <cer:faultSequenceNumber>String</cer:faultSequenceNumber>
+ <cer:faultLevel>String</cer:faultLevel>
+ <cer:faultCode>String</cer:faultCode>
+ <cer:faultDescription>String</cer:faultDescription>
+ <cer:ServiceProviderRawError>
+ <cer:code>String</cer:code>
+ <cer:description>String</cer:description>
+ <cer:BISError>
+ <cer:code>String</cer:code>
+ <cer:description>String</cer:description>
+ <cer:origination>String</cer:origination>
+ <cer:severity>String</cer:severity>
+ </cer:BISError>
+ </cer:ServiceProviderRawError>
+ </cer:ServiceProviderEntity>
+ </n1:CSIApplicationException>
+ <n1:CSIInternalException>
+ <cer:reportingServiceEntity>String</cer:reportingServiceEntity>
+ <cer:faultDate>*** ERROR ***</cer:faultDate>
+ <cer:faultSequenceNumber>String</cer:faultSequenceNumber>
+ <cer:faultLevel>String</cer:faultLevel>
+ <cer:faultCode>String</cer:faultCode>
+ <cer:faultDescription>String</cer:faultDescription>
+ <cer:cingularErrorCode>String</cer:cingularErrorCode>
+ <cer:cingularErrorDescription>String</cer:cingularErrorDescription>
+ <cer:cingularErrorCategory>String</cer:cingularErrorCategory>
+ </n1:CSIInternalException>
+ </n1:detail>
+</n1:Fault>"""
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ @Ignore
+ public void testMapAAIExceptionTCommonException() {
+
+
+
+ String restFault = """
+ <Fault>
+<requestError>
+<serviceException>
+<messageId>SVC3002</messageId>
+<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
+<variables>
+<variable>PUTcustomer</variable>
+<variable>SubName01</variable>
+<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
+<variable>ERR.5.4.5105</variable>
+</variables>
+</serviceException>
+</requestError>
+</Fault>
+ """
+ def errorString = """<requestError>
+<serviceException>
+<messageId>SVC3002</messageId>
+<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
+<variables>
+<variable>PUTcustomer</variable>
+<variable>SubName01</variable>
+<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
+<variable>ERR.5.4.5105</variable>
+</variables>
+</serviceException>
+</requestError>""" as String
+
+
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ TrinityExceptionUtil util = new TrinityExceptionUtil()
+ Assert.assertEquals(errorString, util.mapAAIExceptionTCommonException(restFault, mockExecution))
+ }
+
+
+
+
+ @Test
+ public void testBuildException() {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("prefix")).thenReturn("test_")
+ when(mockExecution.getVariable("test_ResponseCode")).thenReturn("400")
+ ArrayList msgVars = new ArrayList()
+ msgVars.add("var1")
+ msgVars.add("var2")
+ when(mockExecution.getVariable("test_errVariables")).thenReturn(msgVars)
+
+
+ TrinityExceptionUtil util = new TrinityExceptionUtil()
+ String msg = "Bad request"
+ String errorString = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ <tns:serviceException>
+ <tns:messageId>SVC2000</tns:messageId>
+ <tns:text>The following service error occurred: %1. Error code is %2.</tns:text>
+ <tns:variables>var1</tns:variables>
+ <tns:variables>var2</tns:variables>
+ </tns:serviceException>
+</tns:requestError>"""
+ Assert.assertEquals(errorString, util.buildException(msg, mockExecution))
+ }
+
+ @Test
+ public void testMapAOTSExecptionToCommonException() {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("prefix")).thenReturn("test_")
+ when(mockExecution.getVariable("test_ResponseCode")).thenReturn("400")
+
+ TrinityExceptionUtil util = new TrinityExceptionUtil()
+ String errorString = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+ <tns:serviceException>
+ <tns:messageId>SVC2000</tns:messageId>
+ <tns:text>The following service error occurred: %1. Error code is %2.</tns:text>
+ <tns:variables>Received error from AOTS: bad stuff</tns:variables>
+ <tns:variables>400</tns:variables>
+ </tns:serviceException>
+</tns:requestError>"""
+ Assert.assertEquals(errorString, util.mapAOTSExecptionToCommonException(aotsFault, mockExecution))
+ }
+
+
+ @Test
+ public void testParseError() {
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ String errorString = "The following service error occurred: %1. Error code is %2."
+ ArrayList msgVars = new ArrayList()
+ msgVars.add("var1")
+ msgVars.add("var2")
+ when(mockExecution.getVariable("prefix")).thenReturn("test_")
+ when(mockExecution.getVariable("test_errTxt")).thenReturn(errorString)
+ when(mockExecution.getVariable("test_errVariables")).thenReturn(msgVars)
+
+ TrinityExceptionUtil util = new TrinityExceptionUtil()
+
+ Assert.assertEquals("The following service error occurred: var1. Error code is var2.", util.parseError(mockExecution))
+}
+
+
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/VidUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/VidUtilsTest.groovy
new file mode 100644
index 0000000000..645fbe6e8f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/VidUtilsTest.groovy
@@ -0,0 +1,972 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import static org.mockito.Mockito.*
+
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+import groovy.json.JsonSlurper
+
+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.runtime.Execution;
+
+import static org.junit.Assert.*;
+
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.junit.Before
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity;
+import org.junit.Before;
+import org.junit.Test;
+
+@RunWith(MockitoJUnitRunner.class)
+
+class VidUtilsTest {
+
+ def vfModuleReqJson = """
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "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",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "instanceName": "skask-test",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "skask",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "vnfName",
+ "value": "STMTN5MMSC20"
+ },
+ {
+ "name": "tenantId",
+ "value": "vpe-tenant-123"
+ },
+ {
+ "name": "aicCloudRegion",
+ "value": "MDTWNJ21"
+ },
+ {
+ "name": "isAvpnService",
+ "value": "true"
+ },
+ {
+ "name": "asn",
+ "value": "asn-1234"
+ },
+ {
+ "name": "releaseForAero",
+ "value": "release-for-aero-something"
+ },
+ {
+ "name": "aicClli",
+ "value": "MTJWNJA4LCP"
+ },
+ {
+ "name": "svcProviderPartNumber",
+ "value": "svc-provide-number-1234"
+ }
+ ]
+ }
+ }
+}
+"""
+ def bpmnReq1 = """
+{
+ "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",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-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",
+ "modelCustomizationName": "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 vidUtilResp1 = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>VID</source>
+ <service-instance-id>test-service-instance-id-123</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 bpmnReq2 = """
+{
+ "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",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-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",
+ "modelCustomizationName": "vSAMP12"
+ }
+ }
+ }
+ ]
+ }
+}
+"""
+
+ def bpmnReqJsonVolumeSuppressRollbackTrue = """
+{
+ "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": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-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",
+ "modelCustomizationName": "vSAMP12"
+ }
+ }
+ }
+ ]
+ }
+}
+"""
+
+def bpmnReqJsonVolumeSuppressRollbackFalse = """
+{
+ "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",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-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",
+ "modelCustomizationName": "vSAMP12"
+ }
+ }
+ }
+ ]
+ }
+}
+"""
+
+def bpmnReqJsonVolumeSuppressRollbackNone = """
+{
+ "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"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-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",
+ "modelCustomizationName": "vSAMP12"
+ }
+ }
+ }
+ ]
+ }
+}
+"""
+
+ def bpmnReqJsonVfModuleSuppressRollbackTrue = """
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1"
+},
+"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",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12..base..module-0",
+"modelVersion": "1"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "123456",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "skask",
+"instanceName": "skask-test",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+}
+}
+"""
+
+def bpmnReqJsonVfModuleSuppressRollbackFalse = """
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "MDTWNJ21",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceName": "PCRF::module-0-2",
+"source": "VID",
+"suppressRollback": false
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+"instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+"modelInfo": {
+"modelType": "volumeGroup",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12..base..module-0",
+"modelVersion": "1"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "123456",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "skask",
+"instanceName": "skask-test",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+}
+}
+"""
+
+def bpmnReqJsonVfModuleSuppressRollbackNone = """
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "MDTWNJ21",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceName": "PCRF::module-0-2",
+"source": "VID"
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+"instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+"modelInfo": {
+"modelType": "volumeGroup",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12..base..module-0",
+"modelVersion": "1"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "123456",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "skask",
+"instanceName": "skask-test",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+}
+}
+"""
+ def vidUtilResp2 = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>VID</source>
+ <service-instance-id>test-service-instance-id-123</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/>
+ <backout-on-failure>true</backout-on-failure>
+ <model-customization-id/>
+ </volume-inputs>
+ <volume-params/>
+</volume-request>
+"""
+
+def vidUtilVolumeRespBackoutOnFailureFalse = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>VID</source>
+ <service-instance-id>test-service-instance-id-123</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/>
+ <backout-on-failure>false</backout-on-failure>
+ <model-customization-id/>
+ </volume-inputs>
+ <volume-params/>
+</volume-request>
+"""
+
+def vidUtilVolumeRespBackoutOnFailureTrue = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>VID</source>
+ <service-instance-id>test-service-instance-id-123</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/>
+ <backout-on-failure>true</backout-on-failure>
+ <model-customization-id/>
+ </volume-inputs>
+ <volume-params/>
+</volume-request>
+"""
+
+def vidUtilVolumeRespBackoutOnFailureEmpty = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>VID</source>
+ <service-instance-id>test-service-instance-id-123</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/>
+ <backout-on-failure/>
+ <model-customization-id/>
+ </volume-inputs>
+ <volume-params/>
+</volume-request>
+"""
+
+def vidUtilVfModuleRespBackoutOnFailureFalse = """<vnf-request>
+ <request-info>
+ <request-id>test-request-id-123</request-id>
+ <action>CREATE_VF_MODULE</action>
+ <source>VID</source>
+ <!-- new 1610 field -->
+ <service-instance-id>test-service-instance-id-123</service-instance-id>
+ </request-info>
+ <vnf-inputs><!-- not in use in 1610 -->
+ <vnf-name>skask-test</vnf-name>
+ <vnf-type>test-vnf-type-123</vnf-type>
+ <vnf-id>test-vnf-id-123</vnf-id>
+ <volume-group-id>test-volume-group-id-123</volume-group-id>
+ <vf-module-id>test-vf-module-id-123</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>
+ <model-customization-id/>
+ <is-base-vf-module>false</is-base-vf-module>
+ <asdc-service-model-version>1.0</asdc-service-model-version>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>
+ <service-id/>
+ <backout-on-failure>false</backout-on-failure>
+ <persona-model-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</persona-model-id>
+ <persona-model-version>1</persona-model-version>
+ </vnf-inputs>
+ <vnf-params/>
+</vnf-request>
+"""
+
+def vidUtilVfModuleRespBackoutOnFailureTrue = """<vnf-request>
+ <request-info>
+ <request-id>test-request-id-123</request-id>
+ <action>CREATE_VF_MODULE</action>
+ <source>VID</source>
+ <!-- new 1610 field -->
+ <service-instance-id>test-service-instance-id-123</service-instance-id>
+ </request-info>
+ <vnf-inputs><!-- not in use in 1610 -->
+ <vnf-name>skask-test</vnf-name>
+ <vnf-type>test-vnf-type-123</vnf-type>
+ <vnf-id>test-vnf-id-123</vnf-id>
+ <volume-group-id>test-volume-group-id-123</volume-group-id>
+ <vf-module-id>test-vf-module-id-123</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>
+ <model-customization-id/>
+ <is-base-vf-module>false</is-base-vf-module>
+ <asdc-service-model-version>1.0</asdc-service-model-version>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>
+ <service-id/>
+ <backout-on-failure>true</backout-on-failure>
+ <persona-model-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</persona-model-id>
+ <persona-model-version>1</persona-model-version>
+ </vnf-inputs>
+ <vnf-params/>
+</vnf-request>
+"""
+
+def vidUtilVfModuleRespBackoutOnFailureEmpty = """<vnf-request>
+ <request-info>
+ <request-id>test-request-id-123</request-id>
+ <action>CREATE_VF_MODULE</action>
+ <source>VID</source>
+ <!-- new 1610 field -->
+ <service-instance-id>test-service-instance-id-123</service-instance-id>
+ </request-info>
+ <vnf-inputs><!-- not in use in 1610 -->
+ <vnf-name>skask-test</vnf-name>
+ <vnf-type>test-vnf-type-123</vnf-type>
+ <vnf-id>test-vnf-id-123</vnf-id>
+ <volume-group-id>test-volume-group-id-123</volume-group-id>
+ <vf-module-id>test-vf-module-id-123</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>
+ <model-customization-id/>
+ <is-base-vf-module>false</is-base-vf-module>
+ <asdc-service-model-version>1.0</asdc-service-model-version>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>
+ <service-id/>
+ <backout-on-failure/>
+ <persona-model-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</persona-model-id>
+ <persona-model-version>1</persona-model-version>
+ </vnf-inputs>
+ <vnf-params/>
+</vnf-request>
+"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ @Test
+ public void test() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReq1)
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', 'test-service-instance-id-123')
+ print xmlReq
+ assertEquals(vidUtilResp1, xmlReq)
+ }
+
+ //@Test
+ public void testVfModule() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(vfModuleReqJson)
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVfModuleRequest(null, reqMap, "CREATE_VF_MODULE", "test-service-instance-id-123")
+ print xmlReq
+ assertTrue(true)
+ }
+
+ @Test
+ public void testNoRequestParams() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReq2)
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', 'test-service-instance-id-123')
+
+ assertEquals(vidUtilResp2, xmlReq)
+ }
+
+ @Test
+ public void testVfModuleVolumeRollbackTrue() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReqJsonVolumeSuppressRollbackTrue)
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', 'test-service-instance-id-123')
+
+ assertEquals(vidUtilVolumeRespBackoutOnFailureFalse, xmlReq)
+ }
+
+ @Test
+ public void testVfModuleVolumeRollbackFalse() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReqJsonVolumeSuppressRollbackFalse)
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', 'test-service-instance-id-123')
+
+ assertEquals(vidUtilVolumeRespBackoutOnFailureTrue, xmlReq)
+ }
+
+ @Test
+ public void testVfModuleVolumeRollbackNone() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReqJsonVolumeSuppressRollbackNone)
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', 'test-service-instance-id-123')
+
+ assertEquals(vidUtilVolumeRespBackoutOnFailureEmpty, xmlReq)
+ }
+
+ @Test
+ public void testVfModuleRollbackTrue() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReqJsonVfModuleSuppressRollbackTrue)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("vnfType")).thenReturn('test-vnf-type-123')
+ when(mockExecution.getVariable("vnfId")).thenReturn('test-vnf-id-123')
+ when(mockExecution.getVariable("vfModuleId")).thenReturn('test-vf-module-id-123')
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn('test-volume-group-id-123')
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn('false')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('test-request-id-123')
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVfModuleRequest(mockExecution, reqMap, 'CREATE_VF_MODULE', 'test-service-instance-id-123')
+
+ println 'ggg->' + xmlReq
+ assertEquals(vidUtilVfModuleRespBackoutOnFailureFalse, xmlReq)
+ }
+
+ @Test
+ public void testVfModuleRollbackFalse() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReqJsonVfModuleSuppressRollbackFalse)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("vnfType")).thenReturn('test-vnf-type-123')
+ when(mockExecution.getVariable("vnfId")).thenReturn('test-vnf-id-123')
+ when(mockExecution.getVariable("vfModuleId")).thenReturn('test-vf-module-id-123')
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn('test-volume-group-id-123')
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn('false')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('test-request-id-123')
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVfModuleRequest(mockExecution, reqMap, 'CREATE_VF_MODULE', 'test-service-instance-id-123')
+
+ println 'ggg->' + xmlReq
+ assertEquals(vidUtilVfModuleRespBackoutOnFailureTrue, xmlReq)
+ }
+
+ @Test
+ public void testVfModuleRollbackNone() {
+
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(bpmnReqJsonVfModuleSuppressRollbackNone)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("vnfType")).thenReturn('test-vnf-type-123')
+ when(mockExecution.getVariable("vnfId")).thenReturn('test-vnf-id-123')
+ when(mockExecution.getVariable("vfModuleId")).thenReturn('test-vf-module-id-123')
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn('test-volume-group-id-123')
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn('false')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('test-request-id-123')
+
+ VidUtils vidUtils = new VidUtils()
+ def xmlReq = vidUtils.createXmlVfModuleRequest(mockExecution, reqMap, 'CREATE_VF_MODULE', 'test-service-instance-id-123')
+
+ println 'ggg->' + xmlReq
+ assertEquals(vidUtilVfModuleRespBackoutOnFailureEmpty, xmlReq)
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
new file mode 100644
index 0000000000..27f2479a7b
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
@@ -0,0 +1,214 @@
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.spy;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.core.Response;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.history.HistoricProcessInstance;
+import org.camunda.bpm.engine.history.HistoricVariableInstance;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+/**
+ * Set of utility methods used for Unit testing
+ *
+ */
+public class BPMNUtil {
+
+ public static String getVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name) {
+ String pID = getProcessInstanceId(processEngineServices,
+ processDefinitionID);
+ assertProcessInstanceFinished(processEngineServices, pID);
+ HistoricVariableInstance responseData = processEngineServices.getHistoryService()
+ .createHistoricVariableInstanceQuery().processInstanceId(pID)
+ .variableName(name)
+ .singleResult();
+
+ if (responseData != null) {
+ return (responseData.getValue() != null ? responseData.getValue().toString(): null);
+ }
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T extends Object> T getRawVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name) {
+ String pID = getProcessInstanceId(processEngineServices,
+ processDefinitionID);
+ assertProcessInstanceFinished(processEngineServices, pID);
+ Object responseData = processEngineServices.getHistoryService()
+ .createHistoricVariableInstanceQuery().processInstanceId(pID)
+ .variableName(name)
+ .singleResult()
+ .getValue();
+ return (T) responseData;
+ }
+
+
+ public static void assertProcessInstanceFinished(ProcessEngineServices processEngineServices, String pid) {
+ assertEquals(1, processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count());
+ }
+
+ public static void assertProcessInstanceNotFinished(ProcessEngineServices processEngineServices, String processDefinitionID) {
+ String pID = getProcessInstanceId(processEngineServices,
+ processDefinitionID);
+ assertEquals(0, processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pID).finished().count());
+ }
+
+ private static String getProcessInstanceId(
+ ProcessEngineServices processEngineServices, String processDefinitionID) {
+ List<HistoricProcessInstance> historyList = processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().list();
+ String pID = null;
+ for (HistoricProcessInstance hInstance: historyList) {
+ if (hInstance.getProcessDefinitionKey().equals(processDefinitionID)) {
+ pID = hInstance.getId();
+ break;
+ }
+ }
+ return pID;
+ }
+
+ public static boolean isProcessInstanceFinished(ProcessEngineServices processEngineServices, String pid) {
+ return processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count() == 1 ? true: false;
+ }
+
+
+ private static void buildVariable(String key, String value, Map<String,Object> variableValueType) {
+ Map<String, Object> host = new HashMap<String, Object>();
+ host.put("value", value);
+ host.put("type", "String");
+ variableValueType.put(key, host);
+ }
+
+ public static WorkflowResponse executeWorkFlow(ProcessEngineServices processEngineServices, String processKey, Map<String,String> variables) {
+ WorkflowResource workflowResource = new WorkflowResource();
+ VariableMapImpl variableMap = new VariableMapImpl();
+
+ Map<String, Object> variableValueType = new HashMap<String, Object>();
+ for (String key : variables.keySet()) {
+ buildVariable(key, variables.get(key), variableValueType);
+ }
+ buildVariable("mso-service-request-timeout","600", variableValueType);
+ variableMap.put("variables", variableValueType);
+
+ workflowResource.setProcessEngineServices4junit(processEngineServices);
+ Response response = workflowResource.startProcessInstanceByKey(
+ processKey, variableMap);
+ WorkflowResponse workflowResponse = (WorkflowResponse) response.getEntity();
+ return workflowResponse;
+ }
+
+ //Check the runtime service to see whether the process is completed
+ public static void waitForWorkflowToFinish(ProcessEngineServices processEngineServices, String pid) throws InterruptedException {
+ // Don't wait forever
+ long waitTime = 120000;
+ long endTime = System.currentTimeMillis() + waitTime;
+
+ while (true) {
+ if (processEngineServices.getRuntimeService().createProcessInstanceQuery().processInstanceId(pid).singleResult() == null) {
+ break;
+ }
+
+ if (System.currentTimeMillis() >= endTime) {
+ fail("Process " + pid + " did not finish in " + waitTime + "ms");
+ }
+
+ Thread.sleep(200);
+ }
+ }
+
+ /**
+ * Executes the Asynchronous workflow in synchronous fashion and returns the WorkflowResponse object
+ * @param processEngineServices
+ * @param processKey
+ * @param variables
+ * @return
+ * @throws InterruptedException
+ */
+ public static WorkflowResponse executeAsyncWorkflow(ProcessEngineServices processEngineServices, String processKey, Map<String,String> variables) throws InterruptedException {
+ ProcessThread pthread = new ProcessThread(processKey, processEngineServices, variables);
+ pthread.start();
+ BPMNUtil.assertProcessInstanceNotFinished(processEngineServices, processKey);
+ String pid = getProcessInstanceId(processEngineServices, processKey);
+ //Caution: If there is a problem with workflow, this may wait for ever
+ while (true) {
+ pid = getProcessInstanceId(processEngineServices, processKey);
+ if (!isProcessInstanceFinished(processEngineServices,pid)) {
+ Thread.sleep(200);
+ } else{
+ break;
+ }
+ }
+ //need to retrieve for second time ?
+ pid = getProcessInstanceId(processEngineServices, processKey);
+ waitForWorkflowToFinish(processEngineServices, pid);
+ return pthread.workflowResponse;
+ }
+
+ /**
+ * Execute workflow using async resource
+ * @param processEngineServices
+ * @param processKey
+ * @param asyncResponse
+ * @param variables
+ */
+ private static void executeAsyncFlow(ProcessEngineServices processEngineServices, String processKey, AsynchronousResponse asyncResponse, Map<String,String> variables) {
+ WorkflowAsyncCommonResource workflowResource = new WorkflowAsyncCommonResource();
+ VariableMapImpl variableMap = new VariableMapImpl();
+
+ Map<String, Object> variableValueType = new HashMap<String, Object>();
+ for (String key : variables.keySet()) {
+ buildVariable(key, variables.get(key), variableValueType);
+ }
+ buildVariable("mso-service-request-timeout","600", variableValueType);
+ variableMap.put("variables", variableValueType);
+
+ workflowResource.setProcessEngineServices4junit(processEngineServices);
+ workflowResource.startProcessInstanceByKey(asyncResponse, processKey, variableMap);
+ }
+
+ /**
+ * Helper class which executes workflow in a thread
+ *
+ */
+ static class ProcessThread extends Thread {
+
+ public WorkflowResponse workflowResponse = null;
+ public String processKey;
+ public AsynchronousResponse asyncResponse = spy(AsynchronousResponse.class);
+ public boolean started;
+ public ProcessEngineServices processEngineServices;
+ public Map<String,String> variables;
+
+ public ProcessThread(String processKey, ProcessEngineServices processEngineServices, Map<String,String> variables) {
+ this.processKey = processKey;
+ this.processEngineServices = processEngineServices;
+ this.variables = variables;
+ }
+
+ public void run() {
+ started = true;
+ doAnswer(new Answer<Void>() {
+ public Void answer(InvocationOnMock invocation) {
+ Response response = (Response) invocation.getArguments()[0];
+ workflowResponse = (WorkflowResponse) response.getEntity();
+ return null;
+ }
+ }).when(asyncResponse).setResponse(any(Response.class));
+ executeAsyncFlow(processEngineServices, processKey, asyncResponse, variables);
+ }
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java
new file mode 100644
index 0000000000..e99f2a8917
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java
@@ -0,0 +1,217 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+/**
+ * Unit test for CompleteMsoProcess.bpmn.
+ */
+public class CompleteMsoProcessTest extends WorkflowTest {
+
+ private void executeFlow(String inputRequestFile) throws InterruptedException {
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ //String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);
+ Map<String, String> variables = new HashMap<String, String>();
+ variables.put("CompleteMsoProcessRequest",inputRequestFile);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CompleteMsoProcess", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void msoCompletionRequestWithNotificationurl_200() throws Exception {
+ logStart();
+
+ //Execute Flow
+ executeFlow(gMsoCompletionRequestWithNotificationurl());
+
+ //Verify Error
+ String CMSO_ResponseCode = BPMNUtil.getVariable(processEngineRule, "CompleteMsoProcess", "CMSO_ResponseCode");
+ Assert.assertEquals("200", CMSO_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+ logEnd();
+ }
+
+ @Test
+ @Ignore // BROKEN TEST
+ @Deployment(resources = {"subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void msoCompletionRequestWithNotificationurl_500() throws Exception {
+ logStart();
+
+ //Execute Flow
+ executeFlow(gMsoCompletionRequestWithNotificationurl());
+
+ //Verify Error
+ String CMSO_ResponseCode = BPMNUtil.getVariable(processEngineRule, "CompleteMsoProcess", "CMSO_ResponseCode");
+ Assert.assertEquals("500", CMSO_ResponseCode);
+ Assert.assertFalse((boolean) BPMNUtil.getRawVariable(processEngineRule, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void msoCompletionRequestWithNoNotificationurl() throws Exception {
+ logStart();
+
+ //Execute Flow
+ executeFlow(gMsoCompletionRequestWithNoNotificationurl());
+
+ //Verify Error
+ String CMSO_ResponseCode = BPMNUtil.getVariable(processEngineRule, "CompleteMsoProcess", "CMSO_ResponseCode");
+ Assert.assertEquals("200", CMSO_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void msoCompletionRequestWithNotificationurlNoRequestId() throws Exception {
+ logStart();
+
+ //Execute Flow
+ executeFlow(gMsoCompletionRequestWithNotificationurlNoRequestId());
+
+ //Verify Error
+ String CMSO_ResponseCode = BPMNUtil.getVariable(processEngineRule, "CompleteMsoProcess", "CMSO_ResponseCode");
+ Assert.assertEquals("200", CMSO_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void msoCompletionRequestWithNoNotificationurlNoRequestId() throws Exception {
+ logStart();
+
+ //Execute Flow
+ executeFlow(gMsoCompletionRequestWithNoNotificationurlNoRequestId());
+
+ //Verify Error
+ String CMSO_ResponseCode = BPMNUtil.getVariable(processEngineRule, "CompleteMsoProcess", "CMSO_ResponseCode");
+ Assert.assertEquals("200", CMSO_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+ logEnd();
+ }
+
+ public String gMsoCompletionRequestWithNotificationurl() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://ecomp.openecomp.org.com/mso/workflow/schema/v1\">"
+ + " <ns:request-information>"
+ + " <ns:request-id>uCPE1020_STUW105_5002</ns:request-id>"
+ + " <ns:request-action>Layer3ServiceActivateRequest</ns:request-action>"
+ + " <ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+ + " <ns:source>OMX</ns:source>"
+ + " <ns:notification-url>https://t3nap1a1.snt.bst.bls.com:9004/sdncontroller-sdncontroller-inbound-ws-war/sdncontroller-sdncontroller-inbound-ws.wsdl</ns:notification-url>"
+ + " <ns:order-number>10205000</ns:order-number>"
+ + " <ns:order-version>1</ns:order-version>"
+ + " </ns:request-information>"
+ + " <sdncadapterworkflow:mso-bpel-name>UCPELayer3ServiceActivateV1</sdncadapterworkflow:mso-bpel-name>"
+ + "</sdncadapterworkflow:MsoCompletionRequest>";
+
+ return xml;
+ }
+
+
+
+ public String gMsoCompletionRequestWithNoNotificationurl() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://openecomp.org/mso/workflow/schema/v1\">"
+ + " <ns:request-information>"
+ + " <ns:request-id>uCPE1020_STUW105_5002</ns:request-id>"
+ + " <ns:request-action>Layer3ServiceActivateRequest</ns:request-action>"
+ + " <ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+ + " <ns:source>OMX</ns:source>"
+ + " <ns:notification-url></ns:notification-url>"
+ + " <ns:order-number>10205000</ns:order-number>"
+ + " <ns:order-version>1</ns:order-version>"
+ + " </ns:request-information>"
+ + " <sdncadapterworkflow:mso-bpel-name>UCPELayer3ServiceActivateV1</sdncadapterworkflow:mso-bpel-name>"
+ + "</sdncadapterworkflow:MsoCompletionRequest>";
+
+ return xml;
+ }
+
+ public String gMsoCompletionRequestWithNoNotificationurlNoRequestId() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://openecomp.org/mso/workflow/schema/v1\">"
+ + " <ns:request-information>"
+ + " <ns:request-id></ns:request-id>"
+ + " <ns:request-action>Layer3ServiceActivateRequest</ns:request-action>"
+ + " <ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+ + " <ns:source>OMX</ns:source>"
+ + " <ns:notification-url></ns:notification-url>"
+ + " <ns:order-number>10205000</ns:order-number>"
+ + " <ns:order-version>1</ns:order-version>"
+ + " </ns:request-information>"
+ + " <sdncadapterworkflow:mso-bpel-name>UCPELayer3ServiceActivateV1</sdncadapterworkflow:mso-bpel-name>"
+ + "</sdncadapterworkflow:MsoCompletionRequest>";
+
+ return xml;
+ }
+
+ public String gMsoCompletionRequestWithNotificationurlNoRequestId() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://openecomp.org/mso/workflow/schema/v1\">"
+ + " <ns:request-information>"
+ + " <ns:request-id></ns:request-id>"
+ + " <ns:request-action>Layer3ServiceActivateRequest</ns:request-action>"
+ + " <ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+ + " <ns:source>OMX</ns:source>"
+ + " <ns:notification-url>https://t3nap1a1.snt.bst.bls.com:9004/sdncontroller-sdncontroller-inbound-ws-war/sdncontroller-sdncontroller-inbound-ws.wsdl</ns:notification-url>"
+ + " <ns:order-number>10205000</ns:order-number>"
+ + " <ns:order-version>1</ns:order-version>"
+ + " </ns:request-information>"
+ + " <sdncadapterworkflow:mso-bpel-name>UCPELayer3ServiceActivateV1</sdncadapterworkflow:mso-bpel-name>"
+ + "</sdncadapterworkflow:MsoCompletionRequest>";
+
+ return xml;
+ }
+}
+
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java
new file mode 100644
index 0000000000..5b10b8b89e
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java
@@ -0,0 +1,133 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+
+/**
+ * Unit test cases for ConfirmVolumeGroupName.bpmn
+ */
+public class ConfirmVolumeGroupNameTest extends WorkflowTest {
+ /**
+ * Sunny day scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/ConfirmVolumeGroupName.bpmn"
+ })
+ public void sunnyDay() throws Exception {
+
+ logStart();
+ MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml");
+
+ System.out.println("Before starting process");
+
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
+ variables.put("ConfirmVolumeGroupName_volumeGroupName", "VOLUME_GROUP_ID_1_NAME");
+ variables.put("ConfirmVolumeGroupName_aicCloudRegion", "MDTWNJ21");
+ System.out.println("after setting variables");
+ runtimeService.startProcessInstanceByKey("ConfirmVolumeGroupName", variables);
+ String response = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponse");
+ String responseCode = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponseCode");
+
+ assertEquals("200", responseCode);
+ System.out.println(response);
+ logEnd();
+ }
+
+ /**
+ * Rainy day scenario - nonexisting volume group id.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/ConfirmVolumeGroupName.bpmn"
+ })
+ public void rainyDayNoVolumeGroupId() throws Exception {
+
+ logStart();
+ MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml");
+
+ System.out.println("Before starting process");
+
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST");
+ variables.put("ConfirmVolumeGroupName_volumeGroupName", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
+ System.out.println("after setting variables");
+ runtimeService.startProcessInstanceByKey("ConfirmVolumeGroupName", variables);
+ String response = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponse");
+ String responseCode = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponseCode");
+
+ assertEquals("404", responseCode);
+ System.out.println(response);
+
+ logEnd();
+ }
+
+ /**
+ * Rainy day scenario - volume group name does not match the name in AAI
+ *
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/ConfirmVolumeGroupName.bpmn"
+ })
+ public void rainyDayNameDoesNotMatch() throws Exception {
+
+ logStart();
+ MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml");
+
+ System.out.println("Before starting process");
+
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
+ variables.put("ConfirmVolumeGroupName_volumeGroupName", "BAD_VOLUME_GROUP_NAME");
+ System.out.println("after setting variables");
+ runtimeService.startProcessInstanceByKey("ConfirmVolumeGroupName", variables);
+ String response = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponse");
+ String responseCode = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponseCode");
+
+ assertEquals("404", responseCode);
+ System.out.println(response);
+
+ logEnd();
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java
new file mode 100644
index 0000000000..e62742da30
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java
@@ -0,0 +1,91 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+/**
+ * Please describe the ConfirmVolumeGroupTenantTest.java class
+ *
+ */
+public class ConfirmVolumeGroupTenantTest extends WorkflowTest {
+
+ @Test
+ @Deployment(resources = {"subprocess/ConfirmVolumeGroupTenant.bpmn"})
+ public void testRemoveLayer3Service_success() throws Exception{
+ MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String actualNameMatch = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupTenant", "groupNamesMatch");
+ String actualIdMatch = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupTenant", "tenantIdsMatch");
+ String actualResponse = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupTenant", "volumeHeatStackId");
+
+ assertEquals("Response", "true", actualNameMatch);
+ assertEquals("Response", "true", actualIdMatch);
+ assertEquals("Response", "MoG_CinderVolumes_2/19387dc6-060f-446e-b41f-dcfd29c73845", actualResponse);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/ConfirmVolumeGroupTenant.bpmn"})
+ public void testRemoveLayer3Service_idsNotMatch() throws Exception{
+ MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String actualNameMatch = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupTenant", "groupNamesMatch");
+ String actualIdMatch = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupTenant", "tenantIdsMatch");
+ String actualResponse = BPMNUtil.getVariable(processEngineRule, "ConfirmVolumeGroupTenant", "WorkflowException");
+
+ assertEquals("Response", "true", actualNameMatch);
+ assertEquals("Response", "false", actualIdMatch);
+ assertEquals("Response", "WorkflowException[processKey=ConfirmVolumeGroupTenant,errorCode=1,errorMessage=Volume Group a8399879-31b3-4973-be26-0a0cbe776b58 does not belong to your tenant]", actualResponse);
+
+ }
+
+ private void setVariables(Map<String, String> variables) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("volumeGroupId","a8399879-31b3-4973-be26-0a0cbe776b58");
+ variables.put("tenantId", "7dd5365547234ee8937416c65507d266");
+ variables.put("aicCloudRegion", "MDTWNJ21");
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java
new file mode 100644
index 0000000000..63b1f77619
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java
@@ -0,0 +1,277 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+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.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIGenericVnfSearch;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * Unit test for CreateAAIVfModule.bpmn.
+ */
+public class CreateAAIVfModuleTest extends WorkflowTest {
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestCreateGenericVnfSuccess_200() {
+
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfName", "STMTN5MMSC22");
+ variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC22-MMSC::module-0-0");
+ variables.put("vfModuleModelName", "MMSC::module-0");
+
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ String response = BPMNUtil.getVariable(processEngineRule, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode");
+ String responseCode = BPMNUtil.getVariable(processEngineRule, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode");
+ Assert.assertEquals("201", responseCode);
+ System.out.println(response);
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestCreateVfModuleSuccess_200() {
+ // create Add-on VF Module for existing Generic VNF
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC21-MMSC::module-1-0");
+ variables.put("vfModuleModelName", "STMTN5MMSC21-MMSC::model-1-0");
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ String response = BPMNUtil.getVariable(processEngineRule, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode");
+ String responseCode = BPMNUtil.getVariable(processEngineRule, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode");
+ Assert.assertEquals("201", responseCode);
+ System.out.println(response);
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestQueryGenericVnfFailure_5000() {
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfName", "STMTN5MMSC23");
+ variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC23-MMSC::module-0-0");
+ variables.put("vfModuleModelName", "MMSC::module-0");
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "CreateAAIVfModule", "WorkflowException");
+ Assert.assertEquals(500, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("Error occurred attempting to query AAI"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestCreateDupGenericVnfFailure_1002() {
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfName", "STMTN5MMSC21");
+ variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC21-MMSC::module-0-0");
+ variables.put("vfModuleModelName", "MMSC::module-0");
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "CreateAAIVfModule", "WorkflowException");
+ Assert.assertEquals(1002, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("Invalid request for new Generic VNF which already exists"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestCreateDupVfModuleFailure_1002() {
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfId", "2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4");
+ variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC20-MMSC::module-1-0");
+ variables.put("vfModuleModelName", "STMTN5MMSC20-MMSC::model-1-0");
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "CreateAAIVfModule", "WorkflowException");
+ Assert.assertEquals(1002, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("already exists for Generic VNF"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestCreateGenericVnfFailure_5000() {
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfName", "STMTN5MMSC22");
+ variables.put("serviceId", "99999999-9999-9999-9999-999999999999");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC22-PCRF::module-1-0");
+ variables.put("vfModuleModelName", "PCRF::module-0");
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "CreateAAIVfModule", "WorkflowException");
+ Assert.assertEquals(5000, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestCreateGenericVnfFailure_1002() {
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfId", "768073c7-f41f-4822-9323-b75962763d74");
+ variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC22-PCRF::module-1-0");
+ variables.put("vfModuleModelName", "PCRF::module-0");
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "CreateAAIVfModule", "WorkflowException");
+ Assert.assertEquals(1002, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("Generic VNF Not Found"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModule.bpmn"
+ })
+ public void TestCreateVfModuleFailure_5000() {
+ MockAAIGenericVnfSearch();
+ MockAAICreateGenericVnf();
+ MockAAIVfModulePUT(true);
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("isVidRequest", "false");
+ variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("serviceId", "99999999-9999-9999-9999-999999999999");
+ variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("personaModelVersion", "1.0");
+ variables.put("vfModuleName", "STMTN5MMSC21-PCRF::module-1-0");
+ variables.put("vfModuleModelName", "STMTN5MMSC21-PCRF::model-1-0");
+ runtimeService.startProcessInstanceByKey("CreateAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "CreateAAIVfModule", "WorkflowException");
+ Assert.assertEquals(5000, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ public static void MockAAICreateGenericVnf(){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+ .withRequestBody(containing("<service-id>00000000-0000-0000-0000-000000000000</service-id>"))
+ .willReturn(aResponse()
+ .withStatus(201)));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+ .withRequestBody(containing("<service-id>99999999-9999-9999-9999-999999999999</service-id>"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ }
+
+ // start of mocks used locally and by other VF Module unit tests
+ public static void MockAAIVfModulePUT(boolean isCreate){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("MMSC"))
+ .willReturn(aResponse()
+ .withStatus(isCreate ? 201 : 200)));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("PCRF"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java
new file mode 100644
index 0000000000..f1a2d7b4e2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for CreateAAIVfModuleVolumeGroup.bpmn.
+ */
+public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest {
+
+ /**
+ * Test the happy path through the flow.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModuleVolumeGroup.bpmn"
+ })
+ public void happyPath() throws IOException {
+
+ logStart();
+
+ String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
+ MockGetGenericVnfByIdWithPriority("skask", "lukewarm", 200, "VfModularity/VfModule-lukewarm.xml", 2);
+ MockPutVfModuleIdNoResponse("skask", "PCRF", "lukewarm");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
+ invokeSubProcess("CreateAAIVfModuleVolumeGroup", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(200, responseCode.intValue());
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI returns a 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModuleVolumeGroup.bpmn"
+ })
+ public void badGet() throws IOException {
+
+ logStart();
+
+ String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
+ MockGetVfModuleId("skask", ".*", "VfModularity/VfModule-supercool.xml", 404);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
+ invokeSubProcess("CreateAAIVfModuleVolumeGroup", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_getVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_getVfModuleResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI is successful, but he subsequent PUT returns 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/CreateAAIVfModuleVolumeGroup.bpmn"
+ })
+ public void badPut() throws IOException {
+
+ logStart();
+
+ String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
+ MockGetVfModuleId("skask", "lukewarm", "VfModularity/VfModule-lukewarm.xml", 200);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
+ invokeSubProcess("CreateAAIVfModuleVolumeGroup", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+
+ logEnd();
+ }
+}
+
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java
new file mode 100644
index 0000000000..d8e003766d
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java
@@ -0,0 +1,643 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+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.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * Unit test for DeleteAAIVfModule.bpmn.
+ */
+public class DeleteAAIVfModuleTest extends WorkflowTest {
+ private static final String EOL = "\n";
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestDeleteGenericVnfSuccess_200() {
+ // delete the Base Module and Generic Vnf
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id> <vnf-name>STMTN5MMSC21</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id> <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ String response = BPMNUtil.getVariable(processEngineRule, "DeleteAAIVfModule", "DAAIVfMod_deleteGenericVnfResponseCode");
+ String responseCode = BPMNUtil.getVariable(processEngineRule, "DeleteAAIVfModule", "DAAIVfMod_deleteGenericVnfResponseCode");
+ Assert.assertEquals("200", responseCode);
+ System.out.println(response);
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestDeleteVfModuleSuccess_200() {
+ // delete Add-on Vf Module for existing Generic Vnf
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c720, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a75
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest",request);
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ String response = BPMNUtil.getVariable(processEngineRule, "DeleteAAIVfModule", "DAAIVfMod_deleteVfModuleResponseCode");
+ String responseCode = BPMNUtil.getVariable(processEngineRule, "DeleteAAIVfModule", "DAAIVfMod_deleteVfModuleResponseCode");
+ Assert.assertEquals("200", responseCode);
+ System.out.println(response);
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestQueryGenericVnfFailure_5000() {
+ // query Generic Vnf failure (non-404) with A&AI
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c723, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a71
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c723</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC23</vnf-name>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a71</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest",request);
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "DeleteAAIVfModule", "WorkflowException");
+ Assert.assertEquals(5000, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestQueryGenericVnfFailure_1002() {
+ // attempt to delete Vf Module for Generic Vnf that does not exist (A&AI returns 404)
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c722, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a72
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c722</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC22</vnf-name>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a72</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC22-MMSC::module-1-0</vf-module-name>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest",request);
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "DeleteAAIVfModule", "WorkflowException");
+ Assert.assertEquals(1002, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("Generic VNF Not Found"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestDeleteGenericVnfFailure_5000() {
+ // A&AI failure (non-200) when attempting to delete a Generic Vnf
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c718, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a78
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c718</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC18</vnf-name>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC18-MMSC::module-0-0</vf-module-name>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest",request);
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "DeleteAAIVfModule", "WorkflowException");
+ Assert.assertEquals(5000, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestDeleteVfModuleFailure_5000() {
+ // A&AI failure (non-200) when attempting to delete a Vf Module
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c719, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a77
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c719</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC19</vnf-name>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC19-MMSC::module-1-0</vf-module-name>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest",request);
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "DeleteAAIVfModule", "WorkflowException");
+ Assert.assertEquals(5000, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestDeleteVfModuleFailure_1002_1() {
+ // failure attempting to delete Base Module when not the last Vf Module
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c720, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a74
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest",request);
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "DeleteAAIVfModule", "WorkflowException");
+ Assert.assertEquals(1002, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("is Base Module, not Last Module"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DeleteAAIVfModule.bpmn"
+ })
+ public void TestDeleteVfModuleFailure_1002_2() {
+ // failure attempting to delete a Vf Module that does not exist (A&AI returns 404)
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c720, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a76
+ MockAAIGenericVnfSearch();
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id> <vnf-name>STMTN5MMSC20</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id> <vf-module-name>STMTN5MMSC20-MMSC::module-2-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
+ runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
+ WorkflowException exception = BPMNUtil.getRawVariable(processEngineRule, "DeleteAAIVfModule", "WorkflowException");
+ Assert.assertEquals(1002, exception.getErrorCode());
+ Assert.assertEquals(true, exception.getErrorMessage().contains("does not exist for Generic Vnf Id"));
+ System.out.println(exception.getErrorMessage());
+ }
+
+ // Start of VF Modularization A&AI mocks
+
+ public static void MockAAIGenericVnfSearch(){
+ String body;
+
+ // The following stubs are for CreateAAIVfModule and UpdateAAIVfModule
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC23&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC22&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/768073c7-f41f-4822-9323-b75962763d74[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+
+ body =
+ "<generic-vnf xmlns=\"http://com.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>1508691</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC21&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>1508691</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC20&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ // The following stubs are for DeleteAAIVfModule
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c723[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c722[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000021</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000073</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000020</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000074</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000075</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c719</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC19</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000019</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC19-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000076</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC19-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000077</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c718</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC18</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000018</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC18-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000078</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000021</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000073</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+ }
+ public static void MockAAIDeleteGenericVnf(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/[?]resource-version=0000021"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/[?]resource-version=0000018"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ }
+
+ public static void MockAAIDeleteVfModule(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73/[?]resource-version=0000073"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a75/[?]resource-version=0000075"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a78/[?]resource-version=0000078"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a77/[?]resource-version=0000077"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.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/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java
new file mode 100644
index 0000000000..5223bca386
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java
@@ -0,0 +1,230 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+/**
+ * Unit test for FalloutHandler.bpmn.
+ */
+public class FalloutHandlerTest extends WorkflowTest {
+ private void setupMocks() {
+ stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("<DbTag>Notified</DbTag>")));
+ }
+
+ private void executeFlow(String inputRequestFile) throws InterruptedException {
+ String method = getClass().getSimpleName() + "." + new Object() {
+ }.getClass().getEnclosingMethod().getName();
+ System.out.println("STARTED TEST: " + method);
+
+ //String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);
+ Map<String, String> variables = new HashMap<String, String>();
+ variables.put("FalloutHandlerRequest",inputRequestFile);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "FalloutHandler", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+ System.out.println("ENDED TEST: " + method);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/FalloutHandler.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void msoFalloutHandlerWithNotificationurl_200() throws Exception{
+ String method = getClass().getSimpleName() + "." + new Object() {
+ }.getClass().getEnclosingMethod().getName();
+ System.out.println("STARTED TEST: " + method);
+
+ //Setup Mocks
+ setupMocks();
+ //Execute Flow
+ executeFlow(gMsoFalloutHandlerWithNotificationurl());
+ //Verify Error
+ String FH_ResponseCode = BPMNUtil.getVariable(processEngineRule, "FalloutHandler", "FH_ResponseCode");
+ Assert.assertEquals("200", FH_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "FalloutHandler", "FH_SuccessIndicator"));
+ }
+
+ public String gMsoFalloutHandlerWithNotificationurl() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns7=\"http://org.openecomp/mso/request/types/v1\">"
+ + " <ns7:request-information>"
+ + " <ns7:request-id>uCPE1020_STUW105_5002</ns7:request-id>"
+ + " <ns7:request-action>Layer3ServiceActivateRequest</ns7:request-action>"
+ + " <ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+ + " <ns7:source>OMX</ns7:source>"
+ + " <ns7:notification-url>http://localhost:28090/CCD/StatusNotification</ns7:notification-url>"
+ + " <ns7:order-number>10205000</ns7:order-number>"
+ + " <ns7:order-version>1</ns7:order-version>"
+ + " </ns7:request-information>"
+ + " <sdncadapterworkflow:WorkflowException>"
+ + " <sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+ + " <sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+ + " <sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+ + " </sdncadapterworkflow:WorkflowException>"
+ + "</sdncadapterworkflow:FalloutHandlerRequest>";
+
+ return xml;
+
+ }
+
+
+
+
+ @Test
+ @Deployment(resources = {"subprocess/FalloutHandler.bpmn"})
+ public void msoFalloutHandlerWithNoNotificationurl() throws Exception{
+ String method = getClass().getSimpleName() + "." + new Object() {
+ }.getClass().getEnclosingMethod().getName();
+ System.out.println("STARTED TEST: " + method);
+ //Setup Mocks
+ setupMocks();
+ //Execute Flow
+ executeFlow(gMsoFalloutHandlerWithNoNotificationurl());
+ //Verify Error
+ String FH_ResponseCode = BPMNUtil.getVariable(processEngineRule, "FalloutHandler", "FH_ResponseCode");
+ Assert.assertEquals("200", FH_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "FalloutHandler", "FH_SuccessIndicator"));
+ }
+
+ public String gMsoFalloutHandlerWithNoNotificationurl() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns7=\"http://org.openecomp/mso/request/types/v1\">"
+ + " <ns7:request-information>"
+ + " <ns7:request-id>uCPE1020_STUW105_5002</ns7:request-id>"
+ + " <ns7:request-action>Layer3ServiceActivateRequest</ns7:request-action>"
+ + " <ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+ + " <ns7:source>OMX</ns7:source>"
+ + " <ns7:notification-url></ns7:notification-url>"
+ + " <ns7:order-number>10205000</ns7:order-number>"
+ + " <ns7:order-version>1</ns7:order-version>"
+ + " </ns7:request-information>"
+ + " <sdncadapterworkflow:WorkflowException>"
+ + " <sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+ + " <sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+ + " <sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+ + " </sdncadapterworkflow:WorkflowException>"
+ + "</sdncadapterworkflow:FalloutHandlerRequest>";
+
+ return xml;
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/FalloutHandler.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void msoFalloutHandlerWithNotificationurlNoRequestId() throws Exception{
+ String method = getClass().getSimpleName() + "." + new Object() {
+ }.getClass().getEnclosingMethod().getName();
+ System.out.println("STARTED TEST: " + method);
+ //Setup Mocks
+ setupMocks();
+ //Execute Flow
+ executeFlow(gMsoFalloutHandlerWithNotificationurlNoRequestId());
+ //Verify Error
+ String FH_ResponseCode = BPMNUtil.getVariable(processEngineRule, "FalloutHandler", "FH_ResponseCode");
+ Assert.assertEquals("200", FH_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "FalloutHandler", "FH_SuccessIndicator"));
+ }
+
+ public String gMsoFalloutHandlerWithNotificationurlNoRequestId() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns7=\"http://org.openecomp/mso/request/types/v1\">"
+ + " <ns7:request-information>"
+ + " <ns7:request-id></ns7:request-id>"
+ + " <ns7:request-action>Layer3ServiceActivateRequest</ns7:request-action>"
+ + " <ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+ + " <ns7:source>OMX</ns7:source>"
+ + " <ns7:notification-url>www.test.com</ns7:notification-url>"
+ + " <ns7:order-number>10205000</ns7:order-number>"
+ + " <ns7:order-version>1</ns7:order-version>"
+ + " </ns7:request-information>"
+ + " <sdncadapterworkflow:WorkflowException>"
+ + " <sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+ + " <sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+ + " <sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+ + " </sdncadapterworkflow:WorkflowException>"
+ + "</sdncadapterworkflow:FalloutHandlerRequest>";
+
+ return xml;
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/FalloutHandler.bpmn"})
+ public void msoFalloutHandlerWithNoNotificationurlNoRequestId() throws Exception{
+ String method = getClass().getSimpleName() + "." + new Object() {
+ }.getClass().getEnclosingMethod().getName();
+ System.out.println("STARTED TEST: " + method);
+ //Setup Mocks
+ setupMocks();
+ //Execute Flow
+ executeFlow(gMsoFalloutHandlerWithNoNotificationurlNoRequestId());
+ //Verify Error
+ String FH_ResponseCode = BPMNUtil.getVariable(processEngineRule, "FalloutHandler", "FH_ResponseCode");
+ Assert.assertEquals("200", FH_ResponseCode);
+ Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngineRule, "FalloutHandler", "FH_SuccessIndicator"));
+ }
+
+ public String gMsoFalloutHandlerWithNoNotificationurlNoRequestId() {
+ //Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+ String xml = ""
+ + "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns7=\"http://org.openecomp/mso/request/types/v1\">"
+ + " <ns7:request-information>"
+ + " <ns7:request-id></ns7:request-id>"
+ + " <ns7:request-action>Layer3ServiceActivateRequest</ns7:request-action>"
+ + " <ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+ + " <ns7:source>OMX</ns7:source>"
+ + " <ns7:notification-url></ns7:notification-url>"
+ + " <ns7:order-number>10205000</ns7:order-number>"
+ + " <ns7:order-version>1</ns7:order-version>"
+ + " </ns7:request-information>"
+ + " <sdncadapterworkflow:WorkflowException>"
+ + " <sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+ + " <sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+ + " <sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+ + " </sdncadapterworkflow:WorkflowException>"
+ + "</sdncadapterworkflow:FalloutHandlerRequest>";
+
+ return xml;
+ }
+
+}
+
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java
new file mode 100644
index 0000000000..e83a644914
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java
@@ -0,0 +1,279 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteServiceInstance;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteServiceInstance_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance_500;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceSubscription;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+
+
+/**
+ * Please describe the GenericDeleteServiceTest.java class
+ *
+ */
+public class GenericDeleteServiceTest extends WorkflowTest {
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_success_serviceInstance() throws Exception{
+ MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+ assertEquals("true", foundIndicator);
+ assertEquals("true", successIndicator);
+ assertEquals("true", resourceVersionProvidedFlag);
+ assertEquals(null, workflowException);
+ }
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_success_serviceSubscription() throws Exception{
+
+ MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ assertEquals("true", foundIndicator);
+ assertEquals("true", successIndicator);
+ assertEquals("true", resourceVersionProvidedFlag);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_success_instanceNoResourceVersion() throws Exception {
+ MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceSubscription.xml");
+ MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ assertEquals("true", foundIndicator);
+ assertEquals("true", successIndicator);
+ assertEquals("false", resourceVersionProvidedFlag);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_success_subscriptionNoResourceVersion() throws Exception{
+ MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
+ MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesSubscription(variables, null, "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ assertEquals("true", foundIndicator);
+ assertEquals("true", successIndicator);
+ assertEquals("false", resourceVersionProvidedFlag);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_success_get404Response() throws Exception{
+
+ MockGetServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ assertEquals("false", foundIndicator);
+ assertEquals("true", successIndicator);
+ assertEquals("false", resourceVersionProvidedFlag);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_success_subscriptionGetEmpty200() throws Exception{
+ MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 200);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ assertEquals("false", foundIndicator);
+ assertEquals("true", successIndicator);
+ assertEquals("false", resourceVersionProvidedFlag);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_success_delete404Response() throws Exception{
+
+ MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GENDSI_getServiceInstanceResponse.xml");
+ MockDeleteServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ assertEquals("false", foundIndicator);
+ assertEquals("true", successIndicator);
+ assertEquals("true", resourceVersionProvidedFlag);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_error_invalidVariables() throws Exception{
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "1234");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ String expectedResponse = "WorkflowException[processKey=GenericDeleteService,errorCode=500,errorMessage=Incoming Required Variable is Missing or Null!]";
+
+ assertEquals("false", foundIndicator);
+ assertEquals("false", successIndicator);
+ assertEquals("true", resourceVersionProvidedFlag);
+ assertEquals(expectedResponse, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
+ public void testGenericDeleteService_error_getBadAAIResponse() throws Exception{
+
+ MockGetServiceInstance_500("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "aaiFault.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_SuccessIndicator");
+ String foundIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_FoundIndicator");
+ String resourceVersionProvidedFlag = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "GENDS_resourceVersionProvidedFlag");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteService", "WorkflowException");
+
+ String expectedResponse = "WorkflowException[processKey=GenericDeleteService,errorCode=500,errorMessage=<requestError><serviceException><messageId>SVC3002</messageId><text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text><variables><variable>PUTcustomer</variable><variable>SubName01</variable><variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable><variable>ERR.5.4.5105</variable></variables></serviceException></requestError>" + "\n" +
+ "]";
+
+ assertEquals("false", foundIndicator);
+ assertEquals("false", successIndicator);
+ assertEquals("false", resourceVersionProvidedFlag);
+ assertEquals(expectedResponse, workflowException);
+ }
+
+
+ private void setVariablesInstance(Map<String, String> variables, String siId, String globalCustId, String serviceType, String reVersion) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("GENDS_serviceInstanceId", siId);
+ variables.put("GENDS_globalCustomerId",globalCustId);
+ variables.put("GENDS_serviceType", serviceType);
+ variables.put("GENDS_resourceVersion", reVersion);
+ variables.put("GENDS_type", "service-instance");
+ }
+
+ private void setVariablesSubscription(Map<String, String> variables, String siId, String globalCustId, String serviceType, String reVersion) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("GENDS_serviceInstanceId", siId);
+ variables.put("GENDS_globalCustomerId",globalCustId);
+ variables.put("GENDS_serviceType", serviceType);
+ variables.put("GENDS_resourceVersion", reVersion);
+ variables.put("GENDS_type", "service-subscription");
+ }
+
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java
new file mode 100644
index 0000000000..dd3fd73afe
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java
@@ -0,0 +1,221 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf_500;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteVce;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVceById;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+/**
+ * Please describe the GenericDeleteVnfTest.java class
+ *
+ */
+public class GenericDeleteVnfTest extends WorkflowTest {
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_success_genericVnf() throws Exception{
+ MockDeleteGenericVnf("testVnfId123", "testReVer123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("true", "true", "true", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_success_vce() throws Exception{
+ MockDeleteVce("testVnfId123", "testReVer123", 204);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "vce", "testReVer123");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("true", "true", "true", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_success_genericVnfNoResourceVersion() throws Exception{
+
+ MockGetGenericVnfById("/testVnfId123", "GenericFlows/getGenericVnfByNameResponse.xml", 200);
+ MockDeleteGenericVnf("testVnfId123", "testReVer123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "generic-vnf", "");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("true", "true", "false", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_success_vceNoResourceVersion() throws Exception{
+ MockDeleteVce("testVnfId123", "testReVer123", 204);
+ MockGetVceById("testVnfId123", "GenericFlows/getVceResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "vce", null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("true", "true", "false", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_success_genericVnf404() throws Exception{
+ MockDeleteGenericVnf("testVnfId123", "testReVer123", 404);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("true", "false", "true", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_success_vce404() throws Exception{
+ MockDeleteVce("testVnfId123", "testReVer123", 404);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "vce", "testReVer123");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("true", "false", "true", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_success_genericVnfNoResourceVersion404() throws Exception{
+ MockGetGenericVnfById_404("testVnfId123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "generic-vnf", "");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("true", "false", "false", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_error_missingVariables() throws Exception{
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "", "testReVer123");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("false", "false", "true", "WorkflowException[processKey=GenericDeleteVnf,errorCode=500,errorMessage=Incoming Required Variable is Missing or Null!]");
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_error_genericVnf500() throws Exception{
+
+ MockDeleteGenericVnf_500("testVnfId123", "testReVer123");
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("false", "false", "true", "WorkflowException[processKey=GenericDeleteVnf,errorCode=500,errorMessage=Received a bad response from AAI]");
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
+ public void testGenericDeleteVnf_error_genericVnf412() throws Exception{
+ MockDeleteGenericVnf("testVnfId123", "testReVer123", 412);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables("false", "false", "true", "WorkflowException[processKey=GenericDeleteVnf,errorCode=412,errorMessage=Delete Vnf Received a resource-version Mismatch Error Response from AAI]");
+
+ }
+
+ private void assertVariables(String exSuccessIndicator, String exFound, String exRVProvided, String exWorkflowException) {
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericDeleteVnf", "GENDV_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericDeleteVnf", "GENDV_FoundIndicator");
+ String rvProvided = BPMNUtil.getVariable(processEngineRule, "GenericDeleteVnf", "GENDV_resourceVersionProvided");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericDeleteVnf", "WorkflowException");
+
+ assertEquals(exSuccessIndicator, successIndicator);
+ assertEquals(exFound, found);
+ assertEquals(exRVProvided, rvProvided);
+ assertEquals(exWorkflowException, workflowException);
+ }
+
+ private void setVariables(Map<String, String> variables, String vnfId, String type, String resourceVer) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("GENDV_vnfId", vnfId);
+ variables.put("GENDV_type", type);
+ variables.put("GENDV_resourceVersion", resourceVer);
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java
new file mode 100644
index 0000000000..2af42db574
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java
@@ -0,0 +1,505 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance_500;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceSubscription;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_500;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_500;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+
+/**
+ * Unit Test for the GenericGetService Sub Flow
+ */
+public class GenericGetServiceTest extends WorkflowTest {
+
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstance() throws Exception{
+ MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertNotNull(response);
+ assertEquals(null, workflowException);
+ }
+
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceSubscription() throws Exception{
+
+ MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesSubscription(variables, "", null , "1604-MVM-26", "SDN-ETHERNET-INTERNET");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertNotNull(response);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstance_byName() throws Exception{
+
+ MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
+ MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, null, "1604-MVM-26", null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("true", byName);
+ assertNotNull(response);
+ assertEquals("200", siUrlResponseCode);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstance_byId() throws Exception{
+
+ MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
+ MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("false", byName);
+ assertNotNull(response);
+ assertEquals("200", siUrlResponseCode);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstance_404Response() throws Exception{
+
+ MockGetServiceInstance_404("SDN-ETHERNET-INTERNET", "123456789", "MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("false", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceSubscription404() throws Exception{
+ MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", 404);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", "1604-MVM-26");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("false", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertNotNull(response);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstanceByName404() throws Exception{
+
+ MockNodeQueryServiceInstanceByName_404("1604-MVM-26");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "", "1604-MVM-26", null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ assertEquals("true", successIndicator);
+ assertEquals("false", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("true", byName);
+ assertEquals("404", siUrlResponseCode);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstanceById404() throws Exception{
+
+ MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ assertEquals("true", successIndicator);
+ assertEquals("false", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals("404", siUrlResponseCode);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstanceEmptyResponse() throws Exception{
+
+ MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", " ");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("false", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstanceByNameEmpty() throws Exception{
+ MockNodeQueryServiceInstanceByName("1604-MVM-26", "");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "", "1604-MVM-26", null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ assertEquals("true", successIndicator);
+ assertEquals("false", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("true", byName);
+ assertEquals("200", siUrlResponseCode);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceInstanceByIdEmpty() throws Exception{
+
+ MockNodeQueryServiceInstanceById("MIS[%]2F1604[%]2F0026[%]2FSW_INTERNET", "");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ assertEquals("true", successIndicator);
+ assertEquals("false", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals("200", siUrlResponseCode);
+ assertEquals(null, workflowException);
+ }
+
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_error_serviceInstanceInvalidVariables() throws Exception{
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, null, null, "SDN-ETHERNET-INTERNET", null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+
+ String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.]";
+
+ assertEquals("false", successIndicator);
+ assertEquals("false", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals(expectedWorkflowException, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_success_serviceSubscriptionInvalidVariables() throws Exception{
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+
+ String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.]";
+
+
+ assertEquals("false", successIndicator);
+ assertEquals("false", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals(expectedWorkflowException, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_error_serviceInstance_getSIBadResponse() throws Exception{
+
+ MockGetServiceInstance_500("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "123456789");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+
+ String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI]";
+
+ assertEquals("false", successIndicator);
+ assertEquals("false", found);
+ assertEquals("false", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals(expectedWorkflowException, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_error_serviceInstance_getUrlByIdBadResponse() throws Exception{
+
+ MockNodeQueryServiceInstanceById_500("MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI]";
+
+ assertEquals("false", successIndicator);
+ assertEquals("false", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("false", byName);
+ assertEquals("500", siUrlResponseCode);
+ assertEquals(expectedWorkflowException, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
+ public void testGenericGetService_error_serviceInstance_getUrlByNameBadResponse() throws Exception{
+
+ MockNodeQueryServiceInstanceByName_500("1604-MVM-26");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariablesInstance(variables, null, "1604-MVM-26", null, null);
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_FoundIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "WorkflowException");
+ String obtainUrl = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrl");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName");
+ String siUrlResponseCode = BPMNUtil.getVariable(processEngineRule, "GenericGetService", "GENGS_obtainSIUrlResponseCode");
+
+ String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI]";
+
+ assertEquals("false", successIndicator);
+ assertEquals("false", found);
+ assertEquals("true", obtainUrl);
+ assertEquals("true", byName);
+ assertEquals("500", siUrlResponseCode);
+ assertEquals(expectedWorkflowException, workflowException);
+ }
+
+
+ private void setVariablesInstance(Map<String, String> variables, String siId, String siName, String globalCustId, String serviceType) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("GENGS_serviceInstanceId", siId);
+ variables.put("GENGS_serviceInstanceName", siName);
+ variables.put("GENGS_globalCustomerId",globalCustId);
+ variables.put("GENGS_serviceType", serviceType);
+ variables.put("GENGS_type", "service-instance");
+ }
+
+ private void setVariablesSubscription(Map<String, String> variables, String siId, String siName, String globalCustId, String serviceType) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("GENGS_serviceInstanceId", siId);
+ variables.put("GENGS_serviceInstanceName", siName);
+ variables.put("GENGS_globalCustomerId",globalCustId);
+ variables.put("GENGS_serviceType", serviceType);
+ variables.put("GENGS_type", "service-subscription");
+ }
+
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java
new file mode 100644
index 0000000000..80105bbb99
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java
@@ -0,0 +1,191 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_500;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByNameWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVceByNameWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVceById;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+/**
+ * Please describe the GenericGetVnfTest.java class
+ *
+ */
+public class GenericGetVnfTest extends WorkflowTest {
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn"})
+ public void testGenericGetVnf_success_genericVnf() throws Exception{
+ MockGetGenericVnfByIdWithDepth("testVnfId123", 1, "GenericFlows/getGenericVnfByNameResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_FoundIndicator");
+ String vnf = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_vnf");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_getVnfByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("false", byName);
+ assertNotNull(response);
+ assertNotNull(vnf);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn"})
+ public void testGenericGetVnf_success_vce() throws Exception{
+ MockGetVceById("testVnfId123[?]depth=1", "GenericFlows/getVceResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "testVnfName123", "vce");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_FoundIndicator");
+ String vnf = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_vnf");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_getVnfByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("false", byName);
+ assertNotNull(response);
+ assertNotNull(vnf);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn"})
+ public void testGenericGetVnf_success_genericVnfByName() throws Exception{
+ MockGetGenericVnfByNameWithDepth("testVnfName123", 1, "GenericFlows/getGenericVnfResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "", "testVnfName123", "generic-vnf");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_FoundIndicator");
+ String vnf = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_vnf");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_getVnfByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("true", byName);
+ assertNotNull(response);
+ assertNotNull(vnf);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn"})
+ public void testGenericGetVnf_success_vceByName() throws Exception{
+ MockGetGenericVceByNameWithDepth("testVnfName123", 1, "GenericFlows/getVceByNameResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, null, "testVnfName123", "vce");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_FoundIndicator");
+ String vnf = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_vnf");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_getVnfByName");
+ String response = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals("true", found);
+ assertEquals("true", byName);
+ assertNotNull(response);
+ assertNotNull(vnf);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Ignore // BROKEN TEST (previously ignored)
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn"})
+ public void testGenericGetVnf_error_genericVnf500() throws Exception{
+
+ MockGetGenericVnfById_500("testVnfId123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_SuccessIndicator");
+ String found = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_FoundIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "WorkflowException");
+ String byName = BPMNUtil.getVariable(processEngineRule, "GenericGetVnf", "GENGV_getVnfByName");
+
+ String expectedWorkflowException = "WorkflowException[processKey=GenericGetVnf,errorCode=500,errorMessage=Incoming VnfId and VnfName are null. VnfId or VnfName is required!]";
+
+ assertEquals("false", successIndicator);
+ assertEquals("false", found);
+ assertEquals("false", byName);
+
+ assertEquals(expectedWorkflowException, workflowException);
+ }
+
+ private void setVariables(Map<String, String> variables, String vnfId, String vnfName, String type) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("GENGV_vnfId", vnfId);
+ variables.put("GENGV_vnfName",vnfName);
+ variables.put("GENGV_type", type);
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java
new file mode 100644
index 0000000000..248cb978dc
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java
@@ -0,0 +1,182 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVce;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+/**
+ * Please describe the GenericPutVnf.java class
+ *
+ */
+public class GenericPutVnfTest extends WorkflowTest {
+
+ private String genericVnfPayload = "<generic-vnf><vnf-id>testId</vnf-id></generic-vnf>";
+ private String vcePayload = "<vce><vnf-id>testId</vnf-id></vce>";
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
+ public void testGenericPutVnf_success_genericVnf() throws Exception{
+
+ MockPutGenericVnf("testVnfId123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "GENPV_SuccessIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
+ public void testGenericPutVnf_success_vce() throws Exception{
+
+ MockPutVce("testVnfId123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", vcePayload, "vce");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "GENPV_SuccessIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "WorkflowException");
+
+ assertEquals("true", successIndicator);
+ assertEquals(null, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
+ public void testGenericPutVnf_error_missingType() throws Exception{
+
+ MockPutGenericVnf("testVnfId123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", genericVnfPayload, "");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "GENPV_SuccessIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "WorkflowException");
+
+ String expectedWFEX = "WorkflowException[processKey=GenericPutVnf,errorCode=500,errorMessage=Incoming Vnf Payload and/or Type is null. These Variables are required!]";
+
+ assertEquals("false", successIndicator);
+ assertEquals(expectedWFEX, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
+ public void testGenericPutVnf_error_missingPayload() throws Exception{
+
+ MockPutGenericVnf("testVnfId123");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", genericVnfPayload, "");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "GENPV_SuccessIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "WorkflowException");
+
+ String expectedWFEX = "WorkflowException[processKey=GenericPutVnf,errorCode=500,errorMessage=Incoming Vnf Payload and/or Type is null. These Variables are required!]";
+
+ assertEquals("false", successIndicator);
+ assertEquals(expectedWFEX, workflowException);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
+ public void testGenericPutVnf_error_404() throws Exception{
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "GENPV_SuccessIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "WorkflowException");
+
+ String expectedWFEX = "WorkflowException[processKey=GenericPutVnf,errorCode=404,errorMessage=Received a bad response from AAI]";
+
+ assertEquals("false", successIndicator);
+ assertEquals(expectedWFEX, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
+ public void testGenericPutVnf_error_400() throws Exception{
+
+ MockPutGenericVnf("/testVnfId123", 400);
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String successIndicator = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "GENPV_SuccessIndicator");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "GenericPutVnf", "WorkflowException");
+
+ String expectedWFEX = "WorkflowException[processKey=GenericPutVnf,errorCode=400,errorMessage=Received a bad response from AAI]";
+
+ assertEquals("false", successIndicator);
+ assertEquals(expectedWFEX, workflowException);
+
+
+ }
+
+ private void setVariables(Map<String, String> variables, String vnfId, String payload, String type) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("GENPV_vnfId", vnfId);
+ variables.put("GENPV_vnfPayload",payload);
+ variables.put("GENPV_type", type);
+ }
+
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java
new file mode 100644
index 0000000000..6fe6df6e11
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java
@@ -0,0 +1,210 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for PrepareUpdateAAIVfModule.bpmn.
+ */
+public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
+
+ /**
+ * Test the happy path through the flow.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/PrepareUpdateAAIVfModule.bpmn"
+ })
+ public void happyPath() throws IOException {
+
+ logStart();
+
+ String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml");
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutGenericVnf("/skask/vf-modules/vf-module/supercool", "PCRF", 200);
+ MockPatchVfModuleId("skask", "supercool");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+ invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(200, responseCode.intValue());
+ String heatStackId = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_heatStackId");
+ System.out.println("Ouput heat-stack-id:" + heatStackId);
+ Assert.assertEquals("slowburn", heatStackId);
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI returns a 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/PrepareUpdateAAIVfModule.bpmn"
+ })
+ public void badGet() throws IOException {
+
+ logStart();
+
+ String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml");
+ MockGetGenericVnfById_404("skask[?]depth=1");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+ invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_getVnfResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_getVnfResponseCode");
+ WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+ Assert.assertNotNull(workflowException);
+ System.out.println("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the validation of the VF Module fails.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/PrepareUpdateAAIVfModule.bpmn"
+ })
+ public void failValidation1() throws IOException {
+
+ logStart();
+
+ String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml").replaceFirst("supercool", "lukewarm");
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+ invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+
+ WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ Assert.assertNotNull(workflowException);
+ System.out.println("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+ Assert.assertTrue(workflowException.getErrorMessage().startsWith("VF Module validation error: Orchestration"));
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the validation of the VF Module fails.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/PrepareUpdateAAIVfModule.bpmn"
+ })
+ public void failValidation2() throws IOException {
+
+ logStart();
+
+ String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml").replaceFirst("supercool", "notsocool");
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+ invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+
+ WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ Assert.assertNotNull(workflowException);
+ System.out.println("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+ Assert.assertTrue(workflowException.getErrorMessage().startsWith("VF Module validation error: VF Module"));
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI is successful, but the subsequent PUT returns 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/PrepareUpdateAAIVfModule.bpmn"
+ })
+ public void badPut() throws IOException {
+
+ logStart();
+
+ String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml");
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+ invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponseCode");
+ WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+ Assert.assertNotNull(workflowException);
+ System.out.println("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+
+ logEnd();
+ }
+}
+
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterCallbackRule.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterCallbackRule.java
new file mode 100644
index 0000000000..f3c3b84d18
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterCallbackRule.java
@@ -0,0 +1,64 @@
+package org.openecomp.mso.bpmn.common;
+
+import javax.xml.ws.Endpoint;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+import org.openecomp.mso.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl;
+
+/**
+ * A JUnit rule that starts the SDNC Adapter Callback Service before
+ * every test, and tears it down after every test. Example:
+ * <pre>
+ * @Rule
+ * public final SDNCAdapterCallbackRule sdncAdapterCallbackRule =
+ * new SDNCAdapterCallbackRule(processEngineRule);
+ * </pre>
+ */
+public class SDNCAdapterCallbackRule implements TestRule {
+ public static final String DEFAULT_ENDPOINT_URL =
+ "http://localhost:28080/mso/SDNCAdapterCallbackService";
+
+ private final ProcessEngineServices processEngineServices;
+ private final String endpointUrl;
+
+ public SDNCAdapterCallbackRule(ProcessEngineServices processEngineServices) {
+ this(processEngineServices, DEFAULT_ENDPOINT_URL);
+ }
+
+ public SDNCAdapterCallbackRule(ProcessEngineServices processEngineServices,
+ String endpointUrl) {
+ this.processEngineServices = processEngineServices;
+ this.endpointUrl = endpointUrl;
+ }
+
+ @Override
+ public Statement apply(final Statement baseStmt, Description description) {
+ return new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ Endpoint endpoint = null;
+
+ try {
+ SDNCAdapterCallbackServiceImpl sdncCallbackService = new SDNCAdapterCallbackServiceImpl();
+ sdncCallbackService.setProcessEngineServices4junit(processEngineServices);
+
+ System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
+ System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
+
+ System.out.println("Publishing Endpoint - " + endpointUrl);
+ endpoint = Endpoint.publish(endpointUrl, sdncCallbackService);
+
+ baseStmt.evaluate();
+ } finally {
+ if (endpoint != null) {
+ System.out.println("Stopping Endpoint - " + endpointUrl);
+ endpoint.stop();
+ }
+ }
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java
new file mode 100644
index 0000000000..846a14f45f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java
@@ -0,0 +1,403 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.core.Response;
+
+import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.runtime.Job;
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.CallbackHeader;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.SDNCAdapterResponse;
+import org.openecomp.mso.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl;
+import org.openecomp.mso.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl.SDNCAdapterExceptionResponse;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit test cases for SDNCAdapterV1.bpmn
+ */
+public class SDNCAdapterV1Test extends WorkflowTest {
+
+ private String sdncAdapterWorkflowRequest;
+ private String sdncAdapterWorkflowRequestAct;
+ private String sdncAdapterCallbackRequestData;
+ private String sdncAdapterCallbackRequestDataNonfinal;
+
+ public SDNCAdapterV1Test() throws IOException {
+ sdncAdapterWorkflowRequest = FileUtil.readResourceFile("sdncadapterworkflowrequest.xml");
+ sdncAdapterWorkflowRequestAct = FileUtil.readResourceFile("sdncadapterworkflowrequest-act.xml");
+ sdncAdapterCallbackRequestData = FileUtil.readResourceFile("sdncadaptercallbackrequestdata.text");
+ sdncAdapterCallbackRequestDataNonfinal = FileUtil.readResourceFile("sdncadaptercallbackrequestdata-nonfinal.text");
+ }
+
+ /**
+ * End-to-End flow - Unit test for SDNCAdapterV1.bpmn
+ * - String input & String response
+ */
+
+ private WorkflowResponse invokeFlow(String workflowRequest) {
+
+ Map<String, Object>valueMap = new HashMap<String, Object>();
+ valueMap.put("value", workflowRequest);
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("sdncAdapterWorkflowRequest", valueMap);
+
+ Map<String, Object> valueMap2 = new HashMap<String, Object>();
+ valueMap2.put("value", "true");
+ variables.put("isDebugLogEnabled", valueMap2);
+
+ VariableMapImpl varMap = new VariableMapImpl();
+ varMap.put("variables", variables);
+
+ //System.out.println("Invoking the flow");
+
+ WorkflowResource workflowResource = new WorkflowResource();
+ workflowResource.setProcessEngineServices4junit(processEngineRule);
+
+ Response response = workflowResource.startProcessInstanceByKey("sdncAdapter", varMap);
+ WorkflowResponse workflowResponse = (WorkflowResponse) response.getEntity();
+
+ //String pid = workflowResponse.getProcessInstanceID();
+ //System.out.println("Back from executing process instance with pid=" + pid);
+ return workflowResponse;
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void sunnyDay() throws InterruptedException {
+
+ mockSDNCAdapter(200);
+
+ //System.out.println("SDNCAdapter sunny day flow Started!");
+
+ ProcessExecutionThread thread = new ProcessExecutionThread(sdncAdapterWorkflowRequest);
+ thread.start();
+ waitForExecutionToStart("sdncAdapter", 3);
+ String pid = getPid();
+
+ assertProcessInstanceNotFinished(pid);
+
+ System.out.println("Injecting SDNC Adapter asynchronous callback message to continue processing");
+ String generatedRequestId = (String) processEngineRule.getRuntimeService().getVariable(pid, "SDNCA_requestId");
+ CallbackHeader callbackHeader = new CallbackHeader();
+ callbackHeader.setRequestId(generatedRequestId);
+ callbackHeader.setResponseCode("200");
+ callbackHeader.setResponseMessage("OK");
+ SDNCAdapterCallbackRequest sdncAdapterCallbackRequest = new SDNCAdapterCallbackRequest();
+ sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
+ sdncAdapterCallbackRequest.setRequestData(sdncAdapterCallbackRequestData);
+ SDNCAdapterCallbackServiceImpl callbackService = new SDNCAdapterCallbackServiceImpl();
+ callbackService.setProcessEngineServices4junit(processEngineRule);
+ SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+ //System.out.println("Back from executing process again");
+
+ assertFalse(sdncAdapterResponse instanceof SDNCAdapterExceptionResponse);
+ assertProcessInstanceFinished(pid);
+
+ //System.out.println("SDNCAdapter sunny day flow Completed!");
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void nonFinalWithTimeout() throws InterruptedException {
+
+ mockSDNCAdapter(200);
+ mockUpdateRequestDB(200, "Database/DBAdapter.xml");
+
+ //System.out.println("SDNCAdapter interim status processing flow Started!");
+
+ ProcessExecutionThread thread = new ProcessExecutionThread(sdncAdapterWorkflowRequestAct);
+ thread.start();
+ waitForExecutionToStart("sdncAdapter", 3);
+ String pid = getPid();
+
+ assertProcessInstanceNotFinished(pid);
+
+ //System.out.println("Injecting SDNC Adapter asynchronous callback message to continue processing");
+ String generatedRequestId = (String) processEngineRule.getRuntimeService().getVariable(pid, "SDNCA_requestId");
+ CallbackHeader callbackHeader = new CallbackHeader();
+ callbackHeader.setRequestId(generatedRequestId);
+ callbackHeader.setResponseCode("200");
+ callbackHeader.setResponseMessage("OK");
+ SDNCAdapterCallbackRequest sdncAdapterCallbackRequest = new SDNCAdapterCallbackRequest();
+ sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
+ sdncAdapterCallbackRequest.setRequestData(sdncAdapterCallbackRequestDataNonfinal);
+ SDNCAdapterCallbackServiceImpl callbackService = new SDNCAdapterCallbackServiceImpl();
+ callbackService.setProcessEngineServices4junit(processEngineRule);
+ SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+ //System.out.println("Back from executing process again");
+
+ assertFalse(sdncAdapterResponse instanceof SDNCAdapterExceptionResponse);
+ assertProcessInstanceNotFinished(pid);
+
+ checkForTimeout(pid);
+
+ assertEquals(true, (Boolean) (getVariable(pid, "continueListening")));
+
+
+ //System.out.println("SDNCAdapter interim status processing flow Completed!");
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void nonFinalThenFinal() throws InterruptedException {
+
+ mockSDNCAdapter(200);
+ mockUpdateRequestDB(200, "Database/DBAdapter.xml");
+
+ //System.out.println("SDNCAdapter non-final then final processing flow Started!");
+
+ // Start the flow
+ ProcessExecutionThread thread = new ProcessExecutionThread(sdncAdapterWorkflowRequestAct);
+ thread.start();
+ waitForExecutionToStart("sdncAdapter", 3);
+ String pid = getPid();
+
+ assertProcessInstanceNotFinished(pid);
+
+ // Inject a "non-final" SDNC Adapter asynchronous callback message
+ //System.out.println("Injecting SDNC Adapter asynchronous callback message to continue processing");
+ String generatedRequestId = (String) processEngineRule.getRuntimeService().getVariable(pid, "SDNCA_requestId");
+ CallbackHeader callbackHeader = new CallbackHeader();
+ callbackHeader.setRequestId(generatedRequestId);
+ callbackHeader.setResponseCode("200");
+ callbackHeader.setResponseMessage("OK");
+ SDNCAdapterCallbackRequest sdncAdapterCallbackRequest = new SDNCAdapterCallbackRequest();
+ sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
+ sdncAdapterCallbackRequest.setRequestData(sdncAdapterCallbackRequestDataNonfinal);
+ SDNCAdapterCallbackServiceImpl callbackService = new SDNCAdapterCallbackServiceImpl();
+ callbackService.setProcessEngineServices4junit(processEngineRule);
+ SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+ //System.out.println("Back from executing process again");
+
+ assertFalse(sdncAdapterResponse instanceof SDNCAdapterExceptionResponse);
+ assertProcessInstanceNotFinished(pid);
+ assertEquals(true, (Boolean) (getVariable(pid, "continueListening")));
+
+ // Inject a "final" SDNC Adapter asynchronous callback message
+ sdncAdapterCallbackRequest.setRequestData(sdncAdapterCallbackRequestData);
+ sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+ //System.out.println("Back from executing process again");
+
+ assertFalse(sdncAdapterResponse instanceof SDNCAdapterExceptionResponse);
+ assertProcessInstanceFinished(pid);
+ assertEquals(false, (Boolean) (getVariable(pid, "continueListening")));
+
+ //System.out.println("SDNCAdapter non-final then final processing flow Completed!");
+ }
+
+
+
+ private void waitForExecutionToStart(String processDefintion, int count) throws InterruptedException {
+ //System.out.println(processEngineRule.getRuntimeService().createExecutionQuery().processDefinitionKey(processDefintion).count());
+ while (processEngineRule.getRuntimeService().createExecutionQuery().processDefinitionKey(processDefintion).count() != count) {
+ Thread.sleep(200);
+ }
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void badCorrelationIdTest() throws InterruptedException {
+
+ mockSDNCAdapter(200);
+
+ //System.out.println("SDNCAdapter bad RequestId test Started!");
+
+ ProcessExecutionThread thread = new ProcessExecutionThread(sdncAdapterWorkflowRequest);
+ thread.start();
+ waitForExecutionToStart("sdncAdapter", 3);
+ String pid = getPid();
+ assertProcessInstanceNotFinished(pid);
+
+ //System.out.println("Injecting SDNC Adapter asynchronous callback message to continue processing");
+ String badRequestId = "This is not the RequestId that was used";
+ CallbackHeader callbackHeader = new CallbackHeader();
+ callbackHeader.setRequestId(badRequestId);
+ callbackHeader.setResponseCode("200");
+ callbackHeader.setResponseMessage("OK");
+ SDNCAdapterCallbackRequest sdncAdapterCallbackRequest = new SDNCAdapterCallbackRequest();
+ sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
+ sdncAdapterCallbackRequest.setRequestData(sdncAdapterCallbackRequestData);
+ SDNCAdapterCallbackServiceImpl callbackService = new SDNCAdapterCallbackServiceImpl();
+ callbackService.setProcessEngineServices4junit(processEngineRule);
+ SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+ //System.out.println("Back from executing process again");
+
+ assertTrue(sdncAdapterResponse instanceof SDNCAdapterExceptionResponse);
+ assertTrue(((SDNCAdapterExceptionResponse) sdncAdapterResponse).getException() instanceof IllegalStateException);
+ assertProcessInstanceNotFinished(pid);
+
+ //System.out.println("SDNCAdapter bad RequestId test Completed!");
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void badSynchronousResponse() throws IOException, InterruptedException {
+
+ mockSDNCAdapter(404);
+
+ //System.out.println("SDNCAdapter bad synchronous response flow Started!");
+
+ ProcessExecutionThread thread = new ProcessExecutionThread(sdncAdapterWorkflowRequest);
+ thread.start();
+ while (thread.isAlive()) {
+ Thread.sleep(200);
+ }
+ WorkflowResponse response = thread.workflowResponse;
+ Assert.assertNotNull(response);
+ Assert.assertEquals("404 error", response.getMessageCode(),7000);
+// assertProcessInstanceFinished(response.getProcessInstanceID());
+ //System.out.println("SDNCAdapter bad synchronous response flow Completed!");
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void sdncNotFound() throws IOException, InterruptedException {
+ mockSDNCAdapter(200);
+ mockSDNCAdapter("/sdncAdapterMock/404", 400, "sdncCallbackErrorResponse.xml");
+
+ ProcessExecutionThread thread = new ProcessExecutionThread(sdncAdapterWorkflowRequest);
+ thread.start();
+ waitForExecutionToStart("sdncAdapter", 3);
+ String pid = getPid();
+
+ //System.out.println("Injecting SDNC Adapter asynchronous callback message to continue processing");
+ String generatedRequestId = (String) processEngineRule.getRuntimeService().getVariable(pid, "SDNCA_requestId");
+ CallbackHeader callbackHeader = new CallbackHeader();
+ callbackHeader.setRequestId(generatedRequestId);
+ callbackHeader.setResponseCode("404");
+ callbackHeader.setResponseMessage("Error processing request to SDNC. Not Found. https://sdncodl.it.us.aic.cip.com:8443/restconf/config/L3SDN-API:services/layer3-service-list/AS%2FVLXM%2F000199%2F%2FSB_INTERNET. SDNC Returned-[error-type:application, error-tag:data-missing, error-message:Request could not be completed because the relevant data model content does not exist.]");
+ SDNCAdapterCallbackRequest sdncAdapterCallbackRequest = new SDNCAdapterCallbackRequest();
+ sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
+ SDNCAdapterCallbackServiceImpl callbackService = new SDNCAdapterCallbackServiceImpl();
+ callbackService.setProcessEngineServices4junit(processEngineRule);
+ SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+ //System.out.println("Back from executing process again");
+
+ assertProcessInstanceFinished(pid);
+ assertNotNull(sdncAdapterResponse);
+ //TODO query history to see SDNCA_ResponseCode, SDNCA_ErrorResponse
+ //System.out.println("SDNCAdapter SDNC Notfound test Completed!");
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/GenericNotificationService.bpmn"
+ })
+ public void asynchronousMessageTimeout() throws IOException, InterruptedException {
+ mockSDNCAdapter(200);
+ //System.out.println("SDNCAdapter asynchronous message timeout flow Started!");
+ ProcessExecutionThread thread = new ProcessExecutionThread(sdncAdapterWorkflowRequest);
+ thread.start();
+ waitForExecutionToStart("sdncAdapter", 3);
+ checkForTimeout(getPid());
+ }
+
+ private void checkForTimeout(String pid) throws InterruptedException {
+
+ assertProcessInstanceNotFinished(pid);
+
+ ProcessEngineConfigurationImpl processEngineConfiguration =
+ (ProcessEngineConfigurationImpl) processEngineRule.getProcessEngine().getProcessEngineConfiguration();
+ assertTrue(processEngineConfiguration.getJobExecutor().isActive());
+
+ Job timerJob = processEngineRule.getManagementService().createJobQuery().processInstanceId(pid).singleResult();
+ assertNotNull(timerJob);
+
+ processEngineRule.getManagementService().executeJob(timerJob.getId());
+
+ assertProcessInstanceFinished(pid);
+
+ //System.out.println("SDNCAdapter asynchronous message timeout flow Completed!");
+ }
+
+ class ProcessExecutionThread extends Thread {
+
+ private String workflowRequest;
+ private WorkflowResponse workflowResponse;
+
+ public ProcessExecutionThread(String workflowRequest) {
+ this.workflowRequest = workflowRequest;
+ }
+
+ public void run() {
+ workflowResponse = invokeFlow(workflowRequest);
+ workflowResponse.getProcessInstanceID();
+ }
+ }
+
+ private String getPid() {
+ return processEngineRule.getHistoryService().createHistoricProcessInstanceQuery().list().get(0).getId();
+ }
+
+ private Object getVariable(String pid, String variableName) {
+ try {
+ return
+ processEngineRule
+ .getHistoryService()
+ .createHistoricVariableInstanceQuery()
+ .processInstanceId(pid).variableName(variableName)
+ .singleResult()
+ .getValue();
+ } catch(Exception ex) {
+ return null;
+ }
+ }
+
+ private void assertProcessInstanceFinished(String pid) {
+ assertEquals(1, processEngineRule.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count());
+ }
+
+ private void assertProcessInstanceNotFinished(String pid) {
+ assertEquals(0, processEngineRule.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count());
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java
new file mode 100644
index 0000000000..18fb5acbce
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java
@@ -0,0 +1,173 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf_Bad;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchGenericVnf;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for UpdateAAIGenericVnf bpmn.
+ */
+public class UpdateAAIGenericVnfTest extends WorkflowTest {
+
+ /**
+ * Test the happy path through the flow.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/UpdateAAIGenericVnf.bpmn"
+ })
+ public void happyPath() throws IOException {
+ logStart();
+
+ String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutGenericVnf("/skask", 200);
+ MockPatchGenericVnf("skask");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+ invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(200, responseCode.intValue());
+
+ logEnd();
+ }
+
+ /**
+ * Test the happy path through the flow.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/UpdateAAIGenericVnf.bpmn"
+ })
+ public void personaMismatch() throws IOException {
+
+ logStart();
+
+ String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
+ updateAAIGenericVnfRequest = updateAAIGenericVnfRequest.replaceFirst("introvert", "extrovert");
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+ invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ System.out.println("Workflow Exception: " + workflowException);
+ Assert.assertNotNull(workflowException);
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI returns a 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/UpdateAAIGenericVnf.bpmn"
+ })
+ public void badGet() throws IOException {
+
+ logStart();
+
+ String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
+
+ MockGetGenericVnfById_404("skask[?]depth=1");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+ invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_getGenericVnfResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_getGenericVnfResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI is successful, but he subsequent PUT returns 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/UpdateAAIGenericVnf.bpmn"
+ })
+ public void badPut() throws IOException {
+
+ logStart();
+
+ String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutGenericVnf_Bad("skask", 404);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+ invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+
+ logEnd();
+ }
+}
+
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java
new file mode 100644
index 0000000000..035f097be2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for UpdateAAIVfModuleTest.bpmn.
+ */
+public class UpdateAAIVfModuleTest extends WorkflowTest {
+
+ /**
+ * Test the happy path through the flow.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/UpdateAAIVfModule.bpmn"
+ })
+ public void happyPath() throws IOException {
+ logStart();
+
+ String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml");
+ MockGetGenericVnfByIdWithPriority("/skask/vf-modules/vf-module/supercool", 200, "VfModularity/VfModule-supercool.xml");
+ MockPutGenericVnf("/skask/vf-modules/vf-module/supercool", "PCRF", 200);
+ MockPatchVfModuleId("skask", "supercool");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
+ invokeSubProcess("UpdateAAIVfModule", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(200, responseCode.intValue());
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI returns a 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/UpdateAAIVfModule.bpmn"
+ })
+ public void badGet() throws IOException {
+
+ logStart();
+
+ String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml");
+ MockGetGenericVnfById("/skask/vf-modules/vf-module/.*", "VfModularity/VfModule-supercool.xml", 404);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
+ invokeSubProcess("UpdateAAIVfModule", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_getVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_getVfModuleResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+
+ logEnd();
+ }
+
+ /**
+ * Test the case where the GET to AAI is successful, but he subsequent PUT returns 404.
+ */
+ @Test
+ @Deployment(resources = {
+ "subprocess/UpdateAAIVfModule.bpmn"
+ })
+ public void badPut() throws IOException {
+
+ logStart();
+
+ String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml");
+ MockGetGenericVnfById_404("/skask/vf-modules/vf-module/supercool");
+ MockGetGenericVnfById("/skask/vf-modules/vf-module/supercool", "VfModularity/VfModule-supercool.xml", 200);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "999-99-9999");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
+ invokeSubProcess("UpdateAAIVfModule", businessKey, variables);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponse");
+ Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponseCode");
+ System.out.println("Subflow response code: " + responseCode);
+ System.out.println("Subflow response: " + response);
+ Assert.assertEquals(404, responseCode.intValue());
+
+ logEnd();
+ }
+}
+
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
new file mode 100644
index 0000000000..d2b0e274e9
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
@@ -0,0 +1,389 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFRollbackDelete;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * Unit tests for VnfAdapterRestV1.
+ */
+public class VnfAdapterRestV1Test extends WorkflowTest {
+
+ private static final String EOL = "\n";
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ private final String CREATE_VF_MODULE_REQUEST =
+ "<createVfModuleRequest>" + EOL +
+ " <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <tenantId>tenantId</tenantId>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleName>vfModuleName</vfModuleName>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vnfType>vnfType</vnfType>" + EOL +
+ " <vnfVersion>vnfVersion</vnfVersion>" + EOL +
+ " <vfModuleType>vfModuleType</vfModuleType>" + EOL +
+ " <volumeGroupId>volumeGroupId</volumeGroupId>" + EOL +
+ " <volumeGroupStackId>volumeGroupStackId</volumeGroupStackId>" + EOL +
+ " <baseVfModuleId>baseVfModuleId</baseVfModuleId>" + EOL +
+ " <baseVfModuleStackId>baseVfModuleStackId</baseVfModuleStackId>" + EOL +
+ " <skipAAI>true</skipAAI>" + EOL +
+ " <backout>false</backout>" + EOL +
+ " <failIfExists>true</failIfExists>" + EOL +
+ " <vfModuleParams>" + EOL +
+ " <entry>" + EOL +
+ " <key>key1</key>" + EOL +
+ " <value>value1</value>" + EOL +
+ " </entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>key2</key>" + EOL +
+ " <value>value2</value>" + EOL +
+ " </entry>" + EOL +
+ " </vfModuleParams>" + EOL +
+ " <msoRequest>" + EOL +
+ " <requestId>requestId</requestId>" + EOL +
+ " <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+ " </msoRequest>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+ "</createVfModuleRequest>" + EOL;
+
+ private final String UPDATE_VF_MODULE_REQUEST =
+ "<updateVfModuleRequest>" + EOL +
+ " <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <tenantId>tenantId</tenantId>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleName>vfModuleName</vfModuleName>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+ " <vnfType>vnfType</vnfType>" + EOL +
+ " <vnfVersion>vnfVersion</vnfVersion>" + EOL +
+ " <vfModuleType>vfModuleType</vfModuleType>" + EOL +
+ " <volumeGroupId>volumeGroupId</volumeGroupId>" + EOL +
+ " <volumeGroupStackId>volumeGroupStackId</volumeGroupStackId>" + EOL +
+ " <baseVfModuleId>baseVfModuleId</baseVfModuleId>" + EOL +
+ " <baseVfModuleStackId>baseVfModuleStackId</baseVfModuleStackId>" + EOL +
+ " <skipAAI>true</skipAAI>" + EOL +
+ " <backout>false</backout>" + EOL +
+ " <failIfExists>true</failIfExists>" + EOL +
+ " <vfModuleParams>" + EOL +
+ " <entry>" + EOL +
+ " <key>key1</key>" + EOL +
+ " <value>value1</value>" + EOL +
+ " </entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>key2</key>" + EOL +
+ " <value>value2</value>" + EOL +
+ " </entry>" + EOL +
+ " </vfModuleParams>" + EOL +
+ " <msoRequest>" + EOL +
+ " <requestId>requestId</requestId>" + EOL +
+ " <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+ " </msoRequest>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+ "</updateVfModuleRequest>" + EOL;
+
+ private final String DELETE_VF_MODULE_REQUEST =
+ "<deleteVfModuleRequest>" + EOL +
+ " <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <tenantId>tenantId</tenantId>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+ " <skipAAI>true</skipAAI>" + EOL +
+ " <msoRequest>" + EOL +
+ " <requestId>requestId</requestId>" + EOL +
+ " <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+ " </msoRequest>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+ "</deleteVfModuleRequest>" + EOL;
+
+ private final String ROLLBACK_VF_MODULE_REQUEST =
+ "<rollbackVfModuleRequest>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+ " <skipAAI>true</skipAAI>" + EOL +
+ " <vfModuleRollback>" + EOL +
+ " <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <tenantId>tenantId</tenantId>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+ " <msoRequest>" + EOL +
+ " <requestId>requestId</requestId>" + EOL +
+ " <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+ " </msoRequest>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <vfModuleCreated>true</vfModuleCreated>" + EOL +
+ " </vfModuleRollback>" + EOL +
+ "</rollbackVfModuleRequest>" + EOL;
+
+ public VnfAdapterRestV1Test() throws IOException {
+ callbacks.put("createVfModule",
+ "<createVfModuleResponse>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+ " <vfModuleCreated>true</vfModuleCreated>" + EOL +
+ " <vfModuleOutputs>" + EOL +
+ " <entry>" + EOL +
+ " <key>key1</key>" + EOL +
+ " <value>value1</value>" + EOL +
+ " </entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>key2</key>" + EOL +
+ " <value>value2</value>" + EOL +
+ " </entry>" + EOL +
+ " </vfModuleOutputs>" + EOL +
+ " <rollback>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+ " <vfModuleCreated>true</vfModuleCreated>" + EOL +
+ " <tenantId>tenantId</tenantId>" + EOL +
+ " <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <msoRequest>" + EOL +
+ " <requestId>requestId</requestId>" + EOL +
+ " <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+ " </msoRequest>" + EOL +
+ " <messageId>messageId</messageId>" + EOL +
+ " </rollback>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</createVfModuleResponse>" + EOL);
+
+ callbacks.put("updateVfModule",
+ "<updateVfModuleResponse>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+ " <vfModuleOutputs>" + EOL +
+ " <entry>" + EOL +
+ " <key>key1</key>" + EOL +
+ " <value>value1</value>" + EOL +
+ " </entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>key2</key>" + EOL +
+ " <value>value2</value>" + EOL +
+ " </entry>" + EOL +
+ " </vfModuleOutputs>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</updateVfModuleResponse>" + EOL);
+
+ callbacks.put("deleteVfModule",
+ "<deleteVfModuleResponse>" + EOL +
+ " <vnfId>vnfId</vnfId>" + EOL +
+ " <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+ " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</deleteVfModuleResponse>" + EOL);
+
+ callbacks.put("rollbackVfModule",
+ "<rollbackVfModuleResponse>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <vfModuleRolledback>true</vfModuleRolledback>" + EOL +
+ "</rollbackVfModuleResponse>" + EOL);
+
+ callbacks.put("vfModuleException",
+ "<vfModuleException>" + EOL +
+ " <message>message</message>" + EOL +
+ " <category>category</category>" + EOL +
+ " <rolledBack>false</rolledBack>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</vfModuleException>" + EOL);
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void testCreateVfModuleSuccess() throws Exception {
+ logStart();
+
+ mockVNFPost("", 202, "vnfId");
+
+ String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+ String messageId = requestId + "-" + System.currentTimeMillis();
+ String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", requestId);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("vnfAdapterRestV1Request", request);
+
+ invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+ injectVNFRestCallbacks(callbacks, "createVfModule");
+ waitForProcessEnd(businessKey, 10000);
+
+ String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+ System.out.println("Response:\n" + response);
+ assertTrue(response.contains("<createVfModuleResponse>"));
+ assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void testUpdateVfModuleSuccess() throws Exception {
+ logStart();
+
+ mockVNFPut("/vfModuleId", 202);
+
+ String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+ String messageId = requestId + "-" + System.currentTimeMillis();
+ String request = UPDATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", requestId);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("vnfAdapterRestV1Request", request);
+
+ invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+ injectVNFRestCallbacks(callbacks, "updateVfModule");
+ waitForProcessEnd(businessKey, 10000);
+
+ String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+ System.out.println("Response:\n" + response);
+ assertTrue(response.contains("<updateVfModuleResponse>"));
+ assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void testDeleteVfModuleSuccess() throws Exception {
+ logStart();
+
+ mockVNFDelete("vnfId", "/vfModuleId", 202);
+
+ String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+ String messageId = requestId + "-" + System.currentTimeMillis();
+ String request = DELETE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", requestId);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("vnfAdapterRestV1Request", request);
+
+ invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+ injectVNFRestCallbacks(callbacks, "deleteVfModule");
+ waitForProcessEnd(businessKey, 10000);
+
+ String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+ System.out.println("Response:\n" + response);
+ assertTrue(response.contains("<deleteVfModuleResponse>"));
+ assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void testRollbackVfModuleSuccess() throws Exception {
+ logStart();
+
+ mockVNFRollbackDelete("/vfModuleId", 202);
+
+ String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+ String messageId = requestId + "-" + System.currentTimeMillis();
+ String request = ROLLBACK_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", requestId);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("vnfAdapterRestV1Request", request);
+
+ invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+ injectVNFRestCallbacks(callbacks, "rollbackVfModule");
+ waitForProcessEnd(businessKey, 10000);
+
+ String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+ System.out.println("Response:\n" + response);
+ assertTrue(response.contains("<rollbackVfModuleResponse>"));
+ assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void testCreateVfModuleException() throws Exception {
+ logStart();
+
+ mockVNFPost("", 202, "vnfId");
+
+ String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+ String messageId = requestId + "-" + System.currentTimeMillis();
+ String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", requestId);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("vnfAdapterRestV1Request", request);
+
+ invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+ injectVNFRestCallbacks(callbacks, "vfModuleException");
+ waitForProcessEnd(businessKey, 10000);
+
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ assertNotNull(wfe);
+ System.out.println(wfe.toString());
+
+ String response = (String) getVariableFromHistory(businessKey, "WorkflowResponse");
+ System.out.println("Response:\n" + response);
+ assertTrue(response.contains("<vfModuleException>"));
+ assertFalse((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+ logEnd();
+ }
+}
+
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java
new file mode 100644
index 0000000000..4ac885fd9d
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+public class WorkflowAsyncResourceTest extends WorkflowTest {
+
+ @Test
+ @Deployment(resources = { "testAsyncResource.bpmn" })
+ public void asyncRequestSuccess() throws InterruptedException {
+ //it can be any request which asynchronously processed by the workflow
+ String request = "<aetgt:CreateTenantRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns5=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-information xmlns:msoservtypes=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type> <msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id> <msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> </aetgt:CreateTenantRequest>";
+
+ Map<String,String> variables = new HashMap<String,String>();
+ variables.put("testAsyncRequestMsg", request);
+ variables.put("mso-request-id", UUID.randomUUID().toString());
+ variables.put("mso-service-request-timeout", "5");
+
+ WorkflowResponse workflowResponse = BPMNUtil.executeAsyncWorkflow(processEngineRule, "testAsyncProcess", variables);
+ assertEquals("Received the request, the process is getting executed, request message<aetgt:CreateTenantRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns5=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-information xmlns:msoservtypes=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type> <msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id> <msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> </aetgt:CreateTenantRequest>", workflowResponse.getResponse());
+ assertEquals(200, workflowResponse.getMessageCode());
+ }
+
+ private void executeWorkflow(String request, String requestId, AsynchronousResponse asyncResponse, String processKey) {
+ WorkflowAsyncCommonResource workflowResource = new WorkflowAsyncCommonResource();
+ VariableMapImpl variableMap = new VariableMapImpl();
+
+ Map<String, Object> variableValueType = new HashMap<String, Object>();
+
+ Map<String, Object> requestMsg = new HashMap<String, Object>();
+ requestMsg.put("value", request);
+ requestMsg.put("type", "String");
+
+ Map<String, Object> msorequestId = new HashMap<String, Object>();
+ msorequestId.put("type", "String");
+ msorequestId.put("value",requestId);
+
+ Map<String, Object> timeout = new HashMap<String, Object>();
+ timeout.put("type", "String");
+ timeout.put("value","5");
+
+ variableValueType.put("testAsyncRequestMsg", requestMsg);
+ variableValueType.put("mso-request-id", msorequestId);
+ variableValueType.put("mso-service-request-timeout", timeout);
+
+ variableMap.put("variables", variableValueType);
+
+ workflowResource.setProcessEngineServices4junit(processEngineRule);
+ workflowResource.startProcessInstanceByKey(asyncResponse, processKey, variableMap);
+ }
+
+ class ProcessThread extends Thread {
+
+ public WorkflowResponse workflowResponse;
+ public String requestId;
+ public String processKey;
+ public AsynchronousResponse asyncResponse = mock(AsynchronousResponse.class);
+ public String request;
+ public boolean started;
+ public void run() {
+ started = true;
+ executeWorkflow(request, requestId, asyncResponse, processKey);
+ }
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowContextHolderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowContextHolderTest.java
new file mode 100644
index 0000000000..bff193ffdd
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowContextHolderTest.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import java.util.UUID;
+
+import javax.ws.rs.core.Response;
+
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowCallbackResponse;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowContext;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowContextHolder;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+
+public class WorkflowContextHolderTest {
+
+ private WorkflowContext createContext(AsynchronousResponse asyncResponse) {
+ WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+ String requestId = UUID.randomUUID().toString();
+ WorkflowContext workflowContext = new WorkflowContext("testAsyncProcess",
+ requestId, asyncResponse, 1000L);
+ contextHolder.put(workflowContext);
+ return workflowContext;
+ }
+
+ @Test
+ @Ignore // BROKEN TEST (previously ignored)
+ public void testContextExpiry() throws InterruptedException {
+
+ WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+ AsynchronousResponse asyncResponse = mock(AsynchronousResponse.class);
+ WorkflowContext workflowContext = createContext(asyncResponse);
+ String requestId = workflowContext.getRequestId();
+ WorkflowContext context1 = contextHolder.getWorkflowContext(requestId);
+
+ Assert.assertNotNull(context1);
+ Assert.assertEquals(requestId, context1.getRequestId());
+ Assert.assertEquals(workflowContext.getProcessKey(), context1.getProcessKey());
+ Assert.assertEquals(workflowContext.getStartTime(), context1.getStartTime());
+
+ Thread.sleep(1000);
+ //context should not be available after a second
+ WorkflowContext context2 = contextHolder.getWorkflowContext(requestId);
+ Assert.assertNull(context2);
+ }
+
+ @Test
+ public void testProcessCallback() {
+ WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+ AsynchronousResponse asyncResponse = mock(AsynchronousResponse.class);
+ WorkflowContext workflowContext = createContext(asyncResponse);
+
+ WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse();
+ callbackResponse.setMessage("Success");
+ callbackResponse.setResponse("Successfully processed request");
+ callbackResponse.setStatusCode(200);
+
+ Response response = contextHolder.processCallback("testAsyncProcess",
+ "process-instance-id", workflowContext.getRequestId(),
+ callbackResponse);
+ WorkflowResponse response1 = (WorkflowResponse) response.getEntity();
+ Assert.assertNotNull(response1.getMessage());
+ Assert.assertEquals(200,response1.getMessageCode());
+ Assert.assertEquals("Success", response1.getMessage());
+ Assert.assertEquals("Successfully processed request", response1.getResponse());
+ verify(asyncResponse).setResponse(any(Response.class));
+
+ WorkflowContext context1 = contextHolder.getWorkflowContext(workflowContext.getRequestId());
+ Assert.assertNull(context1);
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
new file mode 100644
index 0000000000..46bbb72e56
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
@@ -0,0 +1,1796 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBException;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.history.HistoricProcessInstance;
+import org.camunda.bpm.engine.history.HistoricVariableInstance;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.test.ProcessEngineRule;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.custommonkey.xmlunit.DetailedDiff;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.CallbackHeader;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest;
+import org.openecomp.mso.bpmn.common.adapter.sdnc.SDNCAdapterResponse;
+import org.openecomp.mso.bpmn.common.adapter.vnf.CreateVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.DeleteVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.MsoExceptionCategory;
+import org.openecomp.mso.bpmn.common.adapter.vnf.MsoRequest;
+import org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification;
+import org.openecomp.mso.bpmn.common.adapter.vnf.VnfRollback;
+import org.openecomp.mso.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl;
+import org.openecomp.mso.bpmn.common.workflow.service.VnfAdapterNotifyServiceImpl;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncCommonResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.core.CamundaDBSetup;
+import org.openecomp.mso.bpmn.core.PropertyConfigurationSetup;
+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.xml.sax.SAXException;
+
+import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+
+
+/**
+ * A base class for Workflow tests.
+ * <p>
+ * WireMock response transformers may be specified by declaring public
+ * static fields with the @WorkflowTestTransformer annotation. For example:
+ * <pre>
+ * @WorkflowTestTransformer
+ * public static final ResponseTransformer sdncAdapterMockTransformer =
+ * new SDNCAdapterMockTransformer();
+ * </pre>
+ */
+public class WorkflowTest {
+ @Rule
+ public final ProcessEngineRule processEngineRule = new ProcessEngineRule();
+
+ @Rule
+ public final WireMockRule wireMockRule;
+
+ /**
+ * Constructor.
+ */
+ public WorkflowTest() throws RuntimeException {
+ // Process WorkflowTestTransformer annotations
+ List<ResponseTransformer> transformerList = new ArrayList<ResponseTransformer>();
+
+ for (Field field : getClass().getFields()) {
+ WorkflowTestTransformer annotation = (WorkflowTestTransformer)
+ field.getAnnotation(WorkflowTestTransformer.class);
+
+ if (annotation == null) {
+ continue;
+ }
+
+ if (!Modifier.isStatic(field.getModifiers())) {
+ throw new RuntimeException(field.getDeclaringClass().getName()
+ + "#" + field.getName() + " has a @WorkflowTestTransformer "
+ + " annotation but it is not declared static");
+ }
+
+ ResponseTransformer transformer;
+
+ try {
+ transformer = (ResponseTransformer) field.get(null);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException(field.getDeclaringClass().getName()
+ + "#" + field.getName() + " is not accessible", e);
+ } catch (ClassCastException e) {
+ throw new RuntimeException(field.getDeclaringClass().getName()
+ + "#" + field.getName() + " is not a ResponseTransformer", e);
+ }
+
+ if (transformer == null) {
+ continue;
+ }
+
+ transformerList.add(transformer);
+ }
+
+ ResponseTransformer[] transformerArray =
+ transformerList.toArray(new ResponseTransformer[transformerList.size()]);
+
+ wireMockRule = new WireMockRule(WireMockConfiguration.wireMockConfig()
+ .port(28090).extensions(transformerArray));
+ }
+
+ @Before
+ public void testSetup() throws Exception {
+ CamundaDBSetup.configure();
+ PropertyConfigurationSetup.init();
+ }
+
+ /**
+ * The current request ID. Normally set when an "invoke" method is called.
+ */
+ protected volatile String msoRequestId = null;
+
+ /**
+ * The current service instance ID. Normally set when an "invoke" method
+ * is called.
+ */
+ protected volatile String msoServiceInstanceId = null;
+
+ /**
+ * Logs a test start method.
+ */
+ protected void logStart() {
+ StackTraceElement[] st = Thread.currentThread().getStackTrace();
+ String method = st[2].getMethodName();
+ System.out.println("STARTED TEST: " + method);
+ }
+
+ /**
+ * Logs a test end method.
+ */
+ protected void logEnd() {
+ StackTraceElement[] st = Thread.currentThread().getStackTrace();
+ String method = st[2].getMethodName();
+ System.out.println("ENDED TEST: " + method);
+ }
+
+ /**
+ * Invokes a subprocess.
+ * @param processKey the process key
+ * @param businessKey a unique key that will identify the process instance
+ * @param injectedVariables variables to inject into the process
+ */
+ protected void invokeSubProcess(String processKey, String businessKey,
+ Map<String, Object> injectedVariables) {
+ RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+ List<String> arguments = runtimeMxBean.getInputArguments();
+ System.out.println("JVM args = " + arguments);
+
+ msoRequestId = (String) injectedVariables.get("mso-request-id");
+
+ if (msoRequestId == null) {
+ String msg = "mso-request-id variable was not provided";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ // Note: some scenarios don't have a service-instance-id, may be null
+ msoServiceInstanceId = (String) injectedVariables.get("mso-service-instance-id");
+
+ RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ runtimeService.startProcessInstanceByKey(processKey, businessKey, injectedVariables);
+ }
+
+ /**
+ * Invokes an asynchronous process.
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param processKey the process key
+ * @param schemaVersion the API schema version, e.g. "v1"
+ * @param businessKey a unique key that will identify the process instance
+ * @param request the request
+ * @return a TestAsyncResponse object associated with the test
+ */
+ protected TestAsyncResponse invokeAsyncProcess(String processKey,
+ String schemaVersion, String businessKey, String request) {
+ return invokeAsyncProcess(processKey, schemaVersion, businessKey, request, null);
+ }
+
+ /**
+ * Invokes an asynchronous process.
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param processKey the process key
+ * @param schemaVersion the API schema version, e.g. "v1"
+ * @param businessKey a unique key that will identify the process instance
+ * @param request the request
+ * @param injectedVariables optional variables to inject into the process
+ * @return a TestAsyncResponse object associated with the test
+ */
+ public TestAsyncResponse invokeAsyncProcess(String processKey,
+ String schemaVersion, String businessKey, String request,
+ Map<String, Object> injectedVariables) {
+
+ RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+ List<String> arguments = runtimeMxBean.getInputArguments();
+ System.out.println("JVM args = " + arguments);
+
+ Map<String, Object> variables = createVariables(schemaVersion, businessKey,
+ request, injectedVariables, false);
+ VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
+
+ System.out.println("Sending " + request + " to " + processKey + " process");
+ WorkflowAsyncCommonResource workflowResource = new WorkflowAsyncCommonResource();
+ workflowResource.setProcessEngineServices4junit(processEngineRule);
+
+ TestAsyncResponse asyncResponse = new TestAsyncResponse();
+ workflowResource.startProcessInstanceByKey(asyncResponse, processKey, variableMapImpl);
+ return asyncResponse;
+ }
+
+ /**
+ * Invokes an asynchronous process.
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param processKey the process key
+ * @param schemaVersion the API schema version, e.g. "v1"
+ * @param businessKey a unique key that will identify the process instance
+ * @param request the request
+ * @param injectedVariables optional variables to inject into the process
+ * @param serviceInstantiationModel indicates whether this method is being
+ * invoked for a flow that is designed using the service instantiation model
+ * @return a TestAsyncResponse object associated with the test
+ */
+ protected TestAsyncResponse invokeAsyncProcess(String processKey,
+ String schemaVersion, String businessKey, String request,
+ Map<String, Object> injectedVariables, boolean serviceInstantiationModel) {
+
+ RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+ List<String> arguments = runtimeMxBean.getInputArguments();
+ System.out.println("JVM args = " + arguments);
+
+ Map<String, Object> variables = createVariables(schemaVersion, businessKey,
+ request, injectedVariables, serviceInstantiationModel);
+ VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
+
+ System.out.println("Sending " + request + " to " + processKey + " process");
+ WorkflowAsyncCommonResource workflowResource = new WorkflowAsyncCommonResource();
+ workflowResource.setProcessEngineServices4junit(processEngineRule);
+
+ TestAsyncResponse asyncResponse = new TestAsyncResponse();
+ workflowResource.startProcessInstanceByKey(asyncResponse, processKey, variableMapImpl);
+ return asyncResponse;
+ }
+
+ /**
+ * Private helper method that creates a variable map for a request.
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param schemaVersion the API schema version, e.g. "v1"
+ * @param businessKey a unique key that will identify the process instance
+ * @param request the request
+ * @param injectedVariables optional variables to inject into the process
+ * @param serviceInstantiationModel indicates whether this method is being
+ * invoked for a flow that is designed using the service instantiation model
+ * @return a variable map
+ */
+ private Map<String, Object> createVariables(String schemaVersion,
+ String businessKey, String request, Map<String, Object> injectedVariables,
+ boolean serviceInstantiationModel) {
+
+ Map<String, Object> variables = new HashMap<String, Object>();
+
+ // These variables may be overridded by injected variables.
+ variables.put("mso-service-request-timeout", "180");
+ variables.put("isDebugLogEnabled", "true");
+
+ // These variables may not be overridded by injected variables.
+ String[] notAllowed = new String[] {
+ "mso-schema-version",
+ "mso-business-key",
+ "bpmnRequest",
+ "mso-request-id",
+ "mso-service-instance-id"
+ };
+
+ if (injectedVariables != null) {
+ for (String key : injectedVariables.keySet()) {
+ for (String var : notAllowed) {
+ if (var.equals(key)) {
+ String msg = "Cannot specify " + var + " in injected variables";
+ System.out.println(msg);
+ fail(msg);
+ }
+ }
+
+ variables.put(key, injectedVariables.get(key));
+ }
+ }
+
+ variables.put("mso-schema-version", schemaVersion);
+ variables.put("mso-business-key", businessKey);
+ variables.put("bpmnRequest", request);
+
+ if (serviceInstantiationModel) {
+
+ /*
+ * The request ID and the service instance ID are generated for flows
+ * that follow the service instantiation model unless "requestId" and
+ * "serviceInstanceId" are injected variables.
+ */
+
+ try {
+ msoRequestId = (String) injectedVariables.get("requestId");
+ variables.put("mso-request-id", msoRequestId);
+ msoServiceInstanceId = (String) injectedVariables.get("serviceInstanceId");
+ variables.put("mso-service-instance-id", msoServiceInstanceId);
+ }
+ catch(Exception e) {
+ }
+ if (msoRequestId == null || msoRequestId.trim().equals("")) {
+ System.out.println("No requestId element in injectedVariables");
+ variables.put("mso-request-id", UUID.randomUUID().toString());
+ }
+ if (msoServiceInstanceId == null || msoServiceInstanceId.trim().equals("")) {
+ System.out.println("No seviceInstanceId element in injectedVariables");
+ variables.put("mso-service-instance-id", UUID.randomUUID().toString());
+ }
+
+ } else {
+ msoRequestId = getXMLTextElement(request, "request-id");
+
+ if (msoRequestId == null) {
+ //check in injected variables
+ try {
+ msoRequestId = (String) injectedVariables.get("requestId");
+ }
+ catch(Exception e) {
+ }
+ if (msoRequestId == null || msoRequestId.trim().equals("")) {
+ String msg = "No request-id element in " + request;
+ System.out.println(msg);
+ fail(msg);
+ }
+ }
+
+ variables.put("mso-request-id", msoRequestId);
+
+ // Note: some request types don't have a service-instance-id
+ msoServiceInstanceId = getXMLTextElement(request, "service-instance-id");
+
+ if (msoServiceInstanceId != null) {
+ variables.put("mso-service-instance-id", msoServiceInstanceId);
+ }
+ }
+
+ return variables;
+ }
+
+ /**
+ * Private helper method that creates a camunda VariableMapImpl from a simple
+ * variable map.
+ * @param variables the simple variable map
+ * @return a VariableMap
+ */
+ private VariableMapImpl createVariableMapImpl(Map<String, Object> variables) {
+ Map<String, Object> wrappedVariables = new HashMap<String, Object>();
+
+ for (String key : variables.keySet()) {
+ Object value = variables.get(key);
+ wrappedVariables.put(key, wrapVariableValue(value));
+ }
+
+ VariableMapImpl variableMapImpl = new VariableMapImpl();
+ variableMapImpl.put("variables", wrappedVariables);
+ return variableMapImpl;
+ }
+
+ /**
+ * Private helper method that wraps a variable value for inclusion in a
+ * camunda VariableMapImpl.
+ * @param value the variable value
+ * @return the wrapped variable
+ */
+ private Map<String, Object> wrapVariableValue(Object value) {
+ HashMap<String, Object> valueMap = new HashMap<String, Object>();
+ valueMap.put("value", value);
+ return valueMap;
+ }
+
+ /**
+ * Receives a response from an asynchronous process.
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param businessKey the process business key
+ * @param asyncResponse the TestAsyncResponse object associated with the test
+ * @param timeout the timeout in milliseconds
+ * @return the WorkflowResponse
+ */
+ public WorkflowResponse receiveResponse(String businessKey,
+ TestAsyncResponse asyncResponse, long timeout) {
+ System.out.println("Waiting " + timeout + "ms for process with business key " + businessKey
+ + " to send a response");
+
+ long now = System.currentTimeMillis() + timeout;
+ long endTime = now + timeout;
+
+ while (now <= endTime) {
+ Response response = asyncResponse.getResponse();
+
+ if (response != null) {
+ System.out.println("Received a response from process with business key " + businessKey);
+
+ Object entity = response.getEntity();
+
+ if (!(entity instanceof WorkflowResponse)) {
+ String msg = "Response entity is " +
+ (entity == null ? "null" : entity.getClass().getName()) +
+ ", expected WorkflowResponse";
+ System.out.println(msg);
+ fail(msg);
+ return null; // unreachable
+ }
+
+ return (WorkflowResponse) entity;
+ }
+
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ String msg = "Interrupted waiting for a response from process with business key " +
+ businessKey;
+ System.out.println(msg);
+ fail(msg);
+ return null; // unreachable
+ }
+
+ now = System.currentTimeMillis();
+ }
+
+ String msg = "No response received from process with business key " + businessKey +
+ " within " + timeout + "ms";
+ System.out.println(msg);
+ fail("Process with business key " + businessKey + " did not end within 10000ms");
+ return null; // unreachable
+ }
+
+ /**
+ * Runs a program to inject SDNC callback data into the test environment.
+ * A program is essentially just a list of keys that identify callback data
+ * to be injected, in sequence. An example program:
+ * <pre>
+ * reserve, assign, delete:ERR
+ * </pre>
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param callbacks an object containing callback data for the program
+ * @param program the program to execute
+ */
+ protected void injectSDNCRestCallbacks(CallbackSet callbacks, String program) {
+
+ String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+ for (String cmd : cmds) {
+ String action = cmd;
+ String modifier = "STD";
+
+ if (cmd.contains(":")) {
+ String[] parts = cmd.split(":");
+ action = parts[0];
+ modifier = parts[1];
+ }
+
+ String content = null;
+
+ if ("STD".equals(modifier)) {
+ content = callbacks.get(action);
+
+ if (content == null) {
+ String msg = "No callback defined for '" + action + "' SDNC request";
+ System.out.println(msg);
+ fail(msg);
+ }
+ } else if ("ERR".equals(modifier)) {
+ content = "{\"SDNCServiceError\":{\"sdncRequestId\":\"((REQUEST-ID))\",\"responseCode\":\"500\",\"responseMessage\":\"SIMULATED ERROR FROM SDNC ADAPTER\",\"ackFinalIndicator\":\"Y\"}}";
+ } else {
+ String msg = "Invalid SDNC program modifier: '" + modifier + "'";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ if (!injectSDNCRestCallback(content, 10000)) {
+ fail("Failed to inject SDNC '" + action + "' callback");
+ }
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ fail("Interrupted after injection of SDNC '" + action + "' callback");
+ }
+ }
+ }
+
+ /**
+ * Runs a program to inject SDNC events into the test environment.
+ * A program is essentially just a list of keys that identify event data
+ * to be injected, in sequence. An example program:
+ * <pre>
+ * event1, event2
+ * </pre>
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * Defaults the Event Type to "SDNCAEvent" for backward compatibility.
+ * @param callbacks an object containing event data for the program
+ * @param program the program to execute
+ */
+ protected void injectSDNCEvents(CallbackSet callbacks, String program) {
+ injectSDNCEvents(callbacks, program, "SDNCAEvent");
+ }
+
+ /**
+ * Runs a program to inject SDNC events into the test environment.
+ * A program is essentially just a list of keys that identify event data
+ * to be injected, in sequence. An example program:
+ * <pre>
+ * event1, event2
+ * </pre>
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param callbacks an object containing event data for the program
+ * @param program the program to execute
+ * @param eventType (i.e. "SDNCAEvent", "SNIROResponse", etc.)
+ */
+ protected void injectSDNCEvents(CallbackSet callbacks, String program, String eventType) {
+
+ String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+ for (String cmd : cmds) {
+ String action = cmd;
+ String modifier = "STD";
+
+ if (cmd.contains(":")) {
+ String[] parts = cmd.split(":");
+ action = parts[0];
+ modifier = parts[1];
+ }
+
+ String content = null;
+
+ if ("STD".equals(modifier)) {
+ content = callbacks.get(action);
+
+ if (content == null) {
+ String msg = "No SDNC event callback defined for '" + action + "'";
+ System.out.println(msg);
+ fail(msg);
+ }
+ } else {
+ String msg = "Invalid SDNC program modifier: '" + modifier + "'";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ if (!injectWorkflowMessage(eventType, content, 10000)) {
+ fail("Failed to inject SDNC '" + action + "' event");
+ }
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ fail("Interrupted after injection of SDNC '" + action + "' event");
+ }
+ }
+ }
+
+ /**
+ * Runs a program to inject SDNC callback data into the test environment.
+ * A program is essentially just a list of keys that identify callback data
+ * to be injected, in sequence. An example program:
+ * <pre>
+ * reserve, assign, delete:ERR
+ * </pre>
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param callbacks an object containing callback data for the program
+ * @param program the program to execute
+ */
+ public void injectSDNCCallbacks(CallbackSet callbacks, String program) {
+
+ String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+ for (String cmd : cmds) {
+ String action = cmd;
+ String modifier = "STD";
+
+ if (cmd.contains(":")) {
+ String[] parts = cmd.split(":");
+ action = parts[0];
+ modifier = parts[1];
+ }
+
+ String content = null;
+ int respCode = 200;
+ String respMsg = "OK";
+
+ if ("STD".equals(modifier)) {
+ content = callbacks.get(action);
+
+ if (content == null) {
+ String msg = "No callback defined for '" + action + "' SDNC request";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ respCode = 200;
+ respMsg = "OK";
+ } else if ("ERR".equals(modifier)) {
+ content = "<svc-request-id>((REQUEST-ID))</svc-request-id><response-code>500</response-code><response-message>SIMULATED ERROR FROM SDNC ADAPTER</response-message>";
+ respCode = 500;
+ respMsg = "SERVER ERROR";
+ } else {
+ String msg = "Invalid SDNC program modifier: '" + modifier + "'";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ if (!injectSDNCCallback(respCode, respMsg, content, 10000)) {
+ fail("Failed to inject SDNC '" + action + "' callback");
+ }
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ fail("Interrupted after injection of SDNC '" + action + "' callback");
+ }
+ }
+ }
+
+ /**
+ * Runs a program to inject VNF adapter REST callback data into the test environment.
+ * A program is essentially just a list of keys that identify callback data
+ * to be injected, in sequence. An example program:
+ * <pre>
+ * create, rollback
+ * </pre>
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param callbacks an object containing callback data for the program
+ * @param program the program to execute
+ */
+ public void injectVNFRestCallbacks(CallbackSet callbacks, String program) {
+
+ String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+ for (String cmd : cmds) {
+ String action = cmd;
+ String modifier = "STD";
+
+ if (cmd.contains(":")) {
+ String[] parts = cmd.split(":");
+ action = parts[0];
+ modifier = parts[1];
+ }
+
+ String content = null;
+
+ if ("STD".equals(modifier)) {
+ content = callbacks.get(action);
+
+ if (content == null) {
+ String msg = "No callback defined for '" + action + "' VNF REST request";
+ System.out.println(msg);
+ fail(msg);
+ }
+ } else if ("ERR".equals(modifier)) {
+ content = "SIMULATED ERROR FROM VNF ADAPTER";
+ } else {
+ String msg = "Invalid VNF REST program modifier: '" + modifier + "'";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ if (!injectVnfAdapterRestCallback(content, 10000)) {
+ fail("Failed to inject VNF REST '" + action + "' callback");
+ }
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ fail("Interrupted after injection of VNF REST '" + action + "' callback");
+ }
+ }
+ }
+
+ /**
+ * Runs a program to inject VNF callback data into the test environment.
+ * A program is essentially just a list of keys that identify callback data
+ * to be injected, in sequence. An example program:
+ * <pre>
+ * createVnf, deleteVnf
+ * </pre>
+ * Errors are handled with junit assertions and will cause the test to fail.
+ * @param callbacks an object containing callback data for the program
+ * @param program the program to execute
+ */
+ protected void injectVNFCallbacks(CallbackSet callbacks, String program) {
+
+ String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+ for (String cmd : cmds) {
+ String action = cmd;
+ String modifier = "STD";
+
+ if (cmd.contains(":")) {
+ String[] parts = cmd.split(":");
+ action = parts[0];
+ modifier = parts[1];
+ }
+
+ String content = null;
+
+ if ("STD".equals(modifier)) {
+ content = callbacks.get(action);
+
+ if (content == null) {
+ String msg = "No callback defined for '" + action + "' VNF request";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ } else if ("ERR".equals(modifier)) {
+ String msg = "Currently unsupported VNF program modifier: '" + modifier + "'";
+ System.out.println(msg);
+ fail(msg);
+ } else {
+ String msg = "Invalid VNF program modifier: '" + modifier + "'";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ boolean injected = false;
+
+ if (content.contains("createVnfNotification")) {
+ injected = injectCreateVNFCallback(content, 10000);
+ } else if (content.contains("deleteVnfNotification")) {
+ injected = injectDeleteVNFCallback(content, 10000);
+ } else if (content.contains("updateVnfNotification")) {
+ injected = injectUpdateVNFCallback(content, 10000);
+ }
+
+ if (!injected) {
+ String msg = "Failed to inject VNF '" + action + "' callback";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ fail("Interrupted after injection of VNF '" + action + "' callback");
+ }
+ }
+ }
+
+ /**
+ * Waits for the number of running processes with the specified process
+ * definition key to equal a particular count.
+ * @param processKey the process definition key
+ * @param count the desired count
+ * @param timeout the timeout in milliseconds
+ */
+ public void waitForRunningProcessCount(String processKey, int count, long timeout) {
+ System.out.println("Waiting " + timeout + "ms for there to be " + count + " "
+ + processKey + " instances");
+
+ long now = System.currentTimeMillis() + timeout;
+ long endTime = now + timeout;
+ int last = -1;
+
+ while (now <= endTime) {
+ int actual = processEngineRule.getRuntimeService()
+ .createProcessInstanceQuery()
+ .processDefinitionKey(processKey)
+ .list().size();
+
+ if (actual != last) {
+ System.out.println("There are now " + actual + " "
+ + processKey + " instances");
+ last = actual;
+ }
+
+ if (actual == count) {
+ return;
+ }
+
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ String msg = "Interrupted waiting for there to be " + count + " "
+ + processKey + " instances";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ now = System.currentTimeMillis();
+ }
+
+ String msg = "Timed out waiting for there to be " + count + " "
+ + processKey + " instances";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ /**
+ * Waits for the specified process variable to be set.
+ * @param processKey the process definition key
+ * @param variable the variable name
+ * @param timeout the timeout in milliseconds
+ * @return the variable value, or null if it cannot be obtained
+ * in the specified time
+ */
+ protected Object getProcessVariable(String processKey, String variable,
+ long timeout) {
+
+ System.out.println("Waiting " + timeout + "ms for "
+ + processKey + "." + variable + " to be set");
+
+ long now = System.currentTimeMillis() + timeout;
+ long endTime = now + timeout;
+
+ ProcessInstance processInstance = null;
+ Object value = null;
+
+ while (value == null) {
+ if (now > endTime) {
+ if (processInstance == null) {
+ System.out.println("Timed out waiting for "
+ + processKey + " to start");
+ } else {
+ System.out.println("Timed out waiting for "
+ + processKey + "[" + processInstance.getId()
+ + "]." + variable + " to be set");
+ }
+
+ return null;
+ }
+
+ if (processInstance == null) {
+ processInstance = processEngineRule.getRuntimeService()
+ .createProcessInstanceQuery()
+ .processDefinitionKey(processKey)
+ .singleResult();
+ }
+
+ if (processInstance != null) {
+ value = processEngineRule.getRuntimeService()
+ .getVariable(processInstance.getId(), variable);
+ }
+
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ System.out.println("Interrupted waiting for "
+ + processKey + "." + variable + " to be set");
+ return null;
+ }
+
+ now = System.currentTimeMillis();
+ }
+
+ System.out.println(processKey + "["
+ + processInstance.getId() + "]." + variable + "="
+ + value);
+
+ return value;
+ }
+
+ /**
+ * Injects a single SDNC adapter callback request. The specified callback data
+ * may contain the placeholder string ((REQUEST-ID)) which is replaced with
+ * the actual SDNC request ID. Note: this is not the requestId in the original
+ * MSO request.
+ * @param content the content of the callback
+ * @param timeout the timeout in milliseconds
+ * @return true if the callback could be injected, false otherwise
+ */
+ protected boolean injectSDNCRestCallback(String content, long timeout) {
+ String sdncRequestId = (String) getProcessVariable("SDNCAdapterRestV1",
+ "SDNCAResponse_CORRELATOR", timeout);
+
+ if (sdncRequestId == null) {
+ return false;
+ }
+
+ content = content.replace("((REQUEST-ID))", sdncRequestId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{REQUEST-ID}}", sdncRequestId);
+
+ System.out.println("Injecting SDNC adapter callback");
+ WorkflowMessageResource workflowMessageResource = new WorkflowMessageResource();
+ workflowMessageResource.setProcessEngineServices4junit(processEngineRule);
+ Response response = workflowMessageResource.deliver("SDNCAResponse", sdncRequestId, content);
+ System.out.println("Workflow response to SDNC adapter callback: " + response);
+ return true;
+ }
+
+ /**
+ * Injects a single SDNC adapter callback request. The specified callback data
+ * may contain the placeholder string ((REQUEST-ID)) which is replaced with
+ * the actual SDNC request ID. Note: this is not the requestId in the original
+ * MSO request.
+ * @param content the content of the callback
+ * @param respCode the response code (normally 200)
+ * @param respMsg the response message (normally "OK")
+ * @param timeout the timeout in milliseconds
+ * @return true if the callback could be injected, false otherwise
+ */
+ protected boolean injectSDNCCallback(int respCode, String respMsg,
+ String content, long timeout) {
+
+ String sdncRequestId = (String) getProcessVariable("sdncAdapter",
+ "SDNCA_requestId", timeout);
+
+ if (sdncRequestId == null) {
+ return false;
+ }
+
+ content = content.replace("((REQUEST-ID))", sdncRequestId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{REQUEST-ID}}", sdncRequestId);
+
+ System.out.println("Injecting SDNC adapter callback");
+ CallbackHeader callbackHeader = new CallbackHeader();
+ callbackHeader.setRequestId(sdncRequestId);
+ callbackHeader.setResponseCode(String.valueOf(respCode));
+ callbackHeader.setResponseMessage(respMsg);
+ SDNCAdapterCallbackRequest sdncAdapterCallbackRequest = new SDNCAdapterCallbackRequest();
+ sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
+ sdncAdapterCallbackRequest.setRequestData(content);
+ SDNCAdapterCallbackServiceImpl callbackService = new SDNCAdapterCallbackServiceImpl();
+ callbackService.setProcessEngineServices4junit(processEngineRule);
+ SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+ System.out.println("Workflow response to SDNC adapter callback: " + sdncAdapterResponse);
+
+ return true;
+ }
+
+ /**
+ * Injects a single VNF adapter callback request. The specified callback data
+ * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+ * the actual message ID. Note: this is not the requestId in the original
+ * MSO request.
+ * @param content the content of the callback
+ * @param timeout the timeout in milliseconds
+ * @return true if the callback could be injected, false otherwise
+ */
+ protected boolean injectVnfAdapterRestCallback(String content, long timeout) {
+ String messageId = (String) getProcessVariable("vnfAdapterRestV1",
+ "VNFAResponse_CORRELATOR", timeout);
+
+ if (messageId == null) {
+ return false;
+ }
+
+ content = content.replace("((MESSAGE-ID))", messageId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{MESSAGE-ID}}", messageId);
+
+ System.out.println("Injecting VNF adapter callback");
+ WorkflowMessageResource workflowMessageResource = new WorkflowMessageResource();
+ workflowMessageResource.setProcessEngineServices4junit(processEngineRule);
+ Response response = workflowMessageResource.deliver("VNFAResponse", messageId, content);
+ System.out.println("Workflow response to VNF adapter callback: " + response);
+ return true;
+ }
+
+ /**
+ * Injects a Create VNF adapter callback request. The specified callback data
+ * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+ * the actual message ID. It may also contain the placeholder string
+ * ((REQUEST-ID)) which is replaced request ID of the original MSO request.
+ * @param content the content of the callback
+ * @param timeout the timeout in milliseconds
+ * @return true if the callback could be injected, false otherwise
+ * @throws JAXBException if the content does not adhere to the schema
+ */
+ protected boolean injectCreateVNFCallback(String content, long timeout) {
+
+ String messageId = (String) getProcessVariable("vnfAdapterCreateV1",
+ "VNFC_messageId", timeout);
+
+ if (messageId == null) {
+ return false;
+ }
+
+ content = content.replace("((MESSAGE-ID))", messageId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{MESSAGE-ID}}", messageId);
+
+ if(content.contains("((REQUEST-ID))")){
+ content = content.replace("((REQUEST-ID))", msoRequestId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{REQUEST-ID}}", msoRequestId);
+ }
+
+ System.out.println("Injecting VNF adapter callback");
+
+ // Is it possible to unmarshal this with JAXB? I couldn't.
+
+ CreateVnfNotification createVnfNotification = new CreateVnfNotification();
+ XPathTool xpathTool = new VnfNotifyXPathTool();
+ xpathTool.setXML(content);
+
+ try {
+ String completed = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:completed/text()");
+ createVnfNotification.setCompleted("true".equals(completed));
+
+ String vnfId = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:vnfId/text()");
+ createVnfNotification.setVnfId(vnfId);
+
+ NodeList entries = (NodeList) xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:outputs/tns:entry",
+ XPathConstants.NODESET);
+
+ CreateVnfNotificationOutputs outputs = new CreateVnfNotificationOutputs();
+
+ for (int i = 0; i < entries.getLength(); i++) {
+ Node node = entries.item(i);
+
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element entry = (Element) node;
+ String key = entry.getElementsByTagNameNS("*", "key").item(0).getTextContent();
+ String value = entry.getElementsByTagNameNS("*", "value").item(0).getTextContent();
+ outputs.add(key, value);
+ }
+ }
+
+ createVnfNotification.setOutputs(outputs);
+
+ VnfRollback rollback = new VnfRollback();
+
+ String cloudSiteId = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:cloudSiteId/text()");
+ rollback.setCloudSiteId(cloudSiteId);
+
+ String requestId = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:msoRequest/tns:requestId/text()");
+ String serviceInstanceId = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:msoRequest/tns:serviceInstanceId/text()");
+
+ if (requestId != null || serviceInstanceId != null) {
+ MsoRequest msoRequest = new MsoRequest();
+ msoRequest.setRequestId(requestId);
+ msoRequest.setServiceInstanceId(serviceInstanceId);
+ rollback.setMsoRequest(msoRequest);
+ }
+
+ String tenantCreated = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:tenantCreated/text()");
+ rollback.setTenantCreated("true".equals(tenantCreated));
+
+ String tenantId = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:tenantId/text()");
+ rollback.setTenantId(tenantId);
+
+ String vnfCreated = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:vnfCreated/text()");
+ rollback.setVnfCreated("true".equals(vnfCreated));
+
+ String rollbackVnfId = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:vnfId/text()");
+ rollback.setVnfId(rollbackVnfId);
+
+ createVnfNotification.setRollback(rollback);
+
+ } catch (Exception e) {
+ System.out.println("Failed to unmarshal VNF callback content:");
+ System.out.println(content);
+ return false;
+ }
+
+ VnfAdapterNotifyServiceImpl notifyService = new VnfAdapterNotifyServiceImpl();
+ notifyService.setProcessEngineServices4junit(processEngineRule);
+
+ notifyService.createVnfNotification(
+ messageId,
+ createVnfNotification.isCompleted(),
+ createVnfNotification.getException(),
+ createVnfNotification.getErrorMessage(),
+ createVnfNotification.getVnfId(),
+ createVnfNotification.getOutputs(),
+ createVnfNotification.getRollback());
+
+ return true;
+ }
+
+ /**
+ * Injects a Delete VNF adapter callback request. The specified callback data
+ * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+ * the actual message ID. It may also contain the placeholder string
+ * ((REQUEST-ID)) which is replaced request ID of the original MSO request.
+ * @param content the content of the callback
+ * @param timeout the timeout in milliseconds
+ * @return true if the callback could be injected, false otherwise
+ * @throws JAXBException if the content does not adhere to the schema
+ */
+ protected boolean injectDeleteVNFCallback(String content, long timeout) {
+
+ String messageId = (String) getProcessVariable("vnfAdapterDeleteV1",
+ "VNFDEL_uuid", timeout);
+
+ if (messageId == null) {
+ return false;
+ }
+
+ content = content.replace("((MESSAGE-ID))", messageId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{MESSAGE-ID}}", messageId);
+
+ System.out.println("Injecting VNF adapter delete callback");
+
+ // Is it possible to unmarshal this with JAXB? I couldn't.
+
+ DeleteVnfNotification deleteVnfNotification = new DeleteVnfNotification();
+ XPathTool xpathTool = new VnfNotifyXPathTool();
+ xpathTool.setXML(content);
+
+ try {
+ String completed = xpathTool.evaluate(
+ "/tns:deleteVnfNotification/tns:completed/text()");
+ deleteVnfNotification.setCompleted("true".equals(completed));
+ // if notification failure, set the exception and error message
+ if (deleteVnfNotification.isCompleted() == false) {
+ deleteVnfNotification.setException(MsoExceptionCategory.INTERNAL);
+ deleteVnfNotification.setErrorMessage(xpathTool.evaluate(
+ "/tns:deleteVnfNotification/tns:errorMessage/text()")) ;
+ }
+
+ } catch (Exception e) {
+ System.out.println("Failed to unmarshal VNF Delete callback content:");
+ System.out.println(content);
+ return false;
+ }
+
+ VnfAdapterNotifyServiceImpl notifyService = new VnfAdapterNotifyServiceImpl();
+ notifyService.setProcessEngineServices4junit(processEngineRule);
+
+ notifyService.deleteVnfNotification(
+ messageId,
+ deleteVnfNotification.isCompleted(),
+ deleteVnfNotification.getException(),
+ deleteVnfNotification.getErrorMessage());
+
+ return true;
+ }
+
+ /**
+ * Injects a Update VNF adapter callback request. The specified callback data
+ * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+ * the actual message ID. It may also contain the placeholder string
+ * ((REQUEST-ID)) which is replaced request ID of the original MSO request.
+ * @param content the content of the callback
+ * @param timeout the timeout in milliseconds
+ * @return true if the callback could be injected, false otherwise
+ * @throws JAXBException if the content does not adhere to the schema
+ */
+ protected boolean injectUpdateVNFCallback(String content, long timeout) {
+
+ String messageId = (String) getProcessVariable("vnfAdapterUpdate",
+ "VNFU_messageId", timeout);
+
+ if (messageId == null) {
+ return false;
+ }
+
+ content = content.replace("((MESSAGE-ID))", messageId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{MESSAGE-ID}}", messageId);
+
+ content = content.replace("((REQUEST-ID))", msoRequestId);
+ // Deprecated usage. All test code should switch to the (( ... )) syntax.
+ content = content.replace("{{REQUEST-ID}}", msoRequestId);
+
+ System.out.println("Injecting VNF adapter callback");
+
+ // Is it possible to unmarshal this with JAXB? I couldn't.
+
+ UpdateVnfNotification updateVnfNotification = new UpdateVnfNotification();
+ XPathTool xpathTool = new VnfNotifyXPathTool();
+ xpathTool.setXML(content);
+
+ try {
+ String completed = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:completed/text()");
+ updateVnfNotification.setCompleted("true".equals(completed));
+
+ NodeList entries = (NodeList) xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:outputs/tns:entry",
+ XPathConstants.NODESET);
+
+ UpdateVnfNotificationOutputs outputs = new UpdateVnfNotificationOutputs();
+
+ for (int i = 0; i < entries.getLength(); i++) {
+ Node node = entries.item(i);
+
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element entry = (Element) node;
+ String key = entry.getElementsByTagNameNS("*", "key").item(0).getTextContent();
+ String value = entry.getElementsByTagNameNS("*", "value").item(0).getTextContent();
+ outputs.add(key, value);
+ }
+ }
+
+ updateVnfNotification.setOutputs(outputs);
+
+ VnfRollback rollback = new VnfRollback();
+
+ String cloudSiteId = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:cloudSiteId/text()");
+ rollback.setCloudSiteId(cloudSiteId);
+
+ String requestId = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:msoRequest/tns:requestId/text()");
+ String serviceInstanceId = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:msoRequest/tns:serviceInstanceId/text()");
+
+ if (requestId != null || serviceInstanceId != null) {
+ MsoRequest msoRequest = new MsoRequest();
+ msoRequest.setRequestId(requestId);
+ msoRequest.setServiceInstanceId(serviceInstanceId);
+ rollback.setMsoRequest(msoRequest);
+ }
+
+ String tenantCreated = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:tenantCreated/text()");
+ rollback.setTenantCreated("true".equals(tenantCreated));
+
+ String tenantId = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:tenantId/text()");
+ rollback.setTenantId(tenantId);
+
+ String vnfCreated = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:vnfCreated/text()");
+ rollback.setVnfCreated("true".equals(vnfCreated));
+
+ String rollbackVnfId = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:vnfId/text()");
+ rollback.setVnfId(rollbackVnfId);
+
+ updateVnfNotification.setRollback(rollback);
+
+ } catch (Exception e) {
+ System.out.println("Failed to unmarshal VNF callback content:");
+ System.out.println(content);
+ return false;
+ }
+
+ VnfAdapterNotifyServiceImpl notifyService = new VnfAdapterNotifyServiceImpl();
+ notifyService.setProcessEngineServices4junit(processEngineRule);
+
+ notifyService.updateVnfNotification(
+ messageId,
+ updateVnfNotification.isCompleted(),
+ updateVnfNotification.getException(),
+ updateVnfNotification.getErrorMessage(),
+ updateVnfNotification.getOutputs(),
+ updateVnfNotification.getRollback());
+
+ return true;
+ }
+
+ /**
+ * Injects a workflow message. The specified callback data may contain the
+ * placeholder string ((CORRELATOR)) which is replaced with the actual
+ * correlator value.
+ * @param content the message type
+ * @param content the message content
+ * @param timeout the timeout in milliseconds
+ * @return true if the event could be injected, false otherwise
+ */
+ protected boolean injectWorkflowMessage(String messageType, String content, long timeout) {
+ String correlator = (String) getProcessVariable("ReceiveWorkflowMessage",
+ messageType + "_CORRELATOR", timeout);
+
+ if (correlator == null) {
+ return false;
+ }
+
+ content = content.replace("((CORRELATOR))", correlator);
+
+ System.out.println("Injecting " + messageType + " message");
+ WorkflowMessageResource workflowMessageResource = new WorkflowMessageResource();
+ workflowMessageResource.setProcessEngineServices4junit(processEngineRule);
+ Response response = workflowMessageResource.deliver(messageType, correlator, content);
+ System.out.println("Workflow response to " + messageType + " message: " + response);
+ return true;
+ }
+
+ /**
+ * Wait for the process to end.
+ * @param businessKey the process business key
+ * @param timeout the amount of time to wait, in milliseconds
+ */
+ public void waitForProcessEnd(String businessKey, long timeout) {
+ System.out.println("Waiting " + timeout + "ms for process with business key " +
+ businessKey + " to end");
+
+ long now = System.currentTimeMillis() + timeout;
+ long endTime = now + timeout;
+
+ while (now <= endTime) {
+ if (isProcessEnded(businessKey)) {
+ System.out.println("Process with business key " + businessKey + " has ended");
+ return;
+ }
+
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ String msg = "Interrupted waiting for process with business key " +
+ businessKey + " to end";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ now = System.currentTimeMillis();
+ }
+
+ String msg = "Process with business key " + businessKey +
+ " did not end within " + timeout + "ms";
+ System.out.println(msg);
+ fail(msg);
+ }
+
+ /**
+ * Verifies that the specified historic process variable has the specified value.
+ * If the variable does not have the specified value, the test is failed.
+ * @param businessKey the process business key
+ * @param variable the variable name
+ * @param value the expected variable value
+ */
+ public void checkVariable(String businessKey, String variable, Object value) {
+ if (!isProcessEnded(businessKey)) {
+ fail("Cannot get historic variable " + variable + " because process with business key " +
+ businessKey + " has not ended");
+ }
+
+ Object variableValue = getVariableFromHistory(businessKey, variable);
+ assertEquals(value, variableValue);
+ }
+
+ /**
+ * Checks to see if the specified process is ended.
+ * @param businessKey the process business Key
+ * @return true if the process is ended
+ */
+ protected boolean isProcessEnded(String businessKey) {
+ HistoricProcessInstance processInstance = processEngineRule.getHistoryService()
+ .createHistoricProcessInstanceQuery().processInstanceBusinessKey(businessKey).singleResult();
+ return processInstance != null && processInstance.getEndTime() != null;
+ }
+
+ /**
+ * Gets a variable value from a historical process instance.
+ * @param businessKey the process business key
+ * @param variableName the variable name
+ * @return the variable value, or null if the variable could not be
+ * obtained
+ */
+ public Object getVariableFromHistory(String businessKey, String variableName) {
+ try {
+ HistoricProcessInstance processInstance = processEngineRule.getHistoryService()
+ .createHistoricProcessInstanceQuery().processInstanceBusinessKey(businessKey).singleResult();
+
+ if (processInstance == null) {
+ return null;
+ }
+
+ HistoricVariableInstance v = processEngineRule.getHistoryService()
+ .createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId())
+ .variableName(variableName).singleResult();
+ return v == null ? null : v.getValue();
+ } catch (Exception e) {
+ System.out.println("Error retrieving variable " + variableName +
+ " from historical process with business key " + businessKey + ": " + e);
+ return null;
+ }
+ }
+
+ /**
+ * Gets the value of a subflow variable from the specified subflow's
+ * historical process instance.
+ *
+ * @param subflowName - the name of the subflow that contains the variable
+ * @param variableName the variable name
+ *
+ * @return the variable value, or null if the variable could not be obtained
+ *
+ */
+ protected Object getVariableFromSubflowHistory(String subflowName, String variableName) {
+ try {
+ List<HistoricProcessInstance> processInstanceList = processEngineRule.getHistoryService()
+ .createHistoricProcessInstanceQuery().processDefinitionName(subflowName).list();
+
+ Collections.sort(processInstanceList, new Comparator<HistoricProcessInstance>() {
+ public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {
+ return m1.getStartTime().compareTo(m2.getStartTime());
+ }
+ });
+
+ HistoricProcessInstance processInstance = processInstanceList.get(0);
+
+ if (processInstanceList == null) {
+ return null;
+ }
+
+ HistoricVariableInstance v = processEngineRule.getHistoryService()
+ .createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId())
+ .variableName(variableName).singleResult();
+ return v == null ? null : v.getValue();
+ } catch (Exception e) {
+ System.out.println("Error retrieving variable " + variableName +
+ " from sub flow: " + subflowName + ", Exception is: " + e);
+ return null;
+ }
+ }
+
+ /**
+ * Gets the value of a subflow variable from the subflow's
+ * historical process x instance.
+ *
+ * @param subflowName - the name of the subflow that contains the variable
+ * @param variableName the variable name
+ * @param subflowInstanceIndex - the instance of the subflow (use when same subflow is called more than once from mainflow)
+ *
+ * @return the variable value, or null if the variable could not be obtained
+ */
+ protected Object getVariableFromSubflowHistory(int subflowInstanceIndex, String subflowName, String variableName) {
+ try {
+ List<HistoricProcessInstance> processInstanceList = processEngineRule.getHistoryService()
+ .createHistoricProcessInstanceQuery().processDefinitionName(subflowName).list();
+
+ Collections.sort(processInstanceList, new Comparator<HistoricProcessInstance>() {
+ public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {
+ return m1.getStartTime().compareTo(m2.getStartTime());
+ }
+ });
+
+ HistoricProcessInstance processInstance = processInstanceList.get(subflowInstanceIndex);
+
+ if (processInstanceList == null) {
+ return null;
+ }
+
+ HistoricVariableInstance v = processEngineRule.getHistoryService()
+ .createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId())
+ .variableName(variableName).singleResult();
+ return v == null ? null : v.getValue();
+ } catch (Exception e) {
+ System.out.println("Error retrieving variable " + variableName +
+ " from " + subflowInstanceIndex + " instance index of sub flow: " + subflowName + ", Exception is: " + e);
+ return null;
+ }
+ }
+
+
+ /**
+ * Extracts text from an XML element. This method is not namespace aware
+ * (namespaces are ignored). The first matching element is selected.
+ * @param xml the XML document or fragment
+ * @param tag the desired element, e.g. "<name>"
+ * @return the element text, or null if the element was not found
+ */
+ protected String getXMLTextElement(String xml, String tag) {
+ xml = removeXMLNamespaces(xml);
+
+ if (!tag.startsWith("<")) {
+ tag = "<" + tag + ">";
+ }
+
+ int start = xml.indexOf(tag);
+
+ if (start == -1) {
+ return null;
+ }
+
+ int end = xml.indexOf('<', start + tag.length());
+
+ if (end == -1) {
+ return null;
+ }
+
+ return xml.substring(start + tag.length(), end);
+ }
+
+ /**
+ * Removes namespace definitions and prefixes from XML, if any.
+ */
+ private String removeXMLNamespaces(String xml) {
+ // remove xmlns declaration
+ xml = xml.replaceAll("xmlns.*?(\"|\').*?(\"|\')", "");
+
+ // remove opening tag prefix
+ xml = xml.replaceAll("(<)(\\w+:)(.*?>)", "$1$3");
+
+ // remove closing tags prefix
+ xml = xml.replaceAll("(</)(\\w+:)(.*?>)", "$1$3");
+
+ // remove extra spaces left when xmlns declarations are removed
+ xml = xml.replaceAll("\\s+>", ">");
+
+ return xml;
+ }
+
+ /**
+ * Asserts that two XML documents are semantically equivalent. Differences
+ * in whitespace or in namespace usage do not affect the comparison.
+ * @param expected the expected XML
+ * @param actual the XML to test
+ * @throws SAXException
+ * @throws IOException
+ */
+ public static void assertXMLEquals(String expected, String actual)
+ throws SAXException, IOException {
+ XMLUnit.setIgnoreWhitespace(true);
+ XMLUnit.setIgnoreAttributeOrder(true);
+ DetailedDiff diff = new DetailedDiff(XMLUnit.compareXML(expected, actual));
+ List<?> allDifferences = diff.getAllDifferences();
+ assertEquals("Differences found: " + diff.toString(), 0, allDifferences.size());
+ }
+
+ /**
+ * A test implementation of AsynchronousResponse.
+ */
+ public class TestAsyncResponse implements AsynchronousResponse {
+ Response response = null;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public synchronized void setResponse(Response response) {
+ this.response = response;
+ }
+
+ /**
+ * Gets the response.
+ * @return the response, or null if none has been produced yet
+ */
+ public synchronized Response getResponse() {
+ return response;
+ }
+ }
+
+ /**
+ * An object that contains callback data for a "program".
+ */
+ public class CallbackSet {
+ private final Map<String, String> map = new HashMap<String, String>();
+
+ /**
+ * Add callback data to the set.
+ * @param action the action with which the data is associated
+ * @param content the callback data
+ */
+ public void put(String action, String content) {
+ map.put(action, content);
+ }
+
+ /**
+ * Retrieve callback data from the set.
+ * @param action the action with which the data is associated
+ * @return the callback data, or null if there is none for the specified operation
+ */
+ public String get(String action) {
+ return map.get(action);
+ }
+ }
+
+ /**
+ * A tool for evaluating XPath expressions.
+ */
+ protected class XPathTool {
+ private final DocumentBuilderFactory factory;
+ private final SimpleNamespaceContext context = new SimpleNamespaceContext();
+ private final XPath xpath = XPathFactory.newInstance().newXPath();
+ private String xml = null;
+ private Document doc = null;
+
+ /**
+ * Constructor.
+ */
+ public XPathTool() {
+ factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ xpath.setNamespaceContext(context);
+ }
+
+ /**
+ * Adds a namespace.
+ * @param prefix the namespace prefix
+ * @param uri the namespace uri
+ */
+ public synchronized void addNamespace(String prefix, String uri) {
+ context.add(prefix, uri);
+ }
+
+ /**
+ * Sets the XML content to be operated on.
+ * @param xml the XML content
+ */
+ public synchronized void setXML(String xml) {
+ this.xml = xml;
+ this.doc = null;
+ }
+
+ /**
+ * Returns the document object.
+ * @return the document object, or null if XML has not been set
+ * @throws SAXException
+ * @throws IOException
+ * @throws ParserConfigurationException
+ */
+ public synchronized Document getDocument()
+ throws ParserConfigurationException, IOException, SAXException {
+ if (xml == null) {
+ return null;
+ }
+
+ buildDocument();
+ return doc;
+ }
+
+ /**
+ * Evaluates the specified XPath expression and returns a string result.
+ * This method throws exceptions on error.
+ * @param expression the expression
+ * @return the result object
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ * @throws XPathExpressionException on error
+ */
+ public synchronized String evaluate(String expression)
+ throws ParserConfigurationException, SAXException,
+ IOException, XPathExpressionException {
+ return (String) evaluate(expression, XPathConstants.STRING);
+ }
+
+ /**
+ * Evaluates the specified XPath expression.
+ * This method throws exceptions on error.
+ * @param expression the expression
+ * @param returnType the return type
+ * @return the result object
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ * @throws XPathExpressionException on error
+ */
+ public synchronized Object evaluate(String expression, QName returnType)
+ throws ParserConfigurationException, SAXException,
+ IOException, XPathExpressionException {
+
+ buildDocument();
+ XPathExpression expr = xpath.compile(expression);
+ return expr.evaluate(doc, returnType);
+ }
+
+ /**
+ * Private helper method that builds the document object.
+ * Assumes the calling method is synchronized.
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ */
+ private void buildDocument() throws ParserConfigurationException,
+ IOException, SAXException {
+ if (doc == null) {
+ if (xml == null) {
+ throw new IOException("XML input is null");
+ }
+
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ InputSource source = new InputSource(new StringReader(xml));
+ doc = builder.parse(source);
+ }
+ }
+ }
+
+ /**
+ * A NamespaceContext class based on a Map.
+ */
+ private class SimpleNamespaceContext implements NamespaceContext {
+ private Map<String, String> prefixMap = new HashMap<String, String>();
+ private Map<String, String> uriMap = new HashMap<String, String>();
+
+ public synchronized void add(String prefix, String uri) {
+ prefixMap.put(prefix, uri);
+ uriMap.put(uri, prefix);
+ }
+
+ @Override
+ public synchronized String getNamespaceURI(String prefix) {
+ return prefixMap.get(prefix);
+ }
+
+ @Override
+ public Iterator<String> getPrefixes(String uri) {
+ List<String> list = new ArrayList<String>();
+ String prefix = uriMap.get(uri);
+ if (prefix != null) {
+ list.add(prefix);
+ }
+ return list.iterator();
+ }
+
+ @Override
+ public String getPrefix(String uri) {
+ return uriMap.get(uri);
+ }
+ }
+
+ /**
+ * A VnfNotify XPathTool.
+ */
+ protected class VnfNotifyXPathTool extends XPathTool {
+ public VnfNotifyXPathTool() {
+ addNamespace("tns", "http://org.openecomp.mso/vnfNotify");
+ }
+ }
+
+ /**
+ * Helper class to make it easier to create this type.
+ */
+ private static class CreateVnfNotificationOutputs
+ extends org.openecomp.mso.bpmn.common.adapter.vnf.CreateVnfNotification.Outputs {
+ public void add(String key, String value) {
+ Entry entry = new Entry();
+ entry.setKey(key);
+ entry.setValue(value);
+ getEntry().add(entry);
+ }
+ }
+
+ /**
+ * Helper class to make it easier to create this type.
+ */
+ private static class UpdateVnfNotificationOutputs
+ extends org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification.Outputs {
+ public void add(String key, String value) {
+ Entry entry = new Entry();
+ entry.setKey(key);
+ entry.setValue(value);
+ getEntry().add(entry);
+ }
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTestTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTestTransformer.java
new file mode 100644
index 0000000000..c4b236a817
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTestTransformer.java
@@ -0,0 +1,21 @@
+package org.openecomp.mso.bpmn.common;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Allows a subclass of WorkflowTest to specify one or more WireMock
+ * response transformers. A transformer must be declared as a public
+ * static field in the subclass. For example:
+ * <pre>
+ * @WorkflowTestTransformer
+ * public static final ResponseTransformer sdncAdapterMockTransformer =
+ * new SDNCAdapterMockTransformer();
+ * </pre>
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface WorkflowTestTransformer {
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySim500Response.xml b/bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySim500Response.xml
new file mode 100644
index 0000000000..2cf94b2ef2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySim500Response.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <v1:SDNCAdapterCallback>
+ <SDNCAdapterCallbackRequest xmlns="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>testRequestId</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="com:att:sdnctl:vnf"&gt;&lt;response-code&gt;500&lt;/response-code&gt;&lt;response-message&gt;'Error
+ retrieving l3-network with network-id=' +
+ $network-topology-operation-input.network-request-information.network-id
+ + 'from
+ AnAI'&lt;/response-message&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;svc-request-id&gt;006927ca-f5a3-47fd-880c-dfcbcd81a093&lt;/svc-request-id&gt;&lt;/output&gt;
+ </RequestData>
+ </SDNCAdapterCallbackRequest>
+ </v1:SDNCAdapterCallback>
+ </soapenv:Body>
+</soapenv:Envelope>
+
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse_noExtraTag.xml b/bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse_noExtraTag.xml
new file mode 100644
index 0000000000..57dc2d6f30
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse_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.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.openecomp/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/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume.xml
new file mode 100644
index 0000000000..182d7c9a11
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume.xml
@@ -0,0 +1,22 @@
+ <volume-group xmlns="http://com.aai.inventory/v6">
+ <volume-group-id>a8399879-31b3-4973-be26-0a0cbe776b58</volume-group-id>
+ <volume-group-name>MoG_CinderVolumes_2</volume-group-name>
+ <heat-stack-id>MoG_CinderVolumes_2/19387dc6-060f-446e-b41f-dcfd29c73845</heat-stack-id>
+ <vnf-type>VmogSvc/moge2e2</vnf-type>
+ <orchestration-status>Active</orchestration-status>
+ <resource-version>1458839419</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MOG-25208-D-01</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml
new file mode 100644
index 0000000000..9b91bc5beb
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml
@@ -0,0 +1,22 @@
+ <volume-group xmlns="http://com.aai.inventory/v6">
+ <volume-group-id>a8399879-31b3-4973-be26-0a0cbe776b58</volume-group-id>
+ <volume-group-name>MoG_CinderVolumes_2</volume-group-name>
+ <heat-stack-id>MoG_CinderVolumes_2/19387dc6-060f-446e-b41f-dcfd29c73845</heat-stack-id>
+ <vnf-type>VmogSvc/moge2e2</vnf-type>
+ <orchestration-status>Active</orchestration-status>
+ <resource-version>1458839419</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>83464847234ee8937416c65507d267</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MOG-25208-D-01</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ARCHIVE_CAMUNDA_HISTORY-Default Store Procedure.sql b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ARCHIVE_CAMUNDA_HISTORY-Default Store Procedure.sql
new file mode 100644
index 0000000000..67c139ed31
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ARCHIVE_CAMUNDA_HISTORY-Default Store Procedure.sql
@@ -0,0 +1,140 @@
+/*
+Camunda Version: 7.5.4-ee; MariaDB tested
+Date: 11.30.2016
+Balaji Mudipalli, AJSC Camunda Team
+
+DOC.:
+--------------------------------------------------------------------------------------
+Create ARCHIVE_CAMUNDA_HISTORY StoreProcedure -function for archiving of history camunda tables.
+*/
+
+/* uncomment below statement and run for your db, e.g. : use camundabpmn;
+ */
+-- use <db_name>;
+use camundabpmn;
+DROP PROCEDURE IF EXISTS ARCHIVE_CAMUNDA_HISTORY;
+
+DELIMITER //
+
+CREATE PROCEDURE ARCHIVE_CAMUNDA_HISTORY(IN IN_periodInDays INT, IN IN_maxProcessInstances INT)
+MODIFIES SQL DATA
+
+BEGIN
+ DECLARE P_hiTableCount INT;
+ DECLARE P_executionId BIGINT;
+ DECLARE P_piProcessed DOUBLE;
+ DECLARE P_baProcessed DOUBLE;
+ DECLARE P_startDate DATE;
+ DECLARE P_executionDuration double;
+
+ DECLARE not_found INT DEFAULT 0;
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET not_found = 1;
+
+ /* START TRANSACTION */
+ set P_startDate = sysdate();
+ set P_executionId = NextVal('STAT_EXECUTION_SEQ');
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('P_executionId value is ',P_executionId);
+
+ DELETE FROM TMP_ARCHIVING_PROCINST;
+ DELETE FROM TMP_ARCHIVING_BYTEARRAY;
+ -- temp table --
+ DELETE FROM TMPLOGTABLE;
+
+
+ /* 1. Set Default Value for Max Pi's */
+ IF IN_maxProcessInstances = 0 THEN SET IN_maxProcessInstances = 1000; END IF;
+ IF IN_maxProcessInstances > 1000 THEN SET IN_maxProcessInstances = 1000; END IF;
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('IN_maxProcessInstances value is: ',IN_maxProcessInstances);
+
+ /* 2. Fill TMP_ARCHIVING_PROCINST with candidates: */
+ IF IN_maxProcessInstances = 0 THEN /* all */
+ INSERT INTO TMP_ARCHIVING_PROCINST
+ SELECT hi.PROC_INST_ID_, hi.END_TIME_
+ FROM ACT_HI_PROCINST hi
+ WHERE hi.END_TIME_ IS NOT NULL
+ AND hi.END_TIME_ <= ( DATE_SUB(SYSDATE(), INTERVAL IN_periodInDays DAY));
+
+ ELSE /* limit: IN_maxProcessInstances */
+ INSERT INTO TMP_ARCHIVING_PROCINST
+ (PROC_INST_ID_, END_TIME_) (
+ SELECT hi2.PROC_INST_ID_, hi2.END_TIME_
+ FROM ACT_HI_PROCINST hi2
+ WHERE hi2.END_TIME_ IS NOT NULL
+ AND hi2.END_TIME_ <= ( DATE_SUB(SYSDATE(), INTERVAL IN_periodInDays DAY))
+ ) LIMIT IN_maxProcessInstances;
+ END IF;
+
+ /* 3. Check PI's im TEMP if any found, ready for ACHIVING */
+ select count(*) INTO P_piProcessed FROM TMP_ARCHIVING_PROCINST;
+
+ IF P_piProcessed = 0 THEN
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('P_piProcessed value is: ',P_piProcessed);
+ ROLLBACK;
+ /* 4. Move data from history to archive (insert to archive and delete in history) */
+ ELSE
+ SELECT COUNT(*)+1 INTO P_hiTableCount FROM camunda_hi_tables;
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('P_hiTableCount value is ',P_hiTableCount);
+ SET @i = 1;
+ WHILE @i < P_hiTableCount
+ DO
+ SELECT TableName_ INTO @P_tableName FROM camunda_hi_tables WHERE id_ = @i;
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('P_tableName: ', @P_tableName);
+
+ Set @P_archiveTableName = Concat('ARCHIVE_',IFNULL(@P_tableName, ''));
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('@P_archiveTableName: ', @P_archiveTableName);
+
+ SET @query1 = CONCAT('INSERT INTO ', @P_archiveTableName ,
+ ' SELECT hi3.*, ',P_executionId, ', NOW() FROM ', @P_tableName,' hi3
+ WHERE hi3.PROC_INST_ID_ in ( SELECT PROC_INST_ID_ FROM TMP_ARCHIVING_PROCINST)');
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('@query1: ', @query1);
+
+ PREPARE stmt1 FROM @query1;
+ EXECUTE stmt1;
+ DEALLOCATE PREPARE stmt1;
+
+ SET @query2 = CONCAT ('DELETE ACT FROM ',@P_tableName,' ACT INNER JOIN TMP_ARCHIVING_PROCINST TMP ON ACT.PROC_INST_ID_ = TMP.PROC_INST_ID_');
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('@query2: ', @query2);
+
+ PREPARE stmt2 FROM @query2;
+ EXECUTE stmt2;
+ DEALLOCATE PREPARE stmt2;
+
+ SET @i = @i+1;
+ END WHILE;
+ /* select bytearray_ids */
+ INSERT INTO TMP_ARCHIVING_BYTEARRAY
+ SELECT BYTEARRAY_ID_, PROC_INST_ID_ FROM ARCHIVE_ACT_HI_VARINST archvar
+ where archvar.PROC_INST_ID_ in (SELECT PROC_INST_ID_ FROM TMP_ARCHIVING_PROCINST)
+ AND archvar.BYTEARRAY_ID_ is not null;
+
+ INSERT INTO TMP_ARCHIVING_BYTEARRAY
+ SELECT BYTEARRAY_ID_, PROC_INST_ID_ FROM ARCHIVE_ACT_HI_DETAIL archvar
+ where archvar.PROC_INST_ID_ in (SELECT PROC_INST_ID_ FROM TMP_ARCHIVING_PROCINST)
+ AND archvar.BYTEARRAY_ID_ is not null;
+
+ /* 5. Check Bytearrays im TEMP if any found, ready for ACHIVING */
+ select count(*) INTO P_baProcessed FROM TMP_ARCHIVING_BYTEARRAY;
+
+ /* INSERT */
+ INSERT INTO ARCHIVE_ACT_GE_BYTEARRAY
+ SELECT hi4.*, P_executionId, NOW() FROM ACT_GE_BYTEARRAY hi4
+ WHERE hi4.ID_ in ( SELECT BYTEARRAY_ID_ FROM TMP_ARCHIVING_BYTEARRAY);
+
+ /* DELETE */
+ DELETE FROM ACT_GE_BYTEARRAY WHERE ID_ in (select BYTEARRAY_ID_ FROM TMP_ARCHIVING_BYTEARRAY);
+
+ /* COMMIT TRANSACTION */
+ COMMIT;
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('P_executionId is ', P_executionId);
+
+ set P_executionDuration = DATEDIFF(sysdate(), P_startDate);
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('SP success and P_executionDuration is ', ifnull((round(P_executionDuration*24*60*60, 1)), ''), ' sec.');
+ END IF;
+
+ END;
+//
+
+DELIMITER ; \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ROLLB_ARCHIVE_CAMUNDA_HISTORY-StoreProcedure.sql b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ROLLB_ARCHIVE_CAMUNDA_HISTORY-StoreProcedure.sql
new file mode 100644
index 0000000000..f3ba294dba
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/ROLLB_ARCHIVE_CAMUNDA_HISTORY-StoreProcedure.sql
@@ -0,0 +1,210 @@
+/*
+Camunda Version: 7.5.4-ee; MariaDB tested
+Date: 11.30.2016
+Balaji Mudipalli, AJSC Camunda Team
+
+DOC.:
+--------------------------------------------------------------------------------------
+Create ROLLB_ARCHIVE_CAMUNDA_HISTORY StoreProcedure for ROLLBACK (RESTORE)
+of archived Camunda history tables.
+*/
+
+/* uncomment below statement and run for your db, e.g. : use camundabpmn;
+ */
+-- use <db_name>;
+use camundabpmn;
+
+DROP PROCEDURE IF EXISTS ROLLB_ARCHIVE_CAMUNDA_HISTORY;
+
+DELIMITER //
+CREATE PROCEDURE ROLLB_ARCHIVE_CAMUNDA_HISTORY(IN IN_executionId_from INT,
+ IN IN_executionId_til INT,
+ IN IN_maxProcessInstances INT)
+MODIFIES SQL DATA
+
+BEGIN
+ DECLARE P_hiTableCount INT;
+ DECLARE P_piProcessed DOUBLE;
+ DECLARE P_baProcessed DOUBLE;
+ DECLARE P_query VARCHAR(600);
+ DECLARE P_startDate DATETIME;
+ DECLARE P_executionDuration DOUBLE;
+ DECLARE P_result NVARCHAR(400);
+DECLARE not_found INT DEFAULT 0;
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET not_found = 1;
+
+
+ /* START TRANSACTION */
+ SET P_startDate = sysdate();
+ DELETE FROM TMPLOGTABLE;
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: START EXECUTION: ' , ifnull(date_format(current_timestamp, '%d.%m.%Y %H:%i:%s ..FF3'), '') ,
+ '; PARAMS: IN_executionId_from: ' , IFNULL(IN_executionId_from, '') ,
+ '; IN_executionId_til: ' , IFNULL(IN_executionId_til, '') ,
+ '; IN_maxProcessInstances: ' , IFNULL(IN_maxProcessInstances, ''));
+
+ /* 1. Truncate TMP_ARCHIVING_PROCINST */
+
+ DELETE FROM TMP_ARCHIVING_PROCINST;
+ DELETE FROM TMP_ARCHIVING_BYTEARRAY;
+
+ /* 2. Fill TMP_ARCHIVING_PROCINST with candidates: */
+ IF IN_executionId_til = -1 THEN /* IN_executionId_from only */
+ SET P_query= CONCAT(' WHERE STAT_EXECUTION_ID = ' , IFNULL(IN_executionId_from, ''));
+
+ ELSEIF IN_executionId_til = 0 THEN /* all from IN_executionId_from */
+ SET P_query= CONCAT(' WHERE STAT_EXECUTION_ID >= ' , IFNULL(IN_executionId_from, ''));
+
+ ELSE /* between IN_executionId_from AND IN_executionId_til */
+ SET P_query= CONCAT(' WHERE STAT_EXECUTION_ID between ', IFNULL(IN_executionId_from, '') , ' AND ' , IFNULL(IN_executionId_til, ''));
+ END IF;
+
+ IF IN_maxProcessInstances = 0 THEN /* all */
+
+ SET @P_query1 = CONCAT('INSERT INTO TMP_ARCHIVING_PROCINST ', ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' SELECT PROC_INST_ID_, END_TIME_ FROM ARCHIVE_ACT_HI_PROCINST ', ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' ', Ifnull(P_query, ''));
+
+ ELSE /* limit: IN_maxProcessInstances */
+ SET @P_query1 = CONCAT('INSERT INTO TMP_ARCHIVING_PROCINST ' ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' (PROC_INST_ID_, END_TIME_ ) ( ' ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' SELECT PROC_INST_ID_, END_TIME_ FROM ARCHIVE_ACT_HI_PROCINST ' ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' ', Ifnull(P_query, '') , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ') LIMIT ', IFNULL(IN_maxProcessInstances, ''));
+ END IF;
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('QUERY (before execute): /fill temp table with PI candidates/ ' , Ifnull(P_query, ''));
+
+ PREPARE stmt1 FROM @P_query1;
+ EXECUTE stmt1;
+ DEALLOCATE PREPARE stmt1;
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('.... rows inserted into TMP_ARCHIVING_PROCINST: ' , IFNULL((ROW_COUNT()), ''));
+
+ /* 3. Fill TMP_ARCHIVING_BYTEARRAYS with candidates: */
+ INSERT INTO TMP_ARCHIVING_BYTEARRAY
+ SELECT BYTEARRAY_ID_, PROC_INST_ID_ FROM ARCHIVE_ACT_HI_VARINST archvar
+ where archvar.PROC_INST_ID_ in (SELECT PROC_INST_ID_ FROM TMP_ARCHIVING_PROCINST)
+ AND archvar.BYTEARRAY_ID_ is not null;
+
+ INSERT INTO TMP_ARCHIVING_BYTEARRAY
+ SELECT BYTEARRAY_ID_, PROC_INST_ID_ FROM ARCHIVE_ACT_HI_DETAIL archvar
+ where archvar.PROC_INST_ID_ in (SELECT PROC_INST_ID_ FROM TMP_ARCHIVING_PROCINST)
+ AND archvar.BYTEARRAY_ID_ is not null;
+
+ select count(*) INTO P_baProcessed FROM TMP_ARCHIVING_BYTEARRAY;
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: ', IFNULL(P_baProcessed, '') ,' ByteArray candidates for rollback found!' , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''));
+
+
+ /* 4. Check PI's im TEMP ready for ROLLBACK */
+ select count(*) INTO P_piProcessed FROM TMP_ARCHIVING_PROCINST;
+
+ IF P_piProcessed = 0 THEN /* no candidates found */
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: NO ProcessInstance-Candidates for archive-Rollback found! ');
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('Try TA-ROLLBACK ...');
+ ROLLBACK; /*-- TMP_ARCHIVING_PROCINST un-Delete */
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('TA-ROLLBACK DONE! ...' ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''));
+
+ SET P_result = CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: NO ProcessInstance candidates for archive-Rollback found!', ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ifnull(date_format(current_timestamp, '%d.%m.%Y %H:%i:%s ..FF3'), '') , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' Used PARAMS: IN_executionId_from: ' , IFNULL(IN_executionId_from, '') ,
+ '; IN_executionId_til: ' , IFNULL(IN_executionId_til, '') ,
+ '; IN_maxProcessInstances: ' , IFNULL(IN_maxProcessInstances, ''));
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT(P_result);
+
+ ELSE
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: ', IFNULL(P_piProcessed, '') ,' ProcessInstance candidates for Rollback found!');
+
+ /* LOOP over tables */
+ SELECT COUNT(*)+1 INTO P_hiTableCount FROM camunda_hi_tables;
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('P_hiTableCount value is ',P_hiTableCount);
+
+ SET @i = 1;
+
+ WHILE @i < P_hiTableCount
+ DO
+ SELECT TableName_ INTO @P_tableName FROM camunda_hi_tables WHERE id_ = @i;
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: ####### Start restore from: ARCHIVE_' , IFNULL(@P_tableName, '') ,' ...');
+
+ SET @P_tableFields = CONCAT('');
+
+ select GROUP_CONCAT(column_name order by ordinal_position)
+ INTO @P_tableFields
+ from information_schema.columns
+ where table_schema = (select DATABASE()) AND TABLE_NAME = @P_tableName;
+
+ /* INSERT */
+ SET @P_query2 = CONCAT('INSERT INTO ', IFNULL(@P_tableName, '') ,
+ ' SELECT ' , @P_tableFields,
+ ' FROM ARCHIVE_' , IFNULL(@P_tableName, '') ,
+ ' WHERE PROC_INST_ID_ in ( SELECT tmp.PROC_INST_ID_ FROM TMP_ARCHIVING_PROCINST tmp)');
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('QUERY (before execute): /copy back to history table/ ' , Ifnull(@P_query2, ''));
+
+ PREPARE stmt2 FROM @P_query2;
+ EXECUTE stmt2;
+ DEALLOCATE PREPARE stmt2;
+
+ INSERT INTO TMPLOGTABLE SELECT Concat('.... rows inserted: ' , IFNULL((ROW_COUNT()), ''));
+
+ /* DELETE */
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: Delete in Archive: ARCHIVE_' , IFNULL(@P_tableName, '') ,' ...');
+ /* SET @P_query3 = CONCAT(' DELETE FROM ARCHIVE_' , IFNULL(@P_tableName, '') , ' WHERE PROC_INST_ID_ in (select PROC_INST_ID_ FROM TMP_ARCHIVING_PROCINST)'); */
+ SET @P_query3 = CONCAT('DELETE ARCH FROM ARCHIVE_' , IFNULL(@P_tableName, '') ,
+ ' ARCH INNER JOIN TMP_ARCHIVING_PROCINST TMP ON ARCH.PROC_INST_ID_ = TMP.PROC_INST_ID_');
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('QUERY (before execute): ' , Ifnull(@P_query3, ''));
+ PREPARE stmt3 FROM @P_query3;
+ EXECUTE stmt3;
+ DEALLOCATE PREPARE stmt3;
+
+ INSERT INTO TMPLOGTABLE SELECT Concat('.... rows deleted: ' , IFNULL((ROW_COUNT()), '') , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''));
+
+ SET @i = @i+1;
+ END WHILE;
+
+ /* INSERT */
+ SET @P_tableFields2 = CONCAT(''); /* reset, becouse had some problems with double columns */
+ /* fetch table column names into P_tableFields : */
+ select GROUP_CONCAT(COLUMN_NAME order by ordinal_position)
+ INTO @P_tableFields2
+ from information_schema.columns
+ where table_schema = (select DATABASE()) AND TABLE_NAME = 'ACT_GE_BYTEARRAY';
+
+ SET @P_query4 = CONCAT('INSERT INTO ACT_GE_BYTEARRAY ' ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' SELECT ' , IFNULL(@P_tableFields2, '') ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' FROM ARCHIVE_ACT_GE_BYTEARRAY' ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' WHERE ID_ in ( SELECT tmp.BYTEARRAY_ID_ FROM TMP_ARCHIVING_BYTEARRAY tmp)');
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('QUERY (before execute): /copy back to history table/ ' , Ifnull(@P_query4, ''));
+ PREPARE stmt4 FROM @P_query4;
+ EXECUTE stmt4;
+ DEALLOCATE PREPARE stmt4;
+ INSERT INTO TMPLOGTABLE SELECT Concat('.... rows inserted: ' , IFNULL((ROW_COUNT()), ''));
+
+ /* DELETE */
+ /* DELETE FROM ARCHIVE_ACT_GE_BYTEARRAY WHERE ID_ in (select BYTEARRAY_ID_ FROM TMP_ARCHIVING_BYTEARRAY); */
+ DELETE AAGB FROM ARCHIVE_ACT_GE_BYTEARRAY AAGB INNER JOIN TMP_ARCHIVING_BYTEARRAY TMP_B ON AAGB.ID_ = TMP_B.BYTEARRAY_ID_;
+ INSERT INTO TMPLOGTABLE SELECT Concat('.... rows deleted: ' , IFNULL((ROW_COUNT()), '') , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''));
+
+ /* COMMIT TRANSACTION */
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: PIs processed: ' , IFNULL(P_piProcessed, '')) ;
+ COMMIT;
+ INSERT INTO TMPLOGTABLE SELECT CONCAT('TA-COMMIT DONE!' ,ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''));
+
+ SET P_executionDuration = DATEDIFF(sysdate(), P_startDate);
+
+ SET P_result = CONCAT('[ROLLB_ARCHIVE_CAMUNDA_HISTORY]: EXECUTED (commited) successfully! ' , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ifnull(date_format(current_timestamp, '%d.%m.%Y %H:%i:%s ..FF3'), '') , '; Duration: ' , ifnull((round(P_executionDuration*24*60*60, 1)), ''), ' sec.' , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), '') ,
+ ' PIs processed: ' , IFNULL(P_piProcessed, '') , ifnull(char(13 using ascii), ''),ifnull(char(10 using ascii), ''),
+ ' Used PARAMS: IN_executionId_from: ' , IFNULL(IN_executionId_from, '') ,
+ '; IN_executionId_til: ' , IFNULL(IN_executionId_til, '') ,
+ '; IN_maxProcessInstances: ' , IFNULL(IN_maxProcessInstances, ''));
+
+ INSERT INTO TMPLOGTABLE SELECT CONCAT(P_result);
+ END IF;
+ END;
+//
+
+DELIMITER ;
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/drop_mariadb_engine_7.5.6.sql b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/drop_mariadb_engine_7.5.6.sql
new file mode 100644
index 0000000000..10e9930720
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/drop_mariadb_engine_7.5.6.sql
@@ -0,0 +1,76 @@
+-- Fix for https://itrack.web.att.com/browse/AJSCCMDA-90 --
+use camundabpmn;
+/*
+Drop a archive tables
+*/
+/*-- TMP_ARCHIVING_PROCINST */
+DROP TABLE IF EXISTS TMP_ARCHIVING_PROCINST;
+
+/*-- TMP_ARCHIVING_BYTEARRAY */
+DROP TABLE IF EXISTS TMP_ARCHIVING_BYTEARRAY;
+
+/*-- TMP LOG TABLE */
+DROP TABLE IF EXISTS TMPLOGTABLE;
+
+/* -- Camunda Hi Tables --*/
+DROP TABLE IF EXISTS Camunda_Hi_Tables;
+
+/* drop own extentions columns:
+alter table ARCHIVE_ACT_HI_PROCINST DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_ACTINST DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_TASKINST DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_VARINST DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_DETAIL DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_COMMENT DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_ATTACHMENT DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_OP_LOG DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+alter table ARCHIVE_ACT_HI_INCIDENT DROP (STAT_EXECUTION_ID, STAT_EXECUTION_TS);
+*/
+
+/*--#1 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_PROCINST;
+/*--#2 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_ACTINST;
+/*--#3 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_TASKINST;
+/*--#4 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_VARINST;
+/*--#5 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_DETAIL;
+/*--#6 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_COMMENT;
+/*--#7 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_ATTACHMENT;
+/*--#8 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_OP_LOG;
+/*--#9 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_HI_INCIDENT;
+/*--#10 */
+DROP TABLE IF EXISTS ARCHIVE_ACT_GE_BYTEARRAY;
+
+/* drop PL SQL procedures: */
+DROP PROCEDURE IF EXISTS ARCHIVE_CAMUNDA_HISTORY;
+DROP PROCEDURE IF EXISTS ROLLB_ARCHIVE_CAMUNDA_HISTORY;
+
+/*-- Sequence */
+-- as sequence drop doesn't work automatically in MariaDB, use this procedure to drop sequence
+ DROP PROCEDURE IF EXISTS DropSequence;
+
+ DELIMITER //
+
+ CREATE PROCEDURE DropSequence (vname VARCHAR(30))
+ BEGIN
+ -- Drop the sequence
+ DELETE FROM _sequences WHERE name = vname;
+ END
+ //
+ DELIMITER ;
+
+-- use the above procedure to drop sequence
+CALL DropSequence('STAT_EXECUTION_SEQ');
+
+/*-- To Drop the MariaDB specific user defined procedures and functions */
+DROP FUNCTION IF EXISTS NextVal;
+DROP PROCEDURE IF EXISTS CreateSequence;
+DROP PROCEDURE IF EXISTS DropSequence;
+DROP TABLE IF EXISTS _sequences; \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/mariadb_engine_7.5_patch_7.5.6.sql b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/mariadb_engine_7.5_patch_7.5.6.sql
new file mode 100644
index 0000000000..8c7faa0792
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Archive/mariadb_engine_7.5_patch_7.5.6.sql
@@ -0,0 +1,222 @@
+-- Fix for https://itrack.web.att.com/browse/AJSCCMDA-90 --
+use camundabpmn;
+/*
+ 1. Add some Camunda Indexes to history schema part (for Archiving)
+*/
+create INDEX IF NOT EXISTS IDX_ACT_HI_TASKINST_PIID ON ACT_HI_TASKINST (PROC_INST_ID_);
+create INDEX IF NOT EXISTS IDX_ACT_HI_COMMENT_PIID ON ACT_HI_COMMENT (PROC_INST_ID_);
+create INDEX IF NOT EXISTS IDX_ACT_HI_ATTACHMENT_PIID ON ACT_HI_ATTACHMENT (PROC_INST_ID_);
+create INDEX IF NOT EXISTS IDX_ACT_HI_OP_LOG_PIID ON ACT_HI_OP_LOG (PROC_INST_ID_);
+create INDEX IF NOT EXISTS IDX_ACT_HI_INCIDENT_PIID ON ACT_HI_INCIDENT (PROC_INST_ID_);
+create INDEX IF NOT EXISTS IDX_ACT_HI_ACTINST_PIID ON ACT_HI_ACTINST(PROC_INST_ID_);
+
+
+/*
+ 2. Create Archiving Tables in current schema
+*/
+
+/*-- TMP_ARCHIVING_PROCINST */
+CREATE TABLE TMP_ARCHIVING_PROCINST
+( PROC_INST_ID_ varchar(64) not null,
+ END_TIME_ datetime(3)
+);
+CREATE INDEX AI_TMP_ARCH_PROCINST_PI_ID ON TMP_ARCHIVING_PROCINST(PROC_INST_ID_);
+
+/*-- TMP_ARCHIVING_BYTEARRAY */
+CREATE TABLE TMP_ARCHIVING_BYTEARRAY
+( BYTEARRAY_ID_ varchar(64) not null,
+ PROC_INST_ID_ varchar(64)
+);
+CREATE INDEX AI_TMP_ARCH_BYTEARRAY_BAID ON TMP_ARCHIVING_BYTEARRAY(BYTEARRAY_ID_);
+
+
+/*--#1 ARCHIVE_ACT_HI_PROCINST; */
+create TABLE ARCHIVE_ACT_HI_PROCINST
+AS ( select * from ACT_HI_PROCINST where 1=0);
+
+create index AI_HI_PROCINST_END_TIME on ARCHIVE_ACT_HI_PROCINST(END_TIME_);
+ALTER TABLE ARCHIVE_ACT_HI_PROCINST ADD CONSTRAINT ARCHIVE_ACT_HI_PROCINST_UQ UNIQUE ( PROC_INST_ID_);
+
+/*--#2 ARCHIVE_ACT_HI_ACTINST; */
+create TABLE ARCHIVE_ACT_HI_ACTINST
+AS ( select * from ACT_HI_ACTINST where 1=0);
+
+create index AI_HI_ACTINST_PROC_INST_ID on ARCHIVE_ACT_HI_ACTINST(PROC_INST_ID_);
+create index AI_HI_ACTINST_END_TIME on ARCHIVE_ACT_HI_ACTINST(END_TIME_);
+
+/*--#3 ARCHIVE_ACT_HI_TASKINST; */
+create TABLE ARCHIVE_ACT_HI_TASKINST
+AS ( select * from ACT_HI_TASKINST where 1=0);
+
+create index AI_HI_TASKINST_PROC_INST_ID on ARCHIVE_ACT_HI_TASKINST(PROC_INST_ID_);
+create index AI_HI_TASKINST_END_TIME on ARCHIVE_ACT_HI_TASKINST(END_TIME_);
+
+/*--#4 ARCHIVE_ACT_HI_VARINST; */
+create TABLE ARCHIVE_ACT_HI_VARINST
+AS ( select * from ACT_HI_VARINST where 1=0);
+
+create index AI_HI_VARINST_PROC_INST_ID on ARCHIVE_ACT_HI_VARINST(PROC_INST_ID_);
+
+/*--#5 ARCHIVE_ACT_HI_DETAIL; */
+create TABLE ARCHIVE_ACT_HI_DETAIL
+AS ( select * from ACT_HI_DETAIL where 1=0);
+
+create index AI_HI_DETAIL_PROC_INST_ID on ARCHIVE_ACT_HI_DETAIL(PROC_INST_ID_);
+create index AI_HI_DETAIL_TIME on ARCHIVE_ACT_HI_DETAIL(TIME_);
+
+/*--#6 ARCHIVE_ACT_HI_COMMENT; */
+create TABLE ARCHIVE_ACT_HI_COMMENT
+AS ( select * from ACT_HI_COMMENT where 1=0);
+
+create index AI_HI_COMMENT_PROC_INST_ID on ARCHIVE_ACT_HI_COMMENT(PROC_INST_ID_);
+create index AI_HI_COMMENT_TIME on ARCHIVE_ACT_HI_COMMENT(TIME_);
+
+/*--#7 ARCHIVE_ACT_HI_ATTACHMENT; */
+create TABLE ARCHIVE_ACT_HI_ATTACHMENT
+AS ( select * from ACT_HI_ATTACHMENT where 1=0);
+
+create index AI_HI_ATTACHMENT_PROC_INST_ID on ARCHIVE_ACT_HI_ATTACHMENT(PROC_INST_ID_);
+
+/*--#8 ARCHIVE_ACT_HI_OP_LOG; */
+create TABLE ARCHIVE_ACT_HI_OP_LOG
+AS ( select * from ACT_HI_OP_LOG where 1=0);
+
+create index AI_HI_OP_LOG_PROC_INST_ID on ARCHIVE_ACT_HI_OP_LOG(PROC_INST_ID_);
+create index AI_HI_OP_LOG_TIMESTAMP on ARCHIVE_ACT_HI_OP_LOG(TIMESTAMP_);
+
+/*--#9 ARCHIVE_ACT_HI_INCIDENT; */
+create TABLE ARCHIVE_ACT_HI_INCIDENT
+AS ( select * from ACT_HI_INCIDENT where 1=0);
+
+create index AI_HI_INCIDENT_PROC_INST_ID on ARCHIVE_ACT_HI_INCIDENT(PROC_INST_ID_);
+
+/*--#10 ARCHIVE_ACT_GE_BYTEARRAY; */
+create TABLE ARCHIVE_ACT_GE_BYTEARRAY
+AS ( select * from ACT_GE_BYTEARRAY where 1=0);
+
+create index AI_GE_BYTEARRAY_ID_ on ARCHIVE_ACT_GE_BYTEARRAY(ID_);
+
+/* -----------------------------------------------------------------------------
+Extend a ARCHIVE: Table by two attributes: STAT_EXECUTION_ID, STAT_EXECUTION_TS
+*/
+
+/*
+--TEMPLATE:
+alter table ARCHIVE_%TableName%
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_%TableName%_EXE_ID ON ARCHIVE_%TableName%(STAT_EXECUTION_ID);
+*/
+
+
+/*--#1 ACT_HI_PROCINST */
+alter table ARCHIVE_ACT_HI_PROCINST
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_PROCINST_EXE_ID ON ARCHIVE_ACT_HI_PROCINST(STAT_EXECUTION_ID);
+
+/*--#2 ACT_HI_ACTINST */
+alter table ARCHIVE_ACT_HI_ACTINST
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_ACTINST_EXE_ID ON ARCHIVE_ACT_HI_ACTINST(STAT_EXECUTION_ID);
+
+/*--#3 ACT_HI_TASKINST */
+alter table ARCHIVE_ACT_HI_TASKINST
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_TASKINST_EXE_ID ON ARCHIVE_ACT_HI_TASKINST(STAT_EXECUTION_ID);
+
+/*--#4 ACT_HI_VARINST */
+alter table ARCHIVE_ACT_HI_VARINST
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_VARINST_EXE_ID ON ARCHIVE_ACT_HI_VARINST(STAT_EXECUTION_ID);
+
+/*--#5 ACT_HI_DETAIL */
+alter table ARCHIVE_ACT_HI_DETAIL
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_DETAIL_EXE_ID ON ARCHIVE_ACT_HI_DETAIL(STAT_EXECUTION_ID);
+
+/*--#6 ACT_HI_COMMENT */
+alter table ARCHIVE_ACT_HI_COMMENT
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_COMMENT_EXE_ID ON ARCHIVE_ACT_HI_COMMENT(STAT_EXECUTION_ID);
+
+/*--#7 ACT_HI_ATTACHMENT */
+alter table ARCHIVE_ACT_HI_ATTACHMENT
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_ATTACHMENT_EXE_ID ON ARCHIVE_ACT_HI_ATTACHMENT(STAT_EXECUTION_ID);
+
+/*--#8 ACT_HI_OP_LOG */
+alter table ARCHIVE_ACT_HI_OP_LOG
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_OP_LOG_EXE_ID ON ARCHIVE_ACT_HI_OP_LOG(STAT_EXECUTION_ID);
+
+/*--#9 ACT_HI_INCIDENT */
+alter table ARCHIVE_ACT_HI_INCIDENT
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_HI_INCIDENT_EXE_ID ON ARCHIVE_ACT_HI_INCIDENT(STAT_EXECUTION_ID);
+
+/*--#10 ACT_GE_BYTEARRAY */
+alter table ARCHIVE_ACT_GE_BYTEARRAY
+ add (STAT_EXECUTION_ID bigint, STAT_EXECUTION_TS timestamp(0) DEFAULT CURRENT_TIMESTAMP );
+CREATE INDEX AI_ACT_GE_BYTEARRAY_EXE_ID ON ARCHIVE_ACT_GE_BYTEARRAY(STAT_EXECUTION_ID);
+
+
+/* -- Next Val as a user defined function needed only in MariaDB--*/
+DROP FUNCTION IF EXISTS NextVal;
+ DELIMITER //
+ CREATE FUNCTION NextVal (vname VARCHAR(30))
+ RETURNS INT
+ BEGIN
+ -- Retrieve and update in single statement
+ UPDATE _sequences
+ SET next = next + 1
+ WHERE name = vname;
+
+ RETURN (SELECT next FROM _sequences LIMIT 1);
+ END
+ //
+ DELIMITER ;
+
+/* -- History tables for use in archive procedure, there is no array type in MariaDB --*/
+Create Table Camunda_Hi_Tables (id_ MEDIUMINT NOT NULL AUTO_INCREMENT,
+ TableName_ varchar(80) NOT NULL,
+ PRIMARY KEY (id_));
+
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_PROCINST');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_ACTINST');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_TASKINST');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_VARINST');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_DETAIL');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_COMMENT');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_ATTACHMENT');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_OP_LOG');
+Insert Into Camunda_Hi_Tables(TableName_) Values ('ACT_HI_INCIDENT');
+
+/*-- log table --*/
+CREATE TABLE TMPLOGTABLE (LogMessage Varchar(700));
+
+
+/* -- Below user defined functions and procedures needed only in MariaDB, they are in-built in Oracle --*/
+/*-- Create a sequence SP */
+DROP PROCEDURE IF EXISTS CreateSequence;
+ DELIMITER //
+ CREATE PROCEDURE CreateSequence (name VARCHAR(30), start INT, inc INT)
+ BEGIN
+ -- Create a table to store sequences
+ CREATE TABLE IF NOT EXISTS _sequences
+ (
+ name VARCHAR(70) NOT NULL UNIQUE,
+ next INT NOT NULL,
+ inc INT NOT NULL
+ );
+
+ -- Add the new sequence
+ INSERT INTO _sequences VALUES (name, start, inc);
+ END
+ //
+ DELIMITER ;
+
+/*--------------------------------------------------------------------------------------------------
+ Add Meta to Archive
+ -------------------------------------------------------------------------------------------------- */
+
+/* Create STAT_EXECUTION_SEQ: each Archive Entry has a same Execution ID during one Archiving Run */
+CALL CreateSequence('STAT_EXECUTION_SEQ', 1, 1);
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Cleanup/create_mariadb_camunda7.5.6_ee.sql b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Cleanup/create_mariadb_camunda7.5.6_ee.sql
new file mode 100644
index 0000000000..bf866b4878
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Cleanup/create_mariadb_camunda7.5.6_ee.sql
@@ -0,0 +1,1127 @@
+
+# Start of Statements added for MSO
+DROP DATABASE IF EXISTS `camundabpmn`;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `camundabpmn` /*!40100 DEFAULT CHARACTER SET latin1 */;
+
+USE `camundabpmn`;
+
+# DROP USER IF EXISTS 'camunda';
+#delete from mysql.user where User='camunda';
+#CREATE USER 'camunda';
+#GRANT ALL on camundabpmn.* to 'camunda' identified by 'camunda123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+# End of Statements added for MSO
+
+
+create table ACT_GE_PROPERTY (
+ NAME_ varchar(64),
+ VALUE_ varchar(300),
+ REV_ integer,
+ primary key (NAME_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+insert into ACT_GE_PROPERTY
+values ('schema.version', 'fox', 1);
+
+insert into ACT_GE_PROPERTY
+values ('schema.history', 'create(fox)', 1);
+
+insert into ACT_GE_PROPERTY
+values ('next.dbid', '1', 1);
+
+insert into ACT_GE_PROPERTY
+values ('deployment.lock', '0', 1);
+
+create table ACT_GE_BYTEARRAY (
+ ID_ varchar(64),
+ REV_ integer,
+ NAME_ varchar(255),
+ DEPLOYMENT_ID_ varchar(64),
+ BYTES_ LONGBLOB,
+ GENERATED_ TINYINT,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RE_DEPLOYMENT (
+ ID_ varchar(64),
+ NAME_ varchar(255),
+ DEPLOY_TIME_ timestamp(3),
+ SOURCE_ varchar(255),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_EXECUTION (
+ ID_ varchar(64),
+ REV_ integer,
+ PROC_INST_ID_ varchar(64),
+ BUSINESS_KEY_ varchar(255),
+ PARENT_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SUPER_EXEC_ varchar(64),
+ SUPER_CASE_EXEC_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ ACT_ID_ varchar(255),
+ ACT_INST_ID_ varchar(64),
+ IS_ACTIVE_ TINYINT,
+ IS_CONCURRENT_ TINYINT,
+ IS_SCOPE_ TINYINT,
+ IS_EVENT_SCOPE_ TINYINT,
+ SUSPENSION_STATE_ integer,
+ CACHED_ENT_STATE_ integer,
+ SEQUENCE_COUNTER_ bigint,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp(3) NULL,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROCESS_DEF_ID_ varchar(64),
+ PROCESS_DEF_KEY_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp(3) NULL,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ DEPLOYMENT_ID_ varchar(64),
+ SUSPENSION_STATE_ integer NOT NULL DEFAULT 1,
+ JOB_DEF_ID_ varchar(64),
+ PRIORITY_ bigint NOT NULL DEFAULT 0,
+ SEQUENCE_COUNTER_ bigint,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_JOBDEF (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ PROC_DEF_ID_ varchar(64),
+ PROC_DEF_KEY_ varchar(255),
+ ACT_ID_ varchar(255),
+ JOB_TYPE_ varchar(255) NOT NULL,
+ JOB_CONFIGURATION_ varchar(255),
+ SUSPENSION_STATE_ integer,
+ JOB_PRIORITY_ bigint,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RE_PROCDEF (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ NAME_ varchar(255),
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ DEPLOYMENT_ID_ varchar(64),
+ RESOURCE_NAME_ varchar(4000),
+ DGRM_RESOURCE_NAME_ varchar(4000),
+ HAS_START_FORM_KEY_ TINYINT,
+ SUSPENSION_STATE_ integer,
+ TENANT_ID_ varchar(64),
+ VERSION_TAG_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_TASK (
+ ID_ varchar(64),
+ REV_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ CASE_EXECUTION_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ CASE_DEF_ID_ varchar(64),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ TASK_DEF_KEY_ varchar(255),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ DELEGATION_ varchar(64),
+ PRIORITY_ integer,
+ CREATE_TIME_ timestamp(3),
+ DUE_DATE_ datetime(3),
+ FOLLOW_UP_DATE_ datetime(3),
+ SUSPENSION_STATE_ integer,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_VARIABLE (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(255) not null,
+ NAME_ varchar(255) not null,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ CASE_EXECUTION_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ LONGBLOB NULL,
+ TEXT2_ LONGBLOB NULL,
+ VAR_SCOPE_ varchar(64) not null,
+ SEQUENCE_COUNTER_ bigint,
+ IS_CONCURRENT_LOCAL_ TINYINT,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ EVENT_TYPE_ varchar(255) not null,
+ EVENT_NAME_ varchar(255),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ ACTIVITY_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ CREATED_ timestamp(3) not null,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_INCIDENT (
+ ID_ varchar(64) not null,
+ REV_ integer not null,
+ INCIDENT_TIMESTAMP_ timestamp(3) not null,
+ INCIDENT_MSG_ varchar(4000),
+ INCIDENT_TYPE_ varchar(255) not null,
+ EXECUTION_ID_ varchar(64),
+ ACTIVITY_ID_ varchar(255),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ CAUSE_INCIDENT_ID_ varchar(64),
+ ROOT_CAUSE_INCIDENT_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ TENANT_ID_ varchar(64),
+ JOB_DEF_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_AUTHORIZATION (
+ ID_ varchar(64) not null,
+ REV_ integer not null,
+ TYPE_ integer not null,
+ GROUP_ID_ varchar(255),
+ USER_ID_ varchar(255),
+ RESOURCE_TYPE_ integer not null,
+ RESOURCE_ID_ varchar(64),
+ PERMS_ integer,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_FILTER (
+ ID_ varchar(64) not null,
+ REV_ integer not null,
+ RESOURCE_TYPE_ varchar(255) not null,
+ NAME_ varchar(255) not null,
+ OWNER_ varchar(255),
+ QUERY_ LONGTEXT not null,
+ PROPERTIES_ LONGTEXT,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_METER_LOG (
+ ID_ varchar(64) not null,
+ NAME_ varchar(64) not null,
+ REPORTER_ varchar(255),
+ VALUE_ bigint,
+ TIMESTAMP_ timestamp(3) not null,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_EXT_TASK (
+ ID_ varchar(64) not null,
+ REV_ integer not null,
+ WORKER_ID_ varchar(255),
+ TOPIC_NAME_ varchar(255),
+ RETRIES_ integer,
+ ERROR_MSG_ varchar(4000),
+ LOCK_EXP_TIME_ timestamp(3) NULL,
+ SUSPENSION_STATE_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ PROC_DEF_KEY_ varchar(255),
+ ACT_ID_ varchar(255),
+ ACT_INST_ID_ varchar(64),
+ TENANT_ID_ varchar(64),
+ PRIORITY_ bigint NOT NULL DEFAULT 0,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer not null,
+ TYPE_ varchar(255),
+ TOTAL_JOBS_ integer,
+ JOBS_CREATED_ integer,
+ JOBS_PER_SEED_ integer,
+ INVOCATIONS_PER_JOB_ integer,
+ SEED_JOB_DEF_ID_ varchar(64),
+ BATCH_JOB_DEF_ID_ varchar(64),
+ MONITOR_JOB_DEF_ID_ varchar(64),
+ SUSPENSION_STATE_ integer,
+ CONFIGURATION_ varchar(255),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_);
+create index ACT_IDX_EXEC_TENANT_ID on ACT_RU_EXECUTION(TENANT_ID_);
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+create index ACT_IDX_TASK_ASSIGNEE on ACT_RU_TASK(ASSIGNEE_);
+create index ACT_IDX_TASK_TENANT_ID on ACT_RU_TASK(TENANT_ID_);
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR_TENANT_ID on ACT_RU_EVENT_SUBSCR(TENANT_ID_);
+create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
+create index ACT_IDX_VARIABLE_TENANT_ID on ACT_RU_VARIABLE(TENANT_ID_);
+create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
+create index ACT_IDX_INC_CONFIGURATION on ACT_RU_INCIDENT(CONFIGURATION_);
+create index ACT_IDX_INC_TENANT_ID on ACT_RU_INCIDENT(TENANT_ID_);
+create index ACT_IDX_JOB_PROCINST on ACT_RU_JOB(PROCESS_INSTANCE_ID_);
+create index ACT_IDX_JOB_TENANT_ID on ACT_RU_JOB(TENANT_ID_);
+create index ACT_IDX_JOBDEF_TENANT_ID on ACT_RU_JOBDEF(TENANT_ID_);
+create index ACT_IDX_METER_LOG on ACT_RU_METER_LOG(NAME_,TIMESTAMP_);
+create index ACT_IDX_EXT_TASK_TOPIC on ACT_RU_EXT_TASK(TOPIC_NAME_);
+create index ACT_IDX_EXT_TASK_TENANT_ID on ACT_RU_EXT_TASK(TENANT_ID_);
+create index ACT_IDX_EXT_TASK_PRIORITY ON ACT_RU_EXT_TASK(PRIORITY_);
+create index ACT_IDX_AUTH_GROUP_ID ON ACT_RU_AUTHORIZATION(GROUP_ID_);
+create index ACT_IDX_JOB_JOB_DEF_ID on ACT_RU_JOB(JOB_DEF_ID_);
+
+alter table ACT_GE_BYTEARRAY
+ add constraint ACT_FK_BYTEARR_DEPL
+ foreign key (DEPLOYMENT_ID_)
+ references ACT_RE_DEPLOYMENT (ID_);
+
+alter table ACT_RU_EXECUTION
+ add constraint ACT_FK_EXE_PROCINST
+ foreign key (PROC_INST_ID_)
+ references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade;
+
+alter table ACT_RU_EXECUTION
+ add constraint ACT_FK_EXE_PARENT
+ foreign key (PARENT_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_EXECUTION
+ add constraint ACT_FK_EXE_SUPER
+ foreign key (SUPER_EXEC_)
+ references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_EXECUTION
+ add constraint ACT_FK_EXE_PROCDEF
+ foreign key (PROC_DEF_ID_)
+ references ACT_RE_PROCDEF (ID_);
+
+alter table ACT_RU_IDENTITYLINK
+ add constraint ACT_FK_TSKASS_TASK
+ foreign key (TASK_ID_)
+ references ACT_RU_TASK (ID_);
+
+alter table ACT_RU_IDENTITYLINK
+ add constraint ACT_FK_ATHRZ_PROCEDEF
+ foreign key (PROC_DEF_ID_)
+ references ACT_RE_PROCDEF(ID_);
+
+alter table ACT_RU_TASK
+ add constraint ACT_FK_TASK_EXE
+ foreign key (EXECUTION_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_TASK
+ add constraint ACT_FK_TASK_PROCINST
+ foreign key (PROC_INST_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_TASK
+ add constraint ACT_FK_TASK_PROCDEF
+ foreign key (PROC_DEF_ID_)
+ references ACT_RE_PROCDEF (ID_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_EXE
+ foreign key (EXECUTION_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_PROCINST
+ foreign key (PROC_INST_ID_)
+ references ACT_RU_EXECUTION(ID_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EVENT_SUBSCR
+ add constraint ACT_FK_EVENT_EXEC
+ foreign key (EXECUTION_ID_)
+ references ACT_RU_EXECUTION(ID_);
+
+alter table ACT_RU_INCIDENT
+ add constraint ACT_FK_INC_EXE
+ foreign key (EXECUTION_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_INCIDENT
+ add constraint ACT_FK_INC_PROCINST
+ foreign key (PROC_INST_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_INCIDENT
+ add constraint ACT_FK_INC_PROCDEF
+ foreign key (PROC_DEF_ID_)
+ references ACT_RE_PROCDEF (ID_);
+
+alter table ACT_RU_INCIDENT
+ add constraint ACT_FK_INC_CAUSE
+ foreign key (CAUSE_INCIDENT_ID_)
+ references ACT_RU_INCIDENT (ID_) on delete cascade on update cascade;
+
+alter table ACT_RU_INCIDENT
+ add constraint ACT_FK_INC_RCAUSE
+ foreign key (ROOT_CAUSE_INCIDENT_ID_)
+ references ACT_RU_INCIDENT (ID_) on delete cascade on update cascade;
+
+create index ACT_IDX_INC_JOB_DEF on ACT_RU_INCIDENT(JOB_DEF_ID_);
+alter table ACT_RU_INCIDENT
+ add constraint ACT_FK_INC_JOB_DEF
+ foreign key (JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+alter table ACT_RU_AUTHORIZATION
+ add constraint ACT_UNIQ_AUTH_USER
+ unique (USER_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_);
+
+alter table ACT_RU_AUTHORIZATION
+ add constraint ACT_UNIQ_AUTH_GROUP
+ unique (GROUP_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_UNIQ_VARIABLE
+ unique (VAR_SCOPE_, NAME_);
+
+alter table ACT_RU_EXT_TASK
+ add constraint ACT_FK_EXT_TASK_EXE
+ foreign key (EXECUTION_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+create index ACT_IDX_BATCH_SEED_JOB_DEF ON ACT_RU_BATCH(SEED_JOB_DEF_ID_);
+alter table ACT_RU_BATCH
+ add constraint ACT_FK_BATCH_SEED_JOB_DEF
+ foreign key (SEED_JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+create index ACT_IDX_BATCH_MONITOR_JOB_DEF ON ACT_RU_BATCH(MONITOR_JOB_DEF_ID_);
+alter table ACT_RU_BATCH
+ add constraint ACT_FK_BATCH_MONITOR_JOB_DEF
+ foreign key (MONITOR_JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+create index ACT_IDX_BATCH_JOB_DEF ON ACT_RU_BATCH(BATCH_JOB_DEF_ID_);
+alter table ACT_RU_BATCH
+ add constraint ACT_FK_BATCH_JOB_DEF
+ foreign key (BATCH_JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+-- indexes for deadlock problems - https://app.camunda.com/jira/browse/CAM-2567 --
+create index ACT_IDX_INC_CAUSEINCID on ACT_RU_INCIDENT(CAUSE_INCIDENT_ID_);
+create index ACT_IDX_INC_EXID on ACT_RU_INCIDENT(EXECUTION_ID_);
+create index ACT_IDX_INC_PROCDEFID on ACT_RU_INCIDENT(PROC_DEF_ID_);
+create index ACT_IDX_INC_PROCINSTID on ACT_RU_INCIDENT(PROC_INST_ID_);
+create index ACT_IDX_INC_ROOTCAUSEINCID on ACT_RU_INCIDENT(ROOT_CAUSE_INCIDENT_ID_);
+-- index for deadlock problem - https://app.camunda.com/jira/browse/CAM-4440 --
+create index ACT_IDX_AUTH_RESOURCE_ID on ACT_RU_AUTHORIZATION(RESOURCE_ID_);
+-- index to prevent deadlock on fk constraint - https://app.camunda.com/jira/browse/CAM-5440 --
+create index ACT_IDX_EXT_TASK_EXEC on ACT_RU_EXT_TASK(EXECUTION_ID_);
+
+-- indexes to improve deployment
+create index ACT_IDX_BYTEARRAY_NAME on ACT_GE_BYTEARRAY(NAME_);
+create index ACT_IDX_DEPLOYMENT_NAME on ACT_RE_DEPLOYMENT(NAME_);
+create index ACT_IDX_DEPLOYMENT_TENANT_ID on ACT_RE_DEPLOYMENT(TENANT_ID_);
+create index ACT_IDX_JOBDEF_PROC_DEF_ID ON ACT_RU_JOBDEF(PROC_DEF_ID_);
+create index ACT_IDX_JOB_HANDLER_TYPE ON ACT_RU_JOB(HANDLER_TYPE_);
+create index ACT_IDX_EVENT_SUBSCR_EVT_NAME ON ACT_RU_EVENT_SUBSCR(EVENT_NAME_);
+create index ACT_IDX_PROCDEF_DEPLOYMENT_ID ON ACT_RE_PROCDEF(DEPLOYMENT_ID_);
+create index ACT_IDX_PROCDEF_TENANT_ID ON ACT_RE_PROCDEF(TENANT_ID_);
+create index ACT_IDX_PROCDEF_VER_TAG ON ACT_RE_PROCDEF(VERSION_TAG_);
+-- create case definition table --
+create table ACT_RE_CASE_DEF (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ NAME_ varchar(255),
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ DEPLOYMENT_ID_ varchar(64),
+ RESOURCE_NAME_ varchar(4000),
+ DGRM_RESOURCE_NAME_ varchar(4000),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create case execution table --
+create table ACT_RU_CASE_EXECUTION (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CASE_INST_ID_ varchar(64),
+ SUPER_CASE_EXEC_ varchar(64),
+ SUPER_EXEC_ varchar(64),
+ BUSINESS_KEY_ varchar(255),
+ PARENT_ID_ varchar(64),
+ CASE_DEF_ID_ varchar(64),
+ ACT_ID_ varchar(255),
+ PREV_STATE_ integer,
+ CURRENT_STATE_ integer,
+ REQUIRED_ boolean,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create case sentry part table --
+
+create table ACT_RU_CASE_SENTRY_PART (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CASE_INST_ID_ varchar(64),
+ CASE_EXEC_ID_ varchar(64),
+ SENTRY_ID_ varchar(255),
+ TYPE_ varchar(255),
+ SOURCE_CASE_EXEC_ID_ varchar(64),
+ STANDARD_EVENT_ varchar(255),
+ SOURCE_ varchar(255),
+ SATISFIED_ boolean,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create index on business key --
+create index ACT_IDX_CASE_EXEC_BUSKEY on ACT_RU_CASE_EXECUTION(BUSINESS_KEY_);
+
+-- create foreign key constraints on ACT_RU_CASE_EXECUTION --
+alter table ACT_RU_CASE_EXECUTION
+ add constraint ACT_FK_CASE_EXE_CASE_INST
+ foreign key (CASE_INST_ID_)
+ references ACT_RU_CASE_EXECUTION(ID_) on delete cascade on update cascade;
+
+alter table ACT_RU_CASE_EXECUTION
+ add constraint ACT_FK_CASE_EXE_PARENT
+ foreign key (PARENT_ID_)
+ references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_CASE_EXECUTION
+ add constraint ACT_FK_CASE_EXE_CASE_DEF
+ foreign key (CASE_DEF_ID_)
+ references ACT_RE_CASE_DEF(ID_);
+
+-- create foreign key constraints on ACT_RU_VARIABLE --
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_CASE_EXE
+ foreign key (CASE_EXECUTION_ID_)
+ references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_CASE_INST
+ foreign key (CASE_INST_ID_)
+ references ACT_RU_CASE_EXECUTION(ID_);
+
+-- create foreign key constraints on ACT_RU_TASK --
+alter table ACT_RU_TASK
+ add constraint ACT_FK_TASK_CASE_EXE
+ foreign key (CASE_EXECUTION_ID_)
+ references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_TASK
+ add constraint ACT_FK_TASK_CASE_DEF
+ foreign key (CASE_DEF_ID_)
+ references ACT_RE_CASE_DEF(ID_);
+
+-- create foreign key constraints on ACT_RU_CASE_SENTRY_PART --
+alter table ACT_RU_CASE_SENTRY_PART
+ add constraint ACT_FK_CASE_SENTRY_CASE_INST
+ foreign key (CASE_INST_ID_)
+ references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_CASE_SENTRY_PART
+ add constraint ACT_FK_CASE_SENTRY_CASE_EXEC
+ foreign key (CASE_EXEC_ID_)
+ references ACT_RU_CASE_EXECUTION(ID_);
+
+create index ACT_IDX_CASE_DEF_TENANT_ID on ACT_RE_CASE_DEF(TENANT_ID_);
+create index ACT_IDX_CASE_EXEC_TENANT_ID on ACT_RU_CASE_EXECUTION(TENANT_ID_);
+-- create decision definition table --
+create table ACT_RE_DECISION_DEF (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ NAME_ varchar(255),
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ DEPLOYMENT_ID_ varchar(64),
+ RESOURCE_NAME_ varchar(4000),
+ DGRM_RESOURCE_NAME_ varchar(4000),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_DEC_DEF_TENANT_ID on ACT_RE_DECISION_DEF(TENANT_ID_);
+
+create table ACT_HI_PROCINST (
+ ID_ varchar(64) not null,
+ PROC_INST_ID_ varchar(64) not null,
+ BUSINESS_KEY_ varchar(255),
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64) not null,
+ START_TIME_ datetime(3) not null,
+ END_TIME_ datetime(3),
+ DURATION_ bigint,
+ START_USER_ID_ varchar(255),
+ START_ACT_ID_ varchar(255),
+ END_ACT_ID_ varchar(255),
+ SUPER_PROCESS_INSTANCE_ID_ varchar(64),
+ SUPER_CASE_INSTANCE_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ DELETE_REASON_ varchar(4000),
+ TENANT_ID_ varchar(64),
+ primary key (ID_),
+ unique (PROC_INST_ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_ACTINST (
+ ID_ varchar(64) not null,
+ PARENT_ACT_INST_ID_ varchar(64),
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64) not null,
+ PROC_INST_ID_ varchar(64) not null,
+ EXECUTION_ID_ varchar(64) not null,
+ ACT_ID_ varchar(255) not null,
+ TASK_ID_ varchar(64),
+ CALL_PROC_INST_ID_ varchar(64),
+ CALL_CASE_INST_ID_ varchar(64),
+ ACT_NAME_ varchar(255),
+ ACT_TYPE_ varchar(255) not null,
+ ASSIGNEE_ varchar(64),
+ START_TIME_ datetime(3) not null,
+ END_TIME_ datetime(3),
+ DURATION_ bigint,
+ ACT_INST_STATE_ integer,
+ SEQUENCE_COUNTER_ bigint,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_TASKINST (
+ ID_ varchar(64) not null,
+ TASK_DEF_KEY_ varchar(255),
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ CASE_DEF_KEY_ varchar(255),
+ CASE_DEF_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ CASE_EXECUTION_ID_ varchar(64),
+ ACT_INST_ID_ varchar(64),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ START_TIME_ datetime(3) not null,
+ END_TIME_ datetime(3),
+ DURATION_ bigint,
+ DELETE_REASON_ varchar(4000),
+ PRIORITY_ integer,
+ DUE_DATE_ datetime(3),
+ FOLLOW_UP_DATE_ datetime(3),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_VARINST (
+ ID_ varchar(64) not null,
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ ACT_INST_ID_ varchar(64),
+ CASE_DEF_KEY_ varchar(255),
+ CASE_DEF_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ CASE_EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ NAME_ varchar(255) not null,
+ VAR_TYPE_ varchar(100),
+ REV_ integer,
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ LONGBLOB NULL,
+ TEXT2_ LONGBLOB NULL,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_DETAIL (
+ ID_ varchar(64) not null,
+ TYPE_ varchar(255) not null,
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ CASE_DEF_KEY_ varchar(255),
+ CASE_DEF_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ CASE_EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ ACT_INST_ID_ varchar(64),
+ VAR_INST_ID_ varchar(64),
+ NAME_ varchar(255) not null,
+ VAR_TYPE_ varchar(255),
+ REV_ integer,
+ TIME_ datetime(3) not null,
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ LONGBLOB NULL,
+ TEXT2_ LONGBLOB NULL,
+ SEQUENCE_COUNTER_ bigint,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ varchar(64) not null,
+ TIMESTAMP_ timestamp(3) not null,
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ GROUP_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ OPERATION_TYPE_ varchar(64),
+ ASSIGNER_ID_ varchar(64),
+ PROC_DEF_KEY_ varchar(255),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_COMMENT (
+ ID_ varchar(64) not null,
+ TYPE_ varchar(255),
+ TIME_ datetime(3) not null,
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ ACTION_ varchar(255),
+ MESSAGE_ varchar(4000),
+ FULL_MSG_ LONGBLOB,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_ATTACHMENT (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ USER_ID_ varchar(255),
+ NAME_ varchar(255),
+ DESCRIPTION_ varchar(4000),
+ TYPE_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ URL_ varchar(4000),
+ CONTENT_ID_ varchar(64),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_OP_LOG (
+ ID_ varchar(64) not null,
+ DEPLOYMENT_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ PROC_DEF_KEY_ varchar(255),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ CASE_DEF_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ CASE_EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ JOB_ID_ varchar(64),
+ JOB_DEF_ID_ varchar(64),
+ BATCH_ID_ varchar(64),
+ USER_ID_ varchar(255),
+ TIMESTAMP_ timestamp(3) not null,
+ OPERATION_TYPE_ varchar(64),
+ OPERATION_ID_ varchar(64),
+ ENTITY_TYPE_ varchar(30),
+ PROPERTY_ varchar(64),
+ ORG_VALUE_ varchar(4000),
+ NEW_VALUE_ varchar(4000),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_INCIDENT (
+ ID_ varchar(64) not null,
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ CREATE_TIME_ timestamp(3) not null,
+ END_TIME_ timestamp(3) null,
+ INCIDENT_MSG_ varchar(4000),
+ INCIDENT_TYPE_ varchar(255) not null,
+ ACTIVITY_ID_ varchar(255),
+ CAUSE_INCIDENT_ID_ varchar(64),
+ ROOT_CAUSE_INCIDENT_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ INCIDENT_STATE_ integer,
+ TENANT_ID_ varchar(64),
+ JOB_DEF_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_JOB_LOG (
+ ID_ varchar(64) not null,
+ TIMESTAMP_ timestamp(3) not null,
+ JOB_ID_ varchar(64) not null,
+ JOB_DUEDATE_ timestamp(3) NULL,
+ JOB_RETRIES_ integer,
+ JOB_PRIORITY_ bigint NOT NULL DEFAULT 0,
+ JOB_EXCEPTION_MSG_ varchar(4000),
+ JOB_EXCEPTION_STACK_ID_ varchar(64),
+ JOB_STATE_ integer,
+ JOB_DEF_ID_ varchar(64),
+ JOB_DEF_TYPE_ varchar(255),
+ JOB_DEF_CONFIGURATION_ varchar(255),
+ ACT_ID_ varchar(255),
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROCESS_DEF_ID_ varchar(64),
+ PROCESS_DEF_KEY_ varchar(255),
+ DEPLOYMENT_ID_ varchar(64),
+ SEQUENCE_COUNTER_ bigint,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_BATCH (
+ ID_ varchar(64) not null,
+ TYPE_ varchar(255),
+ TOTAL_JOBS_ integer,
+ JOBS_PER_SEED_ integer,
+ INVOCATIONS_PER_JOB_ integer,
+ SEED_JOB_DEF_ID_ varchar(64),
+ MONITOR_JOB_DEF_ID_ varchar(64),
+ BATCH_JOB_DEF_ID_ varchar(64),
+ TENANT_ID_ varchar(64),
+ START_TIME_ datetime(3) not null,
+ END_TIME_ datetime(3),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_);
+create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_);
+create index ACT_IDX_HI_PRO_INST_TENANT_ID on ACT_HI_PROCINST(TENANT_ID_);
+
+create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_);
+create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_);
+create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_);
+create index ACT_IDX_HI_ACT_INST_COMP on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_, END_TIME_, ID_);
+create index ACT_IDX_HI_ACT_INST_STATS on ACT_HI_ACTINST(PROC_DEF_ID_, ACT_ID_, END_TIME_, ACT_INST_STATE_);
+create index ACT_IDX_HI_ACT_INST_TENANT_ID on ACT_HI_ACTINST(TENANT_ID_);
+
+create index ACT_IDX_HI_TASK_INST_TENANT_ID on ACT_HI_TASKINST(TENANT_ID_);
+
+create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_);
+create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_);
+create index ACT_IDX_HI_DETAIL_CASE_INST on ACT_HI_DETAIL(CASE_INST_ID_);
+create index ACT_IDX_HI_DETAIL_CASE_EXEC on ACT_HI_DETAIL(CASE_EXECUTION_ID_);
+create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_);
+create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_);
+create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_);
+create index ACT_IDX_HI_DETAIL_TENANT_ID on ACT_HI_DETAIL(TENANT_ID_);
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_GROUP on ACT_HI_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_HI_IDENT_LNK_TENANT_ID on ACT_HI_IDENTITYLINK(TENANT_ID_);
+create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_);
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_CASEVAR_CASE_INST on ACT_HI_VARINST(CASE_INST_ID_);
+create index ACT_IDX_HI_VAR_INST_TENANT_ID on ACT_HI_VARINST(TENANT_ID_);
+
+create index ACT_IDX_HI_INCIDENT_TENANT_ID on ACT_HI_INCIDENT(TENANT_ID_);
+
+create index ACT_IDX_HI_JOB_LOG_PROCINST on ACT_HI_JOB_LOG(PROCESS_INSTANCE_ID_);
+create index ACT_IDX_HI_JOB_LOG_PROCDEF on ACT_HI_JOB_LOG(PROCESS_DEF_ID_);
+create index ACT_IDX_HI_JOB_LOG_TENANT_ID on ACT_HI_JOB_LOG(TENANT_ID_);
+create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG(JOB_DEF_ID_);
+
+create index ACT_IDX_HI_OP_LOG_PROCINST on ACT_HI_OP_LOG(PROC_INST_ID_);
+create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG(PROC_DEF_ID_);
+create table ACT_HI_CASEINST (
+ ID_ varchar(64) not null,
+ CASE_INST_ID_ varchar(64) not null,
+ BUSINESS_KEY_ varchar(255),
+ CASE_DEF_ID_ varchar(64) not null,
+ CREATE_TIME_ datetime(3) not null,
+ CLOSE_TIME_ datetime(3),
+ DURATION_ bigint,
+ STATE_ integer,
+ CREATE_USER_ID_ varchar(255),
+ SUPER_CASE_INSTANCE_ID_ varchar(64),
+ SUPER_PROCESS_INSTANCE_ID_ varchar(64),
+ TENANT_ID_ varchar(64),
+ primary key (ID_),
+ unique (CASE_INST_ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_CASEACTINST (
+ ID_ varchar(64) not null,
+ PARENT_ACT_INST_ID_ varchar(64),
+ CASE_DEF_ID_ varchar(64) not null,
+ CASE_INST_ID_ varchar(64) not null,
+ CASE_ACT_ID_ varchar(255) not null,
+ TASK_ID_ varchar(64),
+ CALL_PROC_INST_ID_ varchar(64),
+ CALL_CASE_INST_ID_ varchar(64),
+ CASE_ACT_NAME_ varchar(255),
+ CASE_ACT_TYPE_ varchar(255),
+ CREATE_TIME_ datetime(3) not null,
+ END_TIME_ datetime(3),
+ DURATION_ bigint,
+ STATE_ integer,
+ REQUIRED_ boolean,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_CAS_I_CLOSE on ACT_HI_CASEINST(CLOSE_TIME_);
+create index ACT_IDX_HI_CAS_I_BUSKEY on ACT_HI_CASEINST(BUSINESS_KEY_);
+create index ACT_IDX_HI_CAS_I_TENANT_ID on ACT_HI_CASEINST(TENANT_ID_);
+create index ACT_IDX_HI_CAS_A_I_CREATE on ACT_HI_CASEACTINST(CREATE_TIME_);
+create index ACT_IDX_HI_CAS_A_I_END on ACT_HI_CASEACTINST(END_TIME_);
+create index ACT_IDX_HI_CAS_A_I_COMP on ACT_HI_CASEACTINST(CASE_ACT_ID_, END_TIME_, ID_);
+create index ACT_IDX_HI_CAS_A_I_CASEINST on ACT_HI_CASEACTINST(CASE_INST_ID_, CASE_ACT_ID_);
+create index ACT_IDX_HI_CAS_A_I_TENANT_ID on ACT_HI_CASEACTINST(TENANT_ID_);
+-- create history decision instance table --
+create table ACT_HI_DECINST (
+ ID_ varchar(64) NOT NULL,
+ DEC_DEF_ID_ varchar(64) NOT NULL,
+ DEC_DEF_KEY_ varchar(255) NOT NULL,
+ DEC_DEF_NAME_ varchar(255),
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ CASE_DEF_KEY_ varchar(255),
+ CASE_DEF_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ ACT_INST_ID_ varchar(64),
+ ACT_ID_ varchar(255),
+ EVAL_TIME_ datetime(3) not null,
+ COLLECT_VALUE_ double,
+ USER_ID_ varchar(255),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create history decision input table --
+create table ACT_HI_DEC_IN (
+ ID_ varchar(64) NOT NULL,
+ DEC_INST_ID_ varchar(64) NOT NULL,
+ CLAUSE_ID_ varchar(64) NOT NULL,
+ CLAUSE_NAME_ varchar(255),
+ VAR_TYPE_ varchar(100),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ LONGBLOB NULL,
+ TEXT2_ LONGBLOB NULL,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create history decision output table --
+create table ACT_HI_DEC_OUT (
+ ID_ varchar(64) NOT NULL,
+ DEC_INST_ID_ varchar(64) NOT NULL,
+ CLAUSE_ID_ varchar(64) NOT NULL,
+ CLAUSE_NAME_ varchar(255),
+ RULE_ID_ varchar(64) NOT NULL,
+ RULE_ORDER_ integer,
+ VAR_NAME_ varchar(255),
+ VAR_TYPE_ varchar(100),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ LONGBLOB NULL,
+ TEXT2_ LONGBLOB NULL,
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+
+create index ACT_IDX_HI_DEC_INST_ID on ACT_HI_DECINST(DEC_DEF_ID_);
+create index ACT_IDX_HI_DEC_INST_KEY on ACT_HI_DECINST(DEC_DEF_KEY_);
+create index ACT_IDX_HI_DEC_INST_PI on ACT_HI_DECINST(PROC_INST_ID_);
+create index ACT_IDX_HI_DEC_INST_CI on ACT_HI_DECINST(CASE_INST_ID_);
+create index ACT_IDX_HI_DEC_INST_ACT on ACT_HI_DECINST(ACT_ID_);
+create index ACT_IDX_HI_DEC_INST_ACT_INST on ACT_HI_DECINST(ACT_INST_ID_);
+create index ACT_IDX_HI_DEC_INST_TIME on ACT_HI_DECINST(EVAL_TIME_);
+create index ACT_IDX_HI_DEC_INST_TENANT_ID on ACT_HI_DECINST(TENANT_ID_);
+
+create index ACT_IDX_HI_DEC_IN_INST on ACT_HI_DEC_IN(DEC_INST_ID_);
+create index ACT_IDX_HI_DEC_IN_CLAUSE on ACT_HI_DEC_IN(DEC_INST_ID_, CLAUSE_ID_);
+
+create index ACT_IDX_HI_DEC_OUT_INST on ACT_HI_DEC_OUT(DEC_INST_ID_);
+create index ACT_IDX_HI_DEC_OUT_RULE on ACT_HI_DEC_OUT(RULE_ORDER_, CLAUSE_ID_);
+
+-- identity file entries
+
+create table ACT_ID_GROUP (
+ ID_ varchar(64),
+ REV_ integer,
+ NAME_ varchar(255),
+ TYPE_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_MEMBERSHIP (
+ USER_ID_ varchar(64),
+ GROUP_ID_ varchar(64),
+ primary key (USER_ID_, GROUP_ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_USER (
+ ID_ varchar(64),
+ REV_ integer,
+ FIRST_ varchar(255),
+ LAST_ varchar(255),
+ EMAIL_ varchar(255),
+ PWD_ varchar(255),
+ PICTURE_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_INFO (
+ ID_ varchar(64),
+ REV_ integer,
+ USER_ID_ varchar(64),
+ TYPE_ varchar(64),
+ KEY_ varchar(255),
+ VALUE_ varchar(255),
+ PASSWORD_ LONGBLOB,
+ PARENT_ID_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_TENANT (
+ ID_ varchar(64),
+ REV_ integer,
+ NAME_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_TENANT_MEMBER (
+ ID_ varchar(64) not null,
+ TENANT_ID_ varchar(64) not null,
+ USER_ID_ varchar(64),
+ GROUP_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+alter table ACT_ID_MEMBERSHIP
+ add constraint ACT_FK_MEMB_GROUP
+ foreign key (GROUP_ID_)
+ references ACT_ID_GROUP (ID_);
+
+alter table ACT_ID_MEMBERSHIP
+ add constraint ACT_FK_MEMB_USER
+ foreign key (USER_ID_)
+ references ACT_ID_USER (ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_UNIQ_TENANT_MEMB_USER
+ unique (TENANT_ID_, USER_ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_UNIQ_TENANT_MEMB_GROUP
+ unique (TENANT_ID_, GROUP_ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_FK_TENANT_MEMB
+ foreign key (TENANT_ID_)
+ references ACT_ID_TENANT (ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_FK_TENANT_MEMB_USER
+ foreign key (USER_ID_)
+ references ACT_ID_USER (ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_FK_TENANT_MEMB_GROUP
+ foreign key (GROUP_ID_)
+ references ACT_ID_GROUP (ID_);
+
+CREATE TABLE `mso_urn_mapping` (
+`NAME_` VARCHAR(64) NOT NULL COLLATE 'utf8_bin',
+`VALUE_` VARCHAR(300) NULL DEFAULT NULL COLLATE 'utf8_bin',
+`REV_` INT(11) NULL DEFAULT NULL
+)
+COLLATE='latin1_swedish_ci'
+ENGINE=InnoDB
+;
+
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:rollback', 'true', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('aai:endpoint', 'http://localhost:28090', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:adapters:tenant:endpoint', 'http://localhost:28090/tenantAdapterMock', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:adapters:sdnc:endpoint', 'http://localhost:28090/sdncAdapterMock', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:workflow:sdncadapter:callback', 'http://localhost:28080/mso/SDNCAdapterCallbackService', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:sdnc:timeout', 'PT5M', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:sdnc:firewall:yang:model', 'http://com/att/svc/mis/firewall-lite-gui', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:sdnc:firewall:yang:model:version', '2015-05-15', 1);
+INSERT INTO `mso_urn_mapping` (`NAME_`, `VALUE_`, `REV_`) VALUES ('mso:sdnc:timeout:firewall:minutes', '20', 1);
+
+
+-- add indexes on PROC_DEF_KEY_ columns in history tables CAM-6679
+create index ACT_IDX_HI_ACT_INST_PROC_DEF_KEY on ACT_HI_ACTINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_DETAIL_PROC_DEF_KEY on ACT_HI_DETAIL(PROC_DEF_KEY_);
+create index ACT_IDX_HI_IDENT_LNK_PROC_DEF_KEY on ACT_HI_IDENTITYLINK(PROC_DEF_KEY_);
+create index ACT_IDX_HI_INCIDENT_PROC_DEF_KEY on ACT_HI_INCIDENT(PROC_DEF_KEY_);
+create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG(PROCESS_DEF_KEY_);
+create index ACT_IDX_HI_PRO_INST_PROC_DEF_KEY on ACT_HI_PROCINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_TASK_INST_PROC_DEF_KEY on ACT_HI_TASKINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_VAR_INST_PROC_DEF_KEY on ACT_HI_VARINST(PROC_DEF_KEY_); \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Upgrade/upgrade_mariadb_camunda7.3.7_to_7.5.6_ee.sql b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Upgrade/upgrade_mariadb_camunda7.3.7_to_7.5.6_ee.sql
new file mode 100644
index 0000000000..8e118eb638
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CamundaDBScripts/Upgrade/upgrade_mariadb_camunda7.3.7_to_7.5.6_ee.sql
@@ -0,0 +1,602 @@
+-- mariadb_engine_7.3.7_to_7.5.5 upgrade --
+
+-- mysql_engine_7.3_to_7.4
+-- metrics --
+USE `camundabpmn`;
+
+ALTER TABLE ACT_RU_METER_LOG
+ ADD REPORTER_ varchar(255);
+
+-- job prioritization --
+
+ALTER TABLE ACT_RU_JOB
+ ADD PRIORITY_ bigint NOT NULL
+ DEFAULT 0;
+
+ALTER TABLE ACT_RU_JOBDEF
+ ADD JOB_PRIORITY_ bigint;
+
+ALTER TABLE ACT_HI_JOB_LOG
+ ADD JOB_PRIORITY_ bigint NOT NULL
+ DEFAULT 0;
+
+-- create decision definition table --
+create table ACT_RE_DECISION_DEF (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ NAME_ varchar(255),
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ DEPLOYMENT_ID_ varchar(64),
+ RESOURCE_NAME_ varchar(4000),
+ DGRM_RESOURCE_NAME_ varchar(4000),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create unique constraint on ACT_RE_DECISION_DEF --
+alter table ACT_RE_DECISION_DEF
+ add constraint ACT_UNIQ_DECISION_DEF
+ unique (KEY_,VERSION_);
+
+-- case sentry part source --
+
+ALTER TABLE ACT_RU_CASE_SENTRY_PART
+ ADD SOURCE_ varchar(255);
+
+-- create history decision instance table --
+create table ACT_HI_DECINST (
+ ID_ varchar(64) NOT NULL,
+ DEC_DEF_ID_ varchar(64) NOT NULL,
+ DEC_DEF_KEY_ varchar(255) NOT NULL,
+ DEC_DEF_NAME_ varchar(255),
+ PROC_DEF_KEY_ varchar(255),
+ PROC_DEF_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ CASE_DEF_KEY_ varchar(255),
+ CASE_DEF_ID_ varchar(64),
+ CASE_INST_ID_ varchar(64),
+ ACT_INST_ID_ varchar(64),
+ ACT_ID_ varchar(255),
+ EVAL_TIME_ datetime not null,
+ COLLECT_VALUE_ double,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create history decision input table --
+create table ACT_HI_DEC_IN (
+ ID_ varchar(64) NOT NULL,
+ DEC_INST_ID_ varchar(64) NOT NULL,
+ CLAUSE_ID_ varchar(64) NOT NULL,
+ CLAUSE_NAME_ varchar(255),
+ VAR_TYPE_ varchar(100),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ LONGBLOB NULL,
+ TEXT2_ LONGBLOB NULL,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create history decision output table --
+create table ACT_HI_DEC_OUT (
+ ID_ varchar(64) NOT NULL,
+ DEC_INST_ID_ varchar(64) NOT NULL,
+ CLAUSE_ID_ varchar(64) NOT NULL,
+ CLAUSE_NAME_ varchar(255),
+ RULE_ID_ varchar(64) NOT NULL,
+ RULE_ORDER_ integer,
+ VAR_NAME_ varchar(255),
+ VAR_TYPE_ varchar(100),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ LONGBLOB NULL,
+ TEXT2_ LONGBLOB NULL,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create indexes for historic decision tables
+create index ACT_IDX_HI_DEC_INST_ID on ACT_HI_DECINST(DEC_DEF_ID_);
+create index ACT_IDX_HI_DEC_INST_KEY on ACT_HI_DECINST(DEC_DEF_KEY_);
+create index ACT_IDX_HI_DEC_INST_PI on ACT_HI_DECINST(PROC_INST_ID_);
+create index ACT_IDX_HI_DEC_INST_CI on ACT_HI_DECINST(CASE_INST_ID_);
+create index ACT_IDX_HI_DEC_INST_ACT on ACT_HI_DECINST(ACT_ID_);
+create index ACT_IDX_HI_DEC_INST_ACT_INST on ACT_HI_DECINST(ACT_INST_ID_);
+create index ACT_IDX_HI_DEC_INST_TIME on ACT_HI_DECINST(EVAL_TIME_);
+
+create index ACT_IDX_HI_DEC_IN_INST on ACT_HI_DEC_IN(DEC_INST_ID_);
+create index ACT_IDX_HI_DEC_IN_CLAUSE on ACT_HI_DEC_IN(DEC_INST_ID_, CLAUSE_ID_);
+
+create index ACT_IDX_HI_DEC_OUT_INST on ACT_HI_DEC_OUT(DEC_INST_ID_);
+create index ACT_IDX_HI_DEC_OUT_RULE on ACT_HI_DEC_OUT(RULE_ORDER_, CLAUSE_ID_);
+
+-- add grant authorization for group camunda-admin:
+INSERT INTO
+ ACT_RU_AUTHORIZATION (ID_, TYPE_, GROUP_ID_, RESOURCE_TYPE_, RESOURCE_ID_, PERMS_, REV_)
+VALUES
+ ('camunda-admin-grant-decision-definition', 1, 'camunda-admin', 10, '*', 2147483647, 1);
+
+-- external tasks --
+
+create table ACT_RU_EXT_TASK (
+ ID_ varchar(64) not null,
+ REV_ integer not null,
+ WORKER_ID_ varchar(255),
+ TOPIC_NAME_ varchar(255),
+ RETRIES_ integer,
+ ERROR_MSG_ varchar(4000),
+ LOCK_EXP_TIME_ timestamp NULL,
+ SUSPENSION_STATE_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ PROC_DEF_KEY_ varchar(255),
+ ACT_ID_ varchar(255),
+ ACT_INST_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+alter table ACT_RU_EXT_TASK
+ add constraint ACT_FK_EXT_TASK_EXE
+ foreign key (EXECUTION_ID_)
+ references ACT_RU_EXECUTION (ID_);
+
+create index ACT_IDX_EXT_TASK_TOPIC on ACT_RU_EXT_TASK(TOPIC_NAME_);
+
+-- deployment --
+
+ALTER TABLE ACT_RE_DEPLOYMENT
+ ADD SOURCE_ varchar(255);
+
+ALTER TABLE ACT_HI_OP_LOG
+ ADD DEPLOYMENT_ID_ varchar(64);
+
+-- job suspension state
+
+ALTER TABLE ACT_RU_JOB
+ MODIFY COLUMN SUSPENSION_STATE_ integer
+ DEFAULT 1;
+
+ -- relevant for jobs created in Camunda 7.0
+UPDATE ACT_RU_JOB
+ SET SUSPENSION_STATE_ = 1
+ WHERE SUSPENSION_STATE_ IS NULL;
+
+ALTER TABLE ACT_RU_JOB
+ MODIFY COLUMN SUSPENSION_STATE_ integer
+ NOT NULL DEFAULT 1;
+
+
+-- mariadb_engine_7.4_patch_7.4.5_to_7.4.6
+-- INCREASE process def key column size https://app.camunda.com/jira/browse/CAM-4328 --
+alter table ACT_RU_JOB
+ MODIFY COLUMN PROCESS_DEF_KEY_ varchar(255);
+
+-- mariadb_engine_7.4_to_7.5
+-- set datetime precision --
+
+ALTER TABLE ACT_HI_CASEINST
+ MODIFY COLUMN CREATE_TIME_ datetime(3) not null;
+
+ALTER TABLE ACT_HI_CASEINST
+ MODIFY COLUMN CLOSE_TIME_ datetime(3);
+
+ALTER TABLE ACT_HI_CASEACTINST
+ MODIFY COLUMN CREATE_TIME_ datetime(3) not null;
+
+ALTER TABLE ACT_HI_CASEACTINST
+ MODIFY COLUMN END_TIME_ datetime(3);
+
+ALTER TABLE ACT_HI_DECINST
+ MODIFY COLUMN EVAL_TIME_ datetime(3) not null;
+
+ALTER TABLE ACT_RU_TASK
+ MODIFY COLUMN DUE_DATE_ datetime(3);
+
+ALTER TABLE ACT_RU_TASK
+ MODIFY COLUMN FOLLOW_UP_DATE_ datetime(3);
+
+ALTER TABLE ACT_HI_PROCINST
+ MODIFY COLUMN START_TIME_ datetime(3) not null;
+
+ALTER TABLE ACT_HI_PROCINST
+ MODIFY COLUMN END_TIME_ datetime(3);
+
+ALTER TABLE ACT_HI_ACTINST
+ MODIFY COLUMN START_TIME_ datetime(3) not null;
+
+ALTER TABLE ACT_HI_ACTINST
+ MODIFY COLUMN END_TIME_ datetime(3);
+
+ALTER TABLE ACT_HI_TASKINST
+ MODIFY COLUMN START_TIME_ datetime(3) not null;
+
+ALTER TABLE ACT_HI_TASKINST
+ MODIFY COLUMN END_TIME_ datetime(3);
+
+ALTER TABLE ACT_HI_TASKINST
+ MODIFY COLUMN DUE_DATE_ datetime(3);
+
+ALTER TABLE ACT_HI_TASKINST
+ MODIFY COLUMN FOLLOW_UP_DATE_ datetime(3);
+
+ALTER TABLE ACT_HI_DETAIL
+ MODIFY COLUMN TIME_ datetime(3) not null;
+
+ALTER TABLE ACT_HI_COMMENT
+ MODIFY COLUMN TIME_ datetime(3) not null;
+
+-- set timestamp precision --
+
+ALTER TABLE ACT_RE_DEPLOYMENT
+ MODIFY COLUMN DEPLOY_TIME_ timestamp(3);
+
+ALTER TABLE ACT_RU_JOB
+ MODIFY COLUMN LOCK_EXP_TIME_ timestamp(3) NULL;
+
+ALTER TABLE ACT_RU_JOB
+ MODIFY COLUMN DUEDATE_ timestamp(3) NULL;
+
+ALTER TABLE ACT_RU_TASK
+ MODIFY COLUMN CREATE_TIME_ timestamp(3);
+
+ALTER TABLE ACT_RU_EVENT_SUBSCR
+ MODIFY COLUMN CREATED_ timestamp(3) NOT NULL;
+
+ALTER TABLE ACT_RU_INCIDENT
+ MODIFY COLUMN INCIDENT_TIMESTAMP_ timestamp(3) NOT NULL;
+
+ALTER TABLE ACT_RU_METER_LOG
+ MODIFY COLUMN TIMESTAMP_ timestamp(3) NOT NULL;
+
+ALTER TABLE ACT_RU_EXT_TASK
+ MODIFY COLUMN LOCK_EXP_TIME_ timestamp(3) NULL;
+
+ALTER TABLE ACT_HI_OP_LOG
+ MODIFY COLUMN TIMESTAMP_ timestamp(3) NOT NULL;
+
+ALTER TABLE ACT_HI_INCIDENT
+ MODIFY COLUMN CREATE_TIME_ timestamp(3) NOT NULL;
+
+ALTER TABLE ACT_HI_INCIDENT
+ MODIFY COLUMN END_TIME_ timestamp(3) NULL;
+
+ALTER TABLE ACT_HI_JOB_LOG
+ MODIFY COLUMN TIMESTAMP_ timestamp(3) NOT NULL;
+
+ALTER TABLE ACT_HI_JOB_LOG
+ MODIFY COLUMN JOB_DUEDATE_ timestamp(3) NULL;
+
+-- semantic version --
+
+ALTER TABLE ACT_RE_PROCDEF
+ ADD VERSION_TAG_ varchar(64);
+
+create index ACT_IDX_PROCDEF_VER_TAG on ACT_RE_PROCDEF(VERSION_TAG_);
+
+-- tenant id --
+
+ALTER TABLE ACT_RE_DEPLOYMENT
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_DEPLOYMENT_TENANT_ID on ACT_RE_DEPLOYMENT(TENANT_ID_);
+
+ALTER TABLE ACT_RE_PROCDEF
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_RE_PROCDEF
+ DROP INDEX ACT_UNIQ_PROCDEF;
+
+create index ACT_IDX_PROCDEF_TENANT_ID ON ACT_RE_PROCDEF(TENANT_ID_);
+
+ALTER TABLE ACT_RU_EXECUTION
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_EXEC_TENANT_ID on ACT_RU_EXECUTION(TENANT_ID_);
+
+ALTER TABLE ACT_RU_TASK
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_TASK_TENANT_ID on ACT_RU_TASK(TENANT_ID_);
+
+ALTER TABLE ACT_RU_VARIABLE
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_VARIABLE_TENANT_ID on ACT_RU_VARIABLE(TENANT_ID_);
+
+ALTER TABLE ACT_RU_EVENT_SUBSCR
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_EVENT_SUBSCR_TENANT_ID on ACT_RU_EVENT_SUBSCR(TENANT_ID_);
+
+ALTER TABLE ACT_RU_JOB
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_JOB_TENANT_ID on ACT_RU_JOB(TENANT_ID_);
+
+ALTER TABLE ACT_RU_JOBDEF
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_JOBDEF_TENANT_ID on ACT_RU_JOBDEF(TENANT_ID_);
+
+ALTER TABLE ACT_RU_INCIDENT
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_RU_IDENTITYLINK
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_INC_TENANT_ID on ACT_RU_INCIDENT(TENANT_ID_);
+
+ALTER TABLE ACT_RU_EXT_TASK
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_EXT_TASK_TENANT_ID on ACT_RU_EXT_TASK(TENANT_ID_);
+
+ALTER TABLE ACT_RE_DECISION_DEF
+ DROP INDEX ACT_UNIQ_DECISION_DEF;
+
+ALTER TABLE ACT_RE_DECISION_DEF
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_DEC_DEF_TENANT_ID on ACT_RE_DECISION_DEF(TENANT_ID_);
+
+ALTER TABLE ACT_RE_CASE_DEF
+ DROP INDEX ACT_UNIQ_CASE_DEF;
+
+ALTER TABLE ACT_RE_CASE_DEF
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_CASE_DEF_TENANT_ID on ACT_RE_CASE_DEF(TENANT_ID_);
+
+ALTER TABLE ACT_GE_BYTEARRAY
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_RU_CASE_EXECUTION
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_CASE_EXEC_TENANT_ID on ACT_RU_CASE_EXECUTION(TENANT_ID_);
+
+ALTER TABLE ACT_RU_CASE_SENTRY_PART
+ ADD TENANT_ID_ varchar(64);
+
+-- user on historic decision instance --
+
+ALTER TABLE ACT_HI_DECINST
+ ADD USER_ID_ varchar(255);
+
+-- tenant id on history --
+
+ALTER TABLE ACT_HI_PROCINST
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_PRO_INST_TENANT_ID on ACT_HI_PROCINST(TENANT_ID_);
+
+ALTER TABLE ACT_HI_ACTINST
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_ACT_INST_TENANT_ID on ACT_HI_ACTINST(TENANT_ID_);
+
+ALTER TABLE ACT_HI_TASKINST
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_TASK_INST_TENANT_ID on ACT_HI_TASKINST(TENANT_ID_);
+
+ALTER TABLE ACT_HI_VARINST
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_VAR_INST_TENANT_ID on ACT_HI_VARINST(TENANT_ID_);
+
+ALTER TABLE ACT_HI_DETAIL
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_DETAIL_TENANT_ID on ACT_HI_DETAIL(TENANT_ID_);
+
+ALTER TABLE ACT_HI_INCIDENT
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_INCIDENT_TENANT_ID on ACT_HI_INCIDENT(TENANT_ID_);
+
+ALTER TABLE ACT_HI_JOB_LOG
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_JOB_LOG_TENANT_ID on ACT_HI_JOB_LOG(TENANT_ID_);
+
+ALTER TABLE ACT_HI_COMMENT
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_HI_ATTACHMENT
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_HI_OP_LOG
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_HI_DEC_IN
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_HI_DEC_OUT
+ ADD TENANT_ID_ varchar(64);
+
+ALTER TABLE ACT_HI_DECINST
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_DEC_INST_TENANT_ID on ACT_HI_DECINST(TENANT_ID_);
+
+ALTER TABLE ACT_HI_CASEINST
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_CAS_I_TENANT_ID on ACT_HI_CASEINST(TENANT_ID_);
+
+ALTER TABLE ACT_HI_CASEACTINST
+ ADD TENANT_ID_ varchar(64);
+
+create index ACT_IDX_HI_CAS_A_I_TENANT_ID on ACT_HI_CASEACTINST(TENANT_ID_);
+
+-- AUTHORIZATION --
+
+-- add grant authorizations for group camunda-admin:
+INSERT INTO
+ ACT_RU_AUTHORIZATION (ID_, TYPE_, GROUP_ID_, RESOURCE_TYPE_, RESOURCE_ID_, PERMS_, REV_)
+VALUES
+ ('camunda-admin-grant-tenant', 1, 'camunda-admin', 11, '*', 2147483647, 1),
+ ('camunda-admin-grant-tenant-membership', 1, 'camunda-admin', 12, '*', 2147483647, 1),
+ ('camunda-admin-grant-batch', 1, 'camunda-admin', 13, '*', 2147483647, 1);
+
+-- tenant table
+
+create table ACT_ID_TENANT (
+ ID_ varchar(64),
+ REV_ integer,
+ NAME_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_TENANT_MEMBER (
+ ID_ varchar(64) not null,
+ TENANT_ID_ varchar(64) not null,
+ USER_ID_ varchar(64),
+ GROUP_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_UNIQ_TENANT_MEMB_USER
+ unique (TENANT_ID_, USER_ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_UNIQ_TENANT_MEMB_GROUP
+ unique (TENANT_ID_, GROUP_ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_FK_TENANT_MEMB
+ foreign key (TENANT_ID_)
+ references ACT_ID_TENANT (ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_FK_TENANT_MEMB_USER
+ foreign key (USER_ID_)
+ references ACT_ID_USER (ID_);
+
+alter table ACT_ID_TENANT_MEMBER
+ add constraint ACT_FK_TENANT_MEMB_GROUP
+ foreign key (GROUP_ID_)
+ references ACT_ID_GROUP (ID_);
+
+-- BATCH --
+
+-- remove not null from job definition table --
+alter table ACT_RU_JOBDEF
+ modify PROC_DEF_ID_ varchar(64),
+ modify PROC_DEF_KEY_ varchar(255),
+ modify ACT_ID_ varchar(255);
+
+create table ACT_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer not null,
+ TYPE_ varchar(255),
+ TOTAL_JOBS_ integer,
+ JOBS_CREATED_ integer,
+ JOBS_PER_SEED_ integer,
+ INVOCATIONS_PER_JOB_ integer,
+ SEED_JOB_DEF_ID_ varchar(64),
+ BATCH_JOB_DEF_ID_ varchar(64),
+ MONITOR_JOB_DEF_ID_ varchar(64),
+ SUSPENSION_STATE_ integer,
+ CONFIGURATION_ varchar(255),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_BATCH (
+ ID_ varchar(64) not null,
+ TYPE_ varchar(255),
+ TOTAL_JOBS_ integer,
+ JOBS_PER_SEED_ integer,
+ INVOCATIONS_PER_JOB_ integer,
+ SEED_JOB_DEF_ID_ varchar(64),
+ MONITOR_JOB_DEF_ID_ varchar(64),
+ BATCH_JOB_DEF_ID_ varchar(64),
+ TENANT_ID_ varchar(64),
+ START_TIME_ datetime(3) not null,
+ END_TIME_ datetime(3),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ varchar(64) not null,
+ TIMESTAMP_ timestamp(3) not null,
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ GROUP_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ OPERATION_TYPE_ varchar(64),
+ ASSIGNER_ID_ varchar(64),
+ PROC_DEF_KEY_ varchar(255),
+ TENANT_ID_ varchar(64),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_GROUP on ACT_HI_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_HI_IDENT_LNK_TENANT_ID on ACT_HI_IDENTITYLINK(TENANT_ID_);
+
+create index ACT_IDX_JOB_JOB_DEF_ID on ACT_RU_JOB(JOB_DEF_ID_);
+create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG(JOB_DEF_ID_);
+
+create index ACT_IDX_BATCH_SEED_JOB_DEF ON ACT_RU_BATCH(SEED_JOB_DEF_ID_);
+alter table ACT_RU_BATCH
+ add constraint ACT_FK_BATCH_SEED_JOB_DEF
+ foreign key (SEED_JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+create index ACT_IDX_BATCH_MONITOR_JOB_DEF ON ACT_RU_BATCH(MONITOR_JOB_DEF_ID_);
+alter table ACT_RU_BATCH
+ add constraint ACT_FK_BATCH_MONITOR_JOB_DEF
+ foreign key (MONITOR_JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+create index ACT_IDX_BATCH_JOB_DEF ON ACT_RU_BATCH(BATCH_JOB_DEF_ID_);
+alter table ACT_RU_BATCH
+ add constraint ACT_FK_BATCH_JOB_DEF
+ foreign key (BATCH_JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+-- TASK PRIORITY --
+
+ALTER TABLE ACT_RU_EXT_TASK
+ ADD PRIORITY_ bigint NOT NULL DEFAULT 0;
+
+create index ACT_IDX_EXT_TASK_PRIORITY ON ACT_RU_EXT_TASK(PRIORITY_);
+
+-- HI OP PROC INDECIES --
+
+create index ACT_IDX_HI_OP_LOG_PROCINST on ACT_HI_OP_LOG(PROC_INST_ID_);
+create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG(PROC_DEF_ID_);
+
+-- JOB_DEF_ID_ on INCIDENTS --
+ALTER TABLE ACT_RU_INCIDENT
+ ADD JOB_DEF_ID_ varchar(64);
+
+create index ACT_IDX_INC_JOB_DEF on ACT_RU_INCIDENT(JOB_DEF_ID_);
+alter table ACT_RU_INCIDENT
+ add constraint ACT_FK_INC_JOB_DEF
+ foreign key (JOB_DEF_ID_)
+ references ACT_RU_JOBDEF (ID_);
+
+ALTER TABLE ACT_HI_INCIDENT
+ ADD JOB_DEF_ID_ varchar(64);
+
+-- BATCH_ID_ on ACT_HI_OP_LOG --
+ALTER TABLE ACT_HI_OP_LOG
+ ADD BATCH_ID_ varchar(64);
+
+ -- add indexes on PROC_DEF_KEY_ columns in history tables CAM-6679
+create index ACT_IDX_HI_ACT_INST_PROC_DEF_KEY on ACT_HI_ACTINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_DETAIL_PROC_DEF_KEY on ACT_HI_DETAIL(PROC_DEF_KEY_);
+create index ACT_IDX_HI_IDENT_LNK_PROC_DEF_KEY on ACT_HI_IDENTITYLINK(PROC_DEF_KEY_);
+create index ACT_IDX_HI_INCIDENT_PROC_DEF_KEY on ACT_HI_INCIDENT(PROC_DEF_KEY_);
+create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG(PROCESS_DEF_KEY_);
+create index ACT_IDX_HI_PRO_INST_PROC_DEF_KEY on ACT_HI_PROCINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_TASK_INST_PROC_DEF_KEY on ACT_HI_TASKINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_VAR_INST_PROC_DEF_KEY on ACT_HI_VARINST(PROC_DEF_KEY_);
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..40bb93bda0
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <v1:SDNCAdapterCallback>
+ <SDNCAdapterCallbackRequest xmlns="http://org.openecomp/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>
+ </v1:SDNCAdapterCallback>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_200.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_200.xml
new file mode 100644
index 0000000000..fce5afafec
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_200.xml
@@ -0,0 +1,13 @@
+<search-results xmlns="http://com.aai.inventory">
+ <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>
+ </search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_Fault.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_Fault.xml
new file mode 100644
index 0000000000..f33255b8a7
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_genericQueryByInstanceName_AAIResponse_Fault.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Fault>
+ <requestError>
+ <serviceException>
+ <messageId>SVC3000</messageId>
+ <text>Invalid input performing %1 on %2 (msg=%3) (ec=%4)</text>
+ <variables>
+ <variable>PUT customer</variable>
+ <variable>global-customer-id=global_subscriber_id </variable>
+ <variable>Uniqueness constraint violated:Conflicting Key and Alternate-Key values passed for add of nodeType = customer</variable>
+ <variable>ERR.5.4.6117</variable>
+ </variables>
+ </serviceException>
+ </requestError>
+</Fault>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModuleVolumeGroup_VID_request.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModuleVolumeGroup_VID_request.json
new file mode 100644
index 0000000000..c3064fe07c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModuleVolumeGroup_VID_request.json
@@ -0,0 +1,74 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1"
+},
+"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",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12..base..module-0",
+"modelVersion": "1"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "123456",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "skask",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "78987",
+"modelInfo": {
+"modelType": "volumeGroup",
+"modelInvariantId": "skask",
+"modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModule_VID_request.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModule_VID_request.json
new file mode 100644
index 0000000000..a18ce576b5
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/CreateVfModule_VID_request.json
@@ -0,0 +1,64 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1",
+"modelCustomizationId": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+},
+"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",
+"modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12..base..module-0",
+"modelVersion": "1"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "123456",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "skask",
+"instanceName": "skask-test",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBAdapter.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBAdapter.xml
new file mode 100644
index 0000000000..5a36d741d0
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBAdapter.xml
@@ -0,0 +1 @@
+<DbTag>Notified</DbTag> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml
new file mode 100644
index 0000000000..7c30f75497
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.openecomp.mso/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..cb5d0001f7
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <v1:SDNCAdapterCallback>
+ <SDNCAdapterCallbackRequest xmlns="http://org.openecomp/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>
+ </v1:SDNCAdapterCallback>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/DeleteVfModule_VID_request.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/DeleteVfModule_VID_request.json
new file mode 100644
index 0000000000..c75c32d498
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/GENDSI_getServiceInstanceResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GENDSI_getServiceInstanceResponse.xml
new file mode 100644
index 0000000000..30b0afb3dc
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GENDSI_getServiceInstanceResponse.xml
@@ -0,0 +1,35 @@
+ <service-subscription xmlns="http://com.aai.inventory">
+ <service-type>SDN-ETHERNET-INTERNET</service-type>
+ <resource-version>1234</resource-version>
+ <service-instances>
+ <service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <relationship-list>
+ <relationship>
+ <related-to>cvlan-tag</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
+ <relationship-data>
+ <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
+ <relationship-value>2003</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>port-group.interface-id</relationship-key>
+ <relationship-value>slcp1447vbc.ipag</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vce</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </service-instance>
+ </service-instances>
+ </service-subscription> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
new file mode 100644
index 0000000000..a609a35857
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
@@ -0,0 +1,23 @@
+<generic-vnfs xmlns="http://com.aai.inventory/v3">
+ <generic-vnf>
+ <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>testReVer123</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>nothing</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..2b70f0b600
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
@@ -0,0 +1,90 @@
+<generic-vnfs xmlns="http://com.aai.inventory/v3">
+ <generic-vnf>
+ <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ <generic-vnf>
+ <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
+ <vnf-name>ZRDM1MMSC03</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
new file mode 100644
index 0000000000..2b70f0b600
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
@@ -0,0 +1,90 @@
+<generic-vnfs xmlns="http://com.aai.inventory/v3">
+ <generic-vnf>
+ <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ <generic-vnf>
+ <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
+ <vnf-name>ZRDM1MMSC03</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml
new file mode 100644
index 0000000000..b1f640f47f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml
@@ -0,0 +1,6 @@
+ <search-results xmlns="http://com.aai.inventory">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
+ </result-data>
+ </search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml
new file mode 100644
index 0000000000..b1f640f47f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml
@@ -0,0 +1,6 @@
+ <search-results xmlns="http://com.aai.inventory">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
+ </result-data>
+ </search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml
new file mode 100644
index 0000000000..84d8600eac
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml
new file mode 100644
index 0000000000..85cd5d605a
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml
@@ -0,0 +1,34 @@
+<service-subscription xmlns="http://com.aai.inventory">
+ <service-type>SDN-ETHERNET-INTERNET</service-type>
+ <resource-version>1234</resource-version>
+ <service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>cvlan-tag</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
+ <relationship-data>
+ <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
+ <relationship-value>2003</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>port-group.interface-id</relationship-key>
+ <relationship-value>slcp1447vbc.ipag</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vce</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </service-instance>
+ </service-subscription> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml
new file mode 100644
index 0000000000..7ada696cb7
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml
@@ -0,0 +1,97 @@
+<vce xmlns="http://com.aai.inventory">
+ <vnf-id>1936628a-d22f-4943-8587-a57bab2ece7a</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-name2>US0112SLCP1VBRT076</vnf-name2>
+ <vnf-type>esx-vce</vnf-type>
+ <prov-status>NVTPROV</prov-status>
+ <orchestration-status>created</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <heat-stack-id>slcp1476vbc/94a3c72b-94d5-444b-9a1f-647a36c2181d</heat-stack-id>
+ <mso-catalog-key/>
+ <vpe-id>VPESAT-mtanjrsv126</vpe-id>
+ <ipv4-oam-address>135.21.249.160</ipv4-oam-address>
+ <port-groups>
+ <port-group>
+ <interface-id>slcp1476vbc.vpe</interface-id>
+ <neutron-network-id>e7568706-a2a9-45f8-aef8-95a0e2910953</neutron-network-id>
+ <neutron-network-name>dvspg-VCE_VPE-slcp1476vbc</neutron-network-name>
+ <interface-role>Internet</interface-role>
+ <port-group-name>dvspg-VCE_VPE-slcp1476vbc</port-group-name>
+ <resource-version>0000020</resource-version>
+ <switch-name>dvs-slcp1-01</switch-name>
+ <orchestration-status>created</orchestration-status>
+ <heat-stack-id>dvspg-VCE_VPE-slcp1476vbc/c1299f74-da35-4228-b1e0-d2fd07176196</heat-stack-id>
+ <mso-catalog-key/>
+ <cvlan-tags>
+ <cvlan-tag-entry>
+ <cvlan-tag>3012</cvlan-tag>
+ <resource-version>0000020</resource-version>
+ </cvlan-tag-entry>
+ </cvlan-tags>
+ </port-group>
+ <port-group>
+ <interface-id>slcp1476vbc.ipag</interface-id>
+ <neutron-network-id>3477ddb6-b925-4971-ab62-c84b69634c49</neutron-network-id>
+ <neutron-network-name>dvspg-IPAG_VCE-slcp1476vbc</neutron-network-name>
+ <interface-role>Customer</interface-role>
+ <port-group-name>dvspg-IPAG_VCE-slcp1476vbc</port-group-name>
+ <switch-name>dvs-slcp1-01</switch-name>
+ <resource-version>0000020</resource-version>
+ <orchestration-status>created</orchestration-status>
+ <heat-stack-id>dvspg-IPAG_VCE-slcp1476vbc/1e9c033a-2eef-47f5-9d48-98e0b59538e7</heat-stack-id>
+ <mso-catalog-key/>
+ <cvlan-tags>
+ <cvlan-tag-entry>
+ <cvlan-tag>2003</cvlan-tag>
+ <resource-version>0000020</resource-version>
+ </cvlan-tag-entry>
+ </cvlan-tags>
+ </port-group>
+ </port-groups>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/business/customers/customer/011216-1602-SDNC001/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/SDNC%2FVLXM%2F0112001%2F%2FSW_INTERNET/</related-link>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>SDNC/VLXM/0112001//SW_INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>011216-1602-SDNC001</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vserver</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/servers/v2/3d5f3fe23821416fac2b69af65248c74/vservers/ecab47d5-3450-4507-ada9-2b3c58485c51/</related-link>
+ <relationship-data>
+ <relationship-key>vserver.vserver-id</relationship-key>
+ <relationship-value>ecab47d5-3450-4507-ada9-2b3c58485c51</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>3d5f3fe23821416fac2b69af65248c74</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>complex</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/complexes/complex/MDTWNJ21A4/</related-link>
+ <relationship-data>
+ <relationship-key>complex.physical-location-id</relationship-key>
+ <relationship-value>MDTWNJ21A4</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>availability-zone</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/availability-zones/availability-zone/slcp1-esx-az01/</related-link>
+ <relationship-data>
+ <relationship-key>availability-zone.availability-zone-name</relationship-key>
+ <relationship-value>slcp1-esx-az01</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vce> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml
new file mode 100644
index 0000000000..5dc3033445
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml
@@ -0,0 +1,97 @@
+<vce xmlns="http://com.aai.inventory">
+ <vnf-id>1936628a-d22f-4943-8587-a57bab2ece7a</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-name2>US0112SLCP1VBRT076</vnf-name2>
+ <vnf-type>esx-vce</vnf-type>
+ <prov-status>NVTPROV</prov-status>
+ <orchestration-status>created</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <heat-stack-id>slcp1476vbc/94a3c72b-94d5-444b-9a1f-647a36c2181d</heat-stack-id>
+ <mso-catalog-key/>
+ <vpe-id>VPESAT-mtanjrsv126</vpe-id>
+ <ipv4-oam-address>135.21.249.160</ipv4-oam-address>
+ <port-groups>
+ <port-group>
+ <interface-id>slcp1476vbc.vpe</interface-id>
+ <neutron-network-id>e7568706-a2a9-45f8-aef8-95a0e2910953</neutron-network-id>
+ <neutron-network-name>dvspg-VCE_VPE-slcp1476vbc</neutron-network-name>
+ <interface-role>Internet</interface-role>
+ <port-group-name>dvspg-VCE_VPE-slcp1476vbc</port-group-name>
+ <resource-version>0000020</resource-version>
+ <switch-name>dvs-slcp1-01</switch-name>
+ <orchestration-status>created</orchestration-status>
+ <heat-stack-id>dvspg-VCE_VPE-slcp1476vbc/c1299f74-da35-4228-b1e0-d2fd07176196</heat-stack-id>
+ <mso-catalog-key/>
+ <cvlan-tags>
+ <cvlan-tag-entry>
+ <cvlan-tag>3012</cvlan-tag>
+ <resource-version>0000020</resource-version>
+ </cvlan-tag-entry>
+ </cvlan-tags>
+ </port-group>
+ <port-group>
+ <interface-id>slcp1476vbc.ipag</interface-id>
+ <neutron-network-id>3477ddb6-b925-4971-ab62-c84b69634c49</neutron-network-id>
+ <neutron-network-name>dvspg-IPAG_VCE-slcp1476vbc</neutron-network-name>
+ <interface-role>Customer</interface-role>
+ <port-group-name>dvspg-IPAG_VCE-slcp1476vbc</port-group-name>
+ <switch-name>dvs-slcp1-01</switch-name>
+ <resource-version>0000020</resource-version>
+ <orchestration-status>created</orchestration-status>
+ <heat-stack-id>dvspg-IPAG_VCE-slcp1476vbc/1e9c033a-2eef-47f5-9d48-98e0b59538e7</heat-stack-id>
+ <mso-catalog-key/>
+ <cvlan-tags>
+ <cvlan-tag-entry>
+ <cvlan-tag>2003</cvlan-tag>
+ <resource-version>0000020</resource-version>
+ </cvlan-tag-entry>
+ </cvlan-tags>
+ </port-group>
+ </port-groups>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/business/customers/customer/011216-1602-SDNC001/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/SDNC%2FVLXM%2F0112001%2F%2FSW_INTERNET/</related-link>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>SDNC/VLXM/0112001//SW_INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>011216-1602-SDNC001</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vserver</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/servers/v2/3d5f3fe23821416fac2b69af65248c74/vservers/ecab47d5-3450-4507-ada9-2b3c58485c51/</related-link>
+ <relationship-data>
+ <relationship-key>vserver.vserver-id</relationship-key>
+ <relationship-value>ecab47d5-3450-4507-ada9-2b3c58485c51</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>3d5f3fe23821416fac2b69af65248c74</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>complex</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/complexes/complex/MDTWNJ21A4/</related-link>
+ <relationship-data>
+ <relationship-key>complex.physical-location-id</relationship-key>
+ <relationship-value>MDTWNJ21A4</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>availability-zone</related-to>
+ <related-link>https://aai-ext1.test..com:8443/aai/v2/cloud-infrastructure/availability-zones/availability-zone/slcp1-esx-az01/</related-link>
+ <relationship-data>
+ <relationship-key>availability-zone.availability-zone-name</relationship-key>
+ <relationship-value>slcp1-esx-az01</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vce> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_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/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml
new file mode 100644
index 0000000000..66ed8f5758
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Fault>
+<requestError>
+<serviceException>
+<messageId>SVC3002</messageId>
+<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
+<variables>
+<variable>PUTcustomer</variable>
+<variable>SubName01</variable>
+<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
+<variable>ERR.5.4.5105</variable>
+</variables>
+</serviceException>
+</requestError>
+</Fault> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1/sdncadapterworkflowrequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1/sdncadapterworkflowrequest.xml
new file mode 100644
index 0000000000..f71f529593
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1/sdncadapterworkflowrequest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:v11="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <v1:SDNCAdapterWorkflowRequest>
+ <v11:RequestHeader>
+ <v11:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</v11:RequestId>
+ <v11:SvcAction>query</v11:SvcAction>
+ <v11:SvcOperation>services/layer3-service-list/AS%2FVLXM%2F000199%2F%2FSB_INTERNET</v11:SvcOperation>
+ <v11:CallbackUrl>http://127.0.0.1:28080/camunda/services/SDNCAdapterCallback</v11:CallbackUrl>
+ </v11:RequestHeader>
+ <v1:SDNCRequestData>
+ <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd" contentType="text/xml">
+ <tag0:service-request xmlns:tag0="http://org.openecomp/mso/request/details/schema/v1">
+ <tag0:request-information>
+ <tag0:request-id>12570a36-7388-4c0a-bec4-189ce3kg9956</tag0:request-id>
+ <tag0:request-action>GetLayer3ServiceDetailsRequest</tag0:request-action>
+ <tag0:source>OMX</tag0:source>
+ </tag0:request-information>
+ <tag0:service-information>
+ <tag0:service-type>SDN-ETHERNET-INTERNET</tag0:service-type>
+ <tag0:service-instance-id>PD/VLXM/003717//SW_INTERNET</tag0:service-instance-id>
+ </tag0:service-information>
+ </tag0:service-request>
+ </rest:payload>
+ </v1:SDNCRequestData>
+ <v1:SDNCTimeOutValueInMinutes>1</v1:SDNCTimeOutValueInMinutes>
+ </v1:SDNCAdapterWorkflowRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1mock/sdncadaptercallbackrequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1mock/sdncadaptercallbackrequest.xml
new file mode 100644
index 0000000000..3d1e03916d
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1mock/sdncadaptercallbackrequest.xml
@@ -0,0 +1,350 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <v1:SDNCAdapterCallback>
+<SDNCAdapterCallbackRequest xmlns="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>testRequestId</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;layer3-service-list xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;service-status&gt;
+ &lt;rpc-name&gt;service-configuration-operation&lt;/rpc-name&gt;
+ &lt;rpc-action&gt;activate&lt;/rpc-action&gt;
+ &lt;request-status&gt;synccomplete&lt;/request-status&gt;
+ &lt;final-indicator&gt;N&lt;/final-indicator&gt;
+ &lt;l3sdn-action&gt;Layer3ServiceActivateRequest&lt;/l3sdn-action&gt;
+ &lt;l3sdn-subaction&gt;SUPP&lt;/l3sdn-subaction&gt;
+ &lt;response-timestamp&gt;2015-04-28T21:32:11.386Z&lt;/response-timestamp&gt;
+ &lt;/service-status&gt;
+ &lt;service-data&gt;
+ &lt;internet-evc-access-information&gt;
+ &lt;ip-version&gt;ds&lt;/ip-version&gt;
+ &lt;internet-evc-speed-value&gt;8&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Mbps&lt;/internet-evc-speed-units&gt;
+ &lt;/internet-evc-access-information&gt;
+ &lt;vr-lan xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;vr-lan-interface&gt;
+ &lt;static-routes&gt;
+ &lt;v6-static-routes&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-static-route-prefix&gt;2001:1890:12e3:2da::&lt;/v6-static-route-prefix&gt;
+ &lt;v6-static-route-prefix-length&gt;28&lt;/v6-static-route-prefix-length&gt;
+ &lt;/v6-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.1&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;v6-static-routes&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-static-route-prefix&gt;2001:1890:12e3:2da::&lt;/v6-static-route-prefix&gt;
+ &lt;v6-static-route-prefix-length&gt;28&lt;/v6-static-route-prefix-length&gt;
+ &lt;/v6-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.2&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.3&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;/static-routes&gt;
+ &lt;dhcp&gt;
+ &lt;v6-dhcp-server-enabled&gt;N&lt;/v6-dhcp-server-enabled&gt;
+ &lt;v4-dhcp-server-enabled&gt;Y&lt;/v4-dhcp-server-enabled&gt;
+ &lt;use-v6-default-pool&gt;N&lt;/use-v6-default-pool&gt;
+ &lt;excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-address&gt;192.168.1.7&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-address&gt;192.168.1.8&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;v4-dhcp-pools&gt;
+ &lt;v4-dhcp-relay-next-hop-address&gt;1.1.1.1&lt;/v4-dhcp-relay-next-hop-address&gt;
+ &lt;v4-dhcp-pool-prefix-length&gt;28&lt;/v4-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.5&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-relay-gateway-address&gt;2.2.2.1&lt;/v4-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.6&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-pool-prefix&gt;192.155.2.3&lt;/v4-dhcp-pool-prefix&gt;
+ &lt;/v4-dhcp-pools&gt;
+ &lt;v4-dhcp-pools&gt;
+ &lt;v4-dhcp-relay-next-hop-address&gt;1.1.1.2&lt;/v4-dhcp-relay-next-hop-address&gt;
+ &lt;v4-dhcp-pool-prefix-length&gt;28&lt;/v4-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.6&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-relay-gateway-address&gt;2.2.2.2&lt;/v4-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.7&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-pool-prefix&gt;192.155.2.4&lt;/v4-dhcp-pool-prefix&gt;
+ &lt;/v4-dhcp-pools&gt;
+ &lt;use-v4-default-pool&gt;Y&lt;/use-v4-default-pool&gt;
+ &lt;excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-address&gt;1:5&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-address&gt;1:6&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;v6-dhcp-pools&gt;
+ &lt;v6-dhcp-relay-next-hop-address&gt;4:4&lt;/v6-dhcp-relay-next-hop-address&gt;
+ &lt;v6-dhcp-pool-prefix-length&gt;28&lt;/v6-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;1:1&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-relay-gateway-address&gt;3:3&lt;/v6-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;2:2&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-pool-prefix&gt;0:0&lt;/v6-dhcp-pool-prefix&gt;
+ &lt;/v6-dhcp-pools&gt;
+ &lt;v6-dhcp-pools&gt;
+ &lt;v6-dhcp-relay-next-hop-address&gt;4:4&lt;/v6-dhcp-relay-next-hop-address&gt;
+ &lt;v6-dhcp-pool-prefix-length&gt;28&lt;/v6-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;1:1&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-relay-gateway-address&gt;3:3&lt;/v6-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;2:2&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-pool-prefix&gt;0:0&lt;/v6-dhcp-pool-prefix&gt;
+ &lt;/v6-dhcp-pools&gt;
+ &lt;/dhcp&gt;
+ &lt;firewall-lite&gt;
+ &lt;stateful-firewall-lite-v6-enabled&gt;N&lt;/stateful-firewall-lite-v6-enabled&gt;
+ &lt;stateful-firewall-lite-v4-enabled&gt;Y&lt;/stateful-firewall-lite-v4-enabled&gt;
+ &lt;v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-prefix&gt;0.0.0.1&lt;/v4-firewall-prefix&gt;
+ &lt;v4-firewall-prefix-length&gt;1&lt;/v4-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;1&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;1&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-prefix&gt;0.0.0.2&lt;/v4-firewall-prefix&gt;
+ &lt;v4-firewall-prefix-length&gt;2&lt;/v4-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;2&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;2&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v4-firewall-packet-filters&gt;
+ &lt;v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-prefix&gt;:&lt;/v6-firewall-prefix&gt;
+ &lt;v6-firewall-prefix-length&gt;0&lt;/v6-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;3&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;3&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-prefix&gt;:&lt;/v6-firewall-prefix&gt;
+ &lt;v6-firewall-prefix-length&gt;1&lt;/v6-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;4&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;4&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v6-firewall-packet-filters&gt;
+ &lt;/firewall-lite&gt;
+ &lt;pat&gt;
+ &lt;v4-pat-pools&gt;
+ &lt;v4-pat-pool-prefix&gt;192.168.1.44&lt;/v4-pat-pool-prefix&gt;
+ &lt;v4-pat-pool-next-hop-address&gt;192.168.1.5&lt;/v4-pat-pool-next-hop-address&gt;
+ &lt;v4-pat-pool-prefix-length&gt;0&lt;/v4-pat-pool-prefix-length&gt;
+ &lt;/v4-pat-pools&gt;
+ &lt;use-v4-default-pool&gt;Y&lt;/use-v4-default-pool&gt;
+ &lt;v4-pat-enabled&gt;N&lt;/v4-pat-enabled&gt;
+ &lt;v4-pat-pools&gt;
+ &lt;v4-pat-pool-prefix&gt;192.168.1.45&lt;/v4-pat-pool-prefix&gt;
+ &lt;v4-pat-pool-next-hop-address&gt;192.168.1.6&lt;/v4-pat-pool-next-hop-address&gt;
+ &lt;v4-pat-pool-prefix-length&gt;28&lt;/v4-pat-pool-prefix-length&gt;
+ &lt;/v4-pat-pools&gt;
+ &lt;/pat&gt;
+ &lt;nat&gt;
+ &lt;v4-nat-enabled&gt;Y&lt;/v4-nat-enabled&gt;
+ &lt;v4-nat-mapping-entries&gt;
+ &lt;v4-nat-internal&gt;0.0.0.0&lt;/v4-nat-internal&gt;
+ &lt;v4-nat-next-hop-address&gt;0.0.0.0&lt;/v4-nat-next-hop-address&gt;
+ &lt;v4-nat-external&gt;0.0.0.0&lt;/v4-nat-external&gt;
+ &lt;/v4-nat-mapping-entries&gt;
+ &lt;v4-nat-mapping-entries&gt;
+ &lt;v4-nat-internal&gt;0.0.0.1&lt;/v4-nat-internal&gt;
+ &lt;v4-nat-next-hop-address&gt;0.0.0.1&lt;/v4-nat-next-hop-address&gt;
+ &lt;v4-nat-external&gt;0.0.0.1&lt;/v4-nat-external&gt;
+ &lt;/v4-nat-mapping-entries&gt;
+ &lt;/nat&gt;
+ &lt;vr-designation&gt;primary&lt;/vr-designation&gt;
+ &lt;v4-vce-loopback-address&gt;162.200.3.144&lt;/v4-vce-loopback-address&gt;
+ &lt;v6-vr-lan-prefix-length&gt;64&lt;/v6-vr-lan-prefix-length&gt;
+ &lt;v6-vce-wan-address&gt;2001:1890:12e3:2da::&lt;/v6-vce-wan-address&gt;
+ &lt;v6-vr-lan-prefix&gt;2620:0:10d0:f:ffff:ffff:ffff:fffe&lt;/v6-vr-lan-prefix&gt;
+ &lt;v4-vr-lan-prefix-length&gt;24&lt;/v4-vr-lan-prefix-length&gt;
+ &lt;v4-vr-lan-prefix&gt;10.192.27.254&lt;/v4-vr-lan-prefix&gt;
+ &lt;v4-public-lan-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.2&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.1&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.72&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.71&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.68&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.67&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;/v4-public-lan-prefixes&gt;
+ &lt;v6-public-lan-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:3da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:4da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;/v6-public-lan-prefixes&gt;
+ &lt;/vr-lan-interface&gt;
+ &lt;routing-protocol&gt;none&lt;/routing-protocol&gt;
+ &lt;/vr-lan&gt;
+&lt;ucpe-vms-service-information&gt;
+ &lt;transport-service-information&gt;
+ &lt;transport-service-type&gt;AVPN&lt;/transport-service-type&gt;
+ &lt;access-circuit-info&gt;
+ &lt;access-circuit-id&gt;1&lt;/access-circuit-id&gt;
+ &lt;dual-mode&gt;Active&lt;/dual-mode&gt;
+ &lt;/access-circuit-info&gt;
+ &lt;access-circuit-info&gt;
+ &lt;access-circuit-id&gt;2&lt;/access-circuit-id&gt;
+ &lt;dual-mode&gt;Standby&lt;/dual-mode&gt;
+ &lt;/access-circuit-info&gt;
+ &lt;/transport-service-information&gt;
+ &lt;ucpe-information&gt;
+ &lt;ucpe-host-name&gt;hostname&lt;/ucpe-host-name&gt;
+ &lt;ucpe-activation-code&gt;activecode&lt;/ucpe-activation-code&gt;
+ &lt;out-of-band-management-modem&gt;OOB&lt;/out-of-band-management-modem&gt;
+ &lt;/ucpe-information&gt;
+ &lt;vnf-list&gt;
+ &lt;vnf-information&gt;
+ &lt;vnf-instance-id&gt;1&lt;/vnf-instance-id&gt;
+ &lt;vnf-sequence-number&gt;1&lt;/vnf-sequence-number&gt;
+ &lt;vnf-type&gt;ZZ&lt;/vnf-type&gt;
+ &lt;vnf-vendor&gt;JUNIPER&lt;/vnf-vendor&gt;
+ &lt;vnf-model&gt;MODEL1&lt;/vnf-model&gt;
+ &lt;vnf-id&gt;1&lt;/vnf-id&gt;
+ &lt;prov-status&gt;1&lt;/prov-status&gt;
+ &lt;operational-state&gt;1&lt;/operational-state&gt;
+ &lt;orchestration-status&gt;1&lt;/orchestration-status&gt;
+ &lt;equipment-role&gt;1&lt;/equipment-role&gt;
+ &lt;/vnf-information&gt;
+ &lt;vnf-information&gt;
+ &lt;vnf-instance-id&gt;2&lt;/vnf-instance-id&gt;
+ &lt;vnf-sequence-number&gt;2&lt;/vnf-sequence-number&gt;
+ &lt;vnf-type&gt;HY&lt;/vnf-type&gt;
+ &lt;vnf-vendor&gt;JUNIPER&lt;/vnf-vendor&gt;
+ &lt;vnf-model&gt;MODEL2&lt;/vnf-model&gt;
+ &lt;vnf-id&gt;2&lt;/vnf-id&gt;
+ &lt;prov-status&gt;2&lt;/prov-status&gt;
+ &lt;operational-state&gt;2&lt;/operational-state&gt;
+ &lt;orchestration-status&gt;2&lt;/orchestration-status&gt;
+ &lt;equipment-role&gt;2&lt;/equipment-role&gt;
+ &lt;/vnf-information&gt;
+ &lt;/vnf-list&gt;
+ &lt;/ucpe-vms-service-information&gt;
+ &lt;request-information&gt;
+ &lt;request-action&gt;Layer3ServiceActivateRequest&lt;/request-action&gt;
+ &lt;order-number&gt;4281555&lt;/order-number&gt;
+ &lt;request-id&gt;155415ab-b4a7-4382-b4c6-d17d9sm42855&lt;/request-id&gt;
+ &lt;notification-url&gt;https://csi-tst-q22.it.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws&lt;/notification-url&gt;
+ &lt;source&gt;OMX&lt;/source&gt;
+ &lt;order-version&gt;1&lt;/order-version&gt;
+ &lt;/request-information&gt;
+ &lt;sdnc-request-header&gt;
+ &lt;svc-action&gt;activate&lt;/svc-action&gt;
+ &lt;svc-notification-url&gt;https://msojra.mtsnjdcp1.aic.cip.com:8443/adapters/rest/SDNCNotify&lt;/svc-notification-url&gt;
+ &lt;svc-request-id&gt;5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760&lt;/svc-request-id&gt;
+ &lt;/sdnc-request-header&gt;
+ &lt;l2-homing-information&gt;
+ &lt;topology&gt;MultiPoint&lt;/topology&gt;
+ &lt;preferred-aic-clli&gt;MTSNJA4LCP1&lt;/preferred-aic-clli&gt;
+ &lt;evc-name&gt;AS/VLXM/003717//SW&lt;/evc-name&gt;
+ &lt;/l2-homing-information&gt;
+ &lt;service-information&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;subscriber-name&gt;ST E2E Test42855_1300004281555&lt;/subscriber-name&gt;
+ &lt;service-type&gt;SDN-ETHERNET-INTERNET&lt;/service-type&gt;
+ &lt;/service-information&gt;
+ &lt;internet-service-change-details&gt;
+ &lt;internet-evc-speed-value&gt;10&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Kbps&lt;/internet-evc-speed-units&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.15&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;2&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.16&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.16&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;/internet-service-change-details&gt;
+ &lt;/service-data&gt;
+ &lt;/layer3-service-list&gt;
+</RequestData>
+</SDNCAdapterCallbackRequest>
+</v1:SDNCAdapterCallback>
+</soapenv:Body>
+</soapenv:Envelope> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml
new file mode 100644
index 0000000000..a5640b2b26
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
new file mode 100644
index 0000000000..c67e980c63
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
@@ -0,0 +1,78 @@
+<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.openecomp.mso.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000071: root cause</b>
+ <pre>java.lang.NullPointerException
+ org.openecomp.mso.adapters.network.NetworkAdapterRest$CreateNetworkVolumesTask.run(NetworkAdapterRest.java:128)
+ org.openecomp.mso.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.openecomp.mso.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/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
new file mode 100644
index 0000000000..7a00744103
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
@@ -0,0 +1,24 @@
+<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.openecomp.mso/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/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml
new file mode 100644
index 0000000000..09f01fb7ca
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
new file mode 100644
index 0000000000..196558633b
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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://com.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/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
new file mode 100644
index 0000000000..48f652cc0e
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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://com.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/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..c911d320ec
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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://com.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/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySim500Response.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySim500Response.xml
new file mode 100644
index 0000000000..2cf94b2ef2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySim500Response.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <v1:SDNCAdapterCallback>
+ <SDNCAdapterCallbackRequest xmlns="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>testRequestId</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="com:att:sdnctl:vnf"&gt;&lt;response-code&gt;500&lt;/response-code&gt;&lt;response-message&gt;'Error
+ retrieving l3-network with network-id=' +
+ $network-topology-operation-input.network-request-information.network-id
+ + 'from
+ AnAI'&lt;/response-message&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;svc-request-id&gt;006927ca-f5a3-47fd-880c-dfcbcd81a093&lt;/svc-request-id&gt;&lt;/output&gt;
+ </RequestData>
+ </SDNCAdapterCallbackRequest>
+ </v1:SDNCAdapterCallback>
+ </soapenv:Body>
+</soapenv:Envelope>
+
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..40bb93bda0
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <v1:SDNCAdapterCallback>
+ <SDNCAdapterCallbackRequest xmlns="http://org.openecomp/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>
+ </v1:SDNCAdapterCallback>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..d3f9c1eaf3
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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://com.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/MSOCommonBPMN/src/test/resources/__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml
new file mode 100644
index 0000000000..2126ae7464
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml
@@ -0,0 +1,6 @@
+<CreateAAIVfModuleVolumeGroupRequest>
+ <vnf-id>skask</vnf-id>
+ <vf-module-id>lukewarm</vf-module-id>
+ <aic-cloud-region>pdk1</aic-cloud-region>
+ <volume-group-id>78987</volume-group-id>
+</CreateAAIVfModuleVolumeGroupRequest> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml
new file mode 100644
index 0000000000..d041565ac7
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml
@@ -0,0 +1,29 @@
+<vnf-request xmlns="http://org.openecomp/mso/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/MSOCommonBPMN/src/test/resources/__files/VfModularity/GenericVnf.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/GenericVnf.xml
new file mode 100644
index 0000000000..c159e2eae2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/GenericVnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://com.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>
+ <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>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml
new file mode 100644
index 0000000000..65f235cf4b
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml
@@ -0,0 +1,5 @@
+<PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>skask</vnf-id>
+ <vf-module-id>supercool</vf-module-id>
+ <orchestration-status>pending-delete</orchestration-status>
+</PrepareUpdateAAIVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..94e00427a2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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://com.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/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml
new file mode 100644
index 0000000000..4cab6c6615
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml
new file mode 100644
index 0000000000..7d3d0e54d1
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.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/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml
new file mode 100644
index 0000000000..7d3d0e54d1
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml
new file mode 100644
index 0000000000..7c67095af1
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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://msojra.infra.aic.net: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>ZVNNMOGX01_base</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/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml
new file mode 100644
index 0000000000..9b69fdc053
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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://mtanjv9moja01-eth1-0.aic.cip.com:28080/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/MSOCommonBPMN/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml
new file mode 100644
index 0000000000..919ff2c36b
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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.openecomp/workflow/sdnc/adapter/schema/v1"/>
+ </soap:Body>
+</soap:Envelope> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIGenericVnfRequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIGenericVnfRequest.xml
new file mode 100644
index 0000000000..3e7c6503f4
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIGenericVnfRequest.xml
@@ -0,0 +1,5 @@
+<UpdateAAIGenericVnfRequest>
+ <vnf-id>skask</vnf-id>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>3.14</persona-model-version>
+</UpdateAAIGenericVnfRequest> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIVfModuleRequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIVfModuleRequest.xml
new file mode 100644
index 0000000000..8a690403c4
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateAAIVfModuleRequest.xml
@@ -0,0 +1,10 @@
+<UpdateAAIVfModuleRequest>
+ <vnf-id>skask</vnf-id>
+ <vf-module-id>supercool</vf-module-id>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>complete</orchestration-status>
+ <volume-group-id>78987</volume-group-id>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>3.14</persona-model-version>
+ <contrail-service-instance-fqdn>myhost.appl.com</contrail-service-instance-fqdn>
+</UpdateAAIVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateVfModuleRequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateVfModuleRequest.xml
new file mode 100644
index 0000000000..966ca50b16
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/UpdateVfModuleRequest.xml
@@ -0,0 +1,35 @@
+<vnf-request xmlns="http://org.openecomp/mso/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 --> <!-- with vf-module-id, identifies the vf-module to update -->
+ <vf-module-id>supercool</vf-module-id> <!-- Required --> <!-- with vnf-id, identifies the vf-module to update -->
+ <vnf-type>pcrf-capacity</vnf-type> <!-- Required --> <!-- not in vf-module; used for recipe selection/filtering;
+ thus, not used by UpdateVfModule flow -->
+ <vf-module-model-name>PCRF::module-0</vf-module-model-name> <!-- Required --> <!-- not in vf-module; used for recipe selection/filtering;
+ thus, not used by UpdateVfModule flow -->
+ <asdc-service-model-version></asdc-service-model-version> <!-- Optional --> <!-- not in vf-module; used for recipe selection;
+ thus, not used by UpdateVfModule flow -->
+ <service-id>serviceIdUUID</service-id> <!-- Required --> <!-- not in vf-module; used for query filtering;
+ thus, not used by UpdateVfModule flow -->
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region> <!-- Required --> <!-- in vf-module as part of volume-group relationship;
+ however, used for query filtering only; not updatable in AAI -->
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id> <!-- Required --> <!-- not in vf-module; used to confirm volume group tenant -->
+ <volume-group-id>78987</volume-group-id> <!-- Optional --> <!-- in vf-module as part of volume-group relationship; used
+ to update VNF adapter; not updatable in AAI -->
+ <persona-model-id>introvert</persona-model-id> <!-- Optional --> <!-- Not in AID, in vf-module -->
+ <persona-model-version>3.14</persona-model-version> <!-- Optional --> <!-- Not in AID, in vf-module -->
+ <contrail-service-instance-fqdn>myhost.appl.edu</contrail-service-instance-fqdn> <!-- Optional --> <!-- Not in AID, in vf-module -->
+ <vnf-persona-model-id>introvert</vnf-persona-model-id> <!-- Optional --> <!-- Not in AID, in generic-vnf (as persona-model-id) -->
+ <vnf-persona-model-version>3.14</vnf-persona-model-version> <!-- Optional --> <!-- Not in AID, in generic-vnf (as persona-model-version) -->
+ </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/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml
new file mode 100644
index 0000000000..49ecd0bf3f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml
new file mode 100644
index 0000000000..c602dd9667
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml
new file mode 100644
index 0000000000..830d2e2237
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/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/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml
new file mode 100644
index 0000000000..cfbf903ce9
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml
@@ -0,0 +1,10 @@
+<vf-module xmlns="http://com.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>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-new.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-new.xml
new file mode 100644
index 0000000000..27c8ecf60a
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-new.xml
@@ -0,0 +1,9 @@
+<vf-module xmlns="http://com.aai.inventory/v7">
+ <vf-module-id>b37d96db-7d2c-47ce-bf61-a6c7b82fe161</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <persona-model-id>00000000-0000-0000-0000-000000000000</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <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/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-supercool.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-supercool.xml
new file mode 100644
index 0000000000..3370e33ce2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VfModule-supercool.xml
@@ -0,0 +1,27 @@
+<vf-module xmlns="http://com.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>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <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/MSOCommonBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml
new file mode 100644
index 0000000000..b44c977eaf
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml
@@ -0,0 +1,25 @@
+ <volume-group xmlns="http://com.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/MSOCommonBPMN/src/test/resources/__files/aai-volume-group-id-info.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/aai-volume-group-id-info.xml
new file mode 100644
index 0000000000..396f553b60
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/aai-volume-group-id-info.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:volume-group xmlns:tns="http://com.aai.inventory/v6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://com.aai.inventory/v6 aai_schema_v6.xsd ">
+ <tns:volume-group-id>VOLUME_GROUP_ID_1</tns:volume-group-id>
+ <tns:volume-group-name>VOLUME_GROUP_ID_1_NAME</tns:volume-group-name>
+ <tns:heat-stack-id>heat-stack-id</tns:heat-stack-id>
+ <tns:vnf-type>vnf-type</tns:vnf-type>
+ <tns:orchestration-status>OK</tns:orchestration-status>
+ <tns:resource-version>1</tns:resource-version>
+ <tns:relationship-list>
+ <tns:relationship>
+ <tns:related-to>tenant</tns:related-to>
+ <tns:relationship-data>
+ <tns:relationship-key>cloud-region.cloud-owner</tns:relationship-key>
+ <tns:relationship-value>att-aic</tns:relationship-value>
+ </tns:relationship-data>
+ <tns:relationship-data>
+ <tns:relationship-key>cloud-region.cloud-region-id</tns:relationship-key>
+ <tns:relationship-value>pdk1</tns:relationship-value>
+ </tns:relationship-data>
+ <tns:relationship-data>
+ <tns:relationship-key>tenant.tenant-id</tns:relationship-key>
+ <tns:relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</tns:relationship-value>
+ </tns:relationship-data>
+ </tns:relationship>
+ </tns:relationship-list>
+ </tns:volume-group>
+
+
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/aaiFault.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/aaiFault.xml
new file mode 100644
index 0000000000..66ed8f5758
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/aaiFault.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Fault>
+<requestError>
+<serviceException>
+<messageId>SVC3002</messageId>
+<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
+<variables>
+<variable>PUTcustomer</variable>
+<variable>SubName01</variable>
+<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
+<variable>ERR.5.4.5105</variable>
+</variables>
+</serviceException>
+</requestError>
+</Fault> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfCreateSimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfCreateSimResponse.xml
new file mode 100644
index 0000000000..7b5d22a1de
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfCreateSimResponse.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp.mso/vnfNotify">
+ <soapenv:Header />
+ <soapenv:Body>
+ <ns2:createVnfNotification xmlns:ns2="http://org.openecomp.mso/vnfNotify">
+ <messageId>edab9ec7-6cf8-47cf-b58c-9ba4ef5d3f70</messageId>
+ <completed>true</completed>
+ <vnfId>slcp34248vbc/020a112b-a0c8-4143-87a3-698680ba2efe</vnfId>
+ <outputs>
+ <entry>
+ <key>server_ip</key>
+ <value>135.21.249.178</value>
+ </entry>
+ </outputs>
+ <rollback>
+ <cloudSiteId>MTSNJA4LCP1</cloudSiteId>
+ <msoRequest>
+ <requestId>1512_1120-BB11-1</requestId>
+ <serviceInstanceId>BB11/VLXM/003717//SW_INTERNET</serviceInstanceId>
+ </msoRequest>
+ <tenantCreated>false</tenantCreated>
+ <tenantId>e25ac2f1e73d46428de81a6130a6fdad</tenantId>
+ <vnfCreated>true</vnfCreated>
+ <vnfId>slcp34248vbc/020a112b-a0c8-4143-87a3-698680ba2efe</vnfId>
+ </rollback>
+</ns2:createVnfNotification>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfDeleteSimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfDeleteSimResponse.xml
new file mode 100644
index 0000000000..a4b0becee4
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfDeleteSimResponse.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp.mso/vnfNotify">
+ <soapenv:Header />
+ <soapenv:Body>
+ <ns2:deleteVnfNotification xmlns:ns2="http://org.openecomp.mso/vnfNotify" >
+ <messageId>f5e42814-72c0-4422-b840-e14e757a709b</messageId>
+ <completed>true</completed>
+ </ns2:deleteVnfNotification>
+ </soapenv:Body>
+</soapenv:Envelope> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfQuerySimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfQuerySimResponse.xml
new file mode 100644
index 0000000000..3b99363ea8
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfQuerySimResponse.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp.mso/vnfNotify">
+ <soapenv:Header />
+ <soapenv:Body>
+ <ns2:queryVnfNotification xmlns:ns2="http://org.openecomp.mso/vnfNotify">
+ <messageId>b1a82ce6-7f5c-45fd-9273-acaf88fc2222</messageId>
+ <completed>true</completed>
+ <vnfExists>true</vnfExists>
+ <vnfId>slcp34248vbc/020a112b-a0c8-4143-87a3-698680ba2efe</vnfId>
+ <status>ACTIVE</status>
+ <outputs>
+ <entry>
+ <key>server_ip</key>
+ <value>135.21.249.144</value>
+ </entry>
+ </outputs>
+</ns2:queryVnfNotification>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfRollbackSimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfRollbackSimResponse.xml
new file mode 100644
index 0000000000..4fd0b62610
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/vnfAdapterMocks/vnfRollbackSimResponse.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp.mso/vnfNotify">
+ <soapenv:Header />
+ <soapenv:Body>
+ <ns2:rollbackVnfNotification xmlns:ns2="http://org.openecomp.mso/vnfNotify" >
+ <messageId>b1a82ce6-7f5c-45fd-9273-acaf88fc2137</messageId>
+ <completed>true</completed>
+ </ns2:rollbackVnfNotification>
+ </soapenv:Body>
+</soapenv:Envelope> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/camunda.cfg.xml b/bpmn/MSOCommonBPMN/src/test/resources/camunda.cfg.xml
new file mode 100644
index 0000000000..c94e32e686
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/camunda.cfg.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
+
+ <property name="jdbcUrl" value="jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000" />
+ <property name="jdbcDriver" value="org.h2.Driver" />
+ <property name="jdbcUsername" value="sa" />
+ <property name="jdbcPassword" value="" />
+
+ <!-- Database configurations -->
+ <property name="databaseSchemaUpdate" value="true" />
+
+ <!-- job executor configurations -->
+ <property name="jobExecutorActivate" value="true" />
+
+ <property name="history" value="full" />
+
+ <property name="customPostBPMNParseListeners">
+ <list>
+ <bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
+ </list>
+ </property>
+
+ <property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
+
+ <!--<property name="idGenerator" ref="uuidGenerator" />-->
+
+ <!-- engine plugins -->
+ <property name="processEnginePlugins">
+ <list>
+ <ref bean="connectProcessEnginePlugin" />
+ <ref bean="spinProcessEnginePlugin" />
+ <ref bean="loggingPlugin" />
+ <ref bean="workflowExceptionPlugin" />
+ <ref bean="workbenchPlugin" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="workbenchPlugin" class="org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap">
+ <property name="httpPort" value="28088"/>
+ </bean>
+
+ <bean id="loggingPlugin" class="org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin" />
+
+ <!-- Needed until all subflows generate MSOWorkflowException events -->
+ <bean id="workflowExceptionPlugin" class="org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin" />
+
+ <bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
+
+ <!--<bean id="uuidGenerator" class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />-->
+
+ <!-- engine plugin beans -->
+ <bean id="connectProcessEnginePlugin" class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
+ <bean id="spinProcessEnginePlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
+
+</beans>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/logging.properties b/bpmn/MSOCommonBPMN/src/test/resources/logging.properties
new file mode 100644
index 0000000000..4941c55971
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/logging.properties
@@ -0,0 +1,2 @@
+#register SLF4JBridgeHandler as handler for the j.u.l. root logger
+handlers = org.slf4j.bridge.SLF4JBridgeHandler
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.properties b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.properties
new file mode 100644
index 0000000000..f800d00245
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.properties
@@ -0,0 +1,3 @@
+# Default BPMN properties for unit tests
+
+URNMapping.FileSystemLoading.Enabled=true \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
new file mode 100644
index 0000000000..133f58593c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
@@ -0,0 +1,86 @@
+# Default URN Mappings for unit tests
+
+mso.rollback=true
+
+canopi.auth=757A94191D685FD2092AC1490730A4FC
+csi.aots.addincidentmanagement.endpoint=http://localhost:28090/AddIncidentManagementTicketRequest
+csi.networkstatus.endpoint=http://localhost:28090/SendManagedNetworkStatusNotification
+mso.csi.pwd=4EA237303511EFBBC37F17A351562131
+mso.csi.usrname=mso
+mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7
+
+mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess
+
+mso.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter
+mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC
+
+mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter
+mso.adapters.network.rest.endpoint=http://localhost:28090/networks/NetworkAdapter
+
+mso.adapters.po.auth=757A94191D685FD2092AC1490730A4FC
+mso.adapters.po.password=3141634BF7E070AA289CF2892C986C0B
+mso.po.timeout=PT60S
+
+aai.auth=757A94191D685FD2092AC1490730A4FC
+
+mso.adapters.sdnc.endpoint=http://localhost:28090/SDNCAdapter
+mso.adapters.sdnc.rest.endpoint=http://localhost:28090/SDNCAdapter/v1/sdnc
+mso.adapters.sdnc.timeout=PT60S
+mso.sdnc.firewall.yang.model=http://com/openecomp/svc/mis/firewall-lite-gui
+mso.sdnc.firewall.yang.model.version=2015-05-15
+mso.sdnc.password=3141634BF7E070AA289CF2892C986C0B
+mso.sdnc.timeout.firewall.minutes=20
+mso.callbackRetryAttempts=5
+mso.sdnc.timeout=PT10S
+mso.sdnc.timeout.ucpe.async.hours=120
+mso.sdnc.timeout.ucpe.async.minutes=5
+mso.workflow.message.endpoint=http://localhost:28080/mso/WorkflowMesssage
+mso.workflow.sdncadapter.callback=http://localhost:28080/mso/SDNCAdapterCallbackService
+
+mso.catalog.db.endpoint=http://localhost:28090/
+
+mso.adapters.tenant.endpoint=http://localhost:28090/tenantAdapterMock
+mso.adapters.vnf-async.endpoint=http://localhost:28090/vnfs/VnfAdapterAsync
+mso.adapters.vnf.endpoint=http://localhost:28090/vnfs/VnfAdapter
+mso.adapters.vnf.rest.endpoint=http://localhost:28090/vnfs/v1/vnfs
+mso.workflow.vnfadapter.create.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.delete.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.query.callback=http://localhost:28080/mso/services/VNFAdapterQuerCallbackV1
+mso.workflow.vnfadapter.rollback.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.createvce.delay.seconds=1
+mso.infra.customer.id=testCustIdInfra
+
+aai.endpoint=http://localhost:28090
+
+# AAI version mappings
+
+# Example to override default version for a resource:
+#mso.workflow.default.aai.vce.version=6
+#mso.workflow.default.aai.v6.vce.uri=/aai/v6/network/vces/vce
+
+mso.workflow.global.default.aai.version=8
+mso.workflow.default.aai.cloud-region.version=9
+mso.workflow.default.aai.generic-vnf.version=9
+
+mso.workflow.default.aai.v9.cloud-region.uri=/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+mso.workflow.default.aai.v8.customer.uri=/aai/v8/business/customers/customer
+mso.workflow.default.aai.v8.generic-query.uri=/aai/v8/search/generic-query
+mso.workflow.default.aai.v9.generic-vnf.uri=/aai/v9/network/generic-vnfs/generic-vnf
+mso.workflow.default.aai.v8.l3-network.uri=/aai/v8/network/l3-networks/l3-network
+mso.workflow.default.aai.v8.network-policy.uri=/aai/v8/network/network-policies/network-policy
+mso.workflow.default.aai.v8.nodes-query.uri=/aai/v8/search/nodes-query
+mso.workflow.default.aai.v8.route-table-reference.uri=/aai/v8/network/route-table-references/route-table-reference
+mso.workflow.default.aai.v8.tenant.uri=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+mso.workflow.default.aai.v8.vce.uri=/aai/v8/network/vces/vce
+mso.workflow.default.aai.v8.vpn-binding.uri=/aai/v8/network/vpn-bindings/vpn-binding
+mso.workflow.notification.name=GenericNotificationService
+
+log.debug.CompleteMsoProcess=true
+log.debug.CreateNetworkInstanceInfra=true
+log.debug.CreateServiceInstanceInfra=true
+log.debug.DeleteNetworkInstanceInfra=true
+log.debug.FalloutHandler=true
+log.debug.GenericGetService=true
+log.debug.sdncAdapter=true
+log.debug.UpdateNetworkInstanceInfra=true
+log.debug.VnfAdapterRestV1=true \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/sdncCallbackErrorResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/sdncCallbackErrorResponse.xml
new file mode 100644
index 0000000000..136917c5ff
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncCallbackErrorResponse.xml
@@ -0,0 +1 @@
+<SDNCAdapterCallbackRequest xmlns="http://org.openecomp/workflow/sdnc/adapter/schema/v1"><CallbackHeader><RequestId>1a152f97-566e-4f22-b17b-761f807bfedc</RequestId><ResponseCode>404</ResponseCode><ResponseMessage>Error processing request to SDNC. Not Found. https://sdncodl.it.us.aic.cip.com:8443/restconf/config/L3SDN-API:services/layer3-service-list/AS%2FVLXM%2F000199%2F%2FSB_INTERNET. SDNC Returned-[error-type:application, error-tag:data-missing, error-message:Request could not be completed because the relevant data model content does not exist.]</ResponseMessage></CallbackHeader></SDNCAdapterCallbackRequest> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/sdncDeleteResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/sdncDeleteResponse.xml
new file mode 100644
index 0000000000..c8a2e30282
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncDeleteResponse.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sdncadapterworkflow:SDNCAdapterWorkflowResponse
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData
+ xmlns:tag0="http://org.openecomp/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/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest.xml
new file mode 100644
index 0000000000..754dc20ee6
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest.xml
@@ -0,0 +1,342 @@
+<SDNCAdapterCallbackRequest xmlns="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>2f7d1b38-2b78-4ef2-8ad6-1552d88620fa</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;layer3-service-list xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;service-status&gt;
+ &lt;rpc-name&gt;service-configuration-operation&lt;/rpc-name&gt;
+ &lt;rpc-action&gt;activate&lt;/rpc-action&gt;
+ &lt;request-status&gt;synccomplete&lt;/request-status&gt;
+ &lt;final-indicator&gt;N&lt;/final-indicator&gt;
+ &lt;l3sdn-action&gt;Layer3ServiceActivateRequest&lt;/l3sdn-action&gt;
+ &lt;l3sdn-subaction&gt;SUPP&lt;/l3sdn-subaction&gt;
+ &lt;response-timestamp&gt;2015-04-28T21:32:11.386Z&lt;/response-timestamp&gt;
+ &lt;/service-status&gt;
+ &lt;service-data&gt;
+ &lt;internet-evc-access-information&gt;
+ &lt;ip-version&gt;ds&lt;/ip-version&gt;
+ &lt;internet-evc-speed-value&gt;8&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Mbps&lt;/internet-evc-speed-units&gt;
+ &lt;/internet-evc-access-information&gt;
+ &lt;vr-lan xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;vr-lan-interface&gt;
+ &lt;static-routes&gt;
+ &lt;v6-static-routes&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-static-route-prefix&gt;2001:1890:12e3:2da::&lt;/v6-static-route-prefix&gt;
+ &lt;v6-static-route-prefix-length&gt;28&lt;/v6-static-route-prefix-length&gt;
+ &lt;/v6-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.1&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;v6-static-routes&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-static-route-prefix&gt;2001:1890:12e3:2da::&lt;/v6-static-route-prefix&gt;
+ &lt;v6-static-route-prefix-length&gt;28&lt;/v6-static-route-prefix-length&gt;
+ &lt;/v6-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.2&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;v4-static-routes&gt;
+ &lt;v4-static-route-prefix&gt;255.255.252.3&lt;/v4-static-route-prefix&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-static-route-prefix-length&gt;28&lt;/v4-static-route-prefix-length&gt;
+ &lt;/v4-static-routes&gt;
+ &lt;/static-routes&gt;
+ &lt;dhcp&gt;
+ &lt;v6-dhcp-server-enabled&gt;N&lt;/v6-dhcp-server-enabled&gt;
+ &lt;v4-dhcp-server-enabled&gt;Y&lt;/v4-dhcp-server-enabled&gt;
+ &lt;use-v6-default-pool&gt;N&lt;/use-v6-default-pool&gt;
+ &lt;excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-address&gt;192.168.1.7&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v4-address&gt;192.168.1.8&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-dhcp-addresses-from-default-pool&gt;
+ &lt;v4-dhcp-pools&gt;
+ &lt;v4-dhcp-relay-next-hop-address&gt;1.1.1.1&lt;/v4-dhcp-relay-next-hop-address&gt;
+ &lt;v4-dhcp-pool-prefix-length&gt;28&lt;/v4-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.5&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-relay-gateway-address&gt;2.2.2.1&lt;/v4-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.6&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-pool-prefix&gt;192.155.2.3&lt;/v4-dhcp-pool-prefix&gt;
+ &lt;/v4-dhcp-pools&gt;
+ &lt;v4-dhcp-pools&gt;
+ &lt;v4-dhcp-relay-next-hop-address&gt;1.1.1.2&lt;/v4-dhcp-relay-next-hop-address&gt;
+ &lt;v4-dhcp-pool-prefix-length&gt;28&lt;/v4-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.6&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-relay-gateway-address&gt;2.2.2.2&lt;/v4-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v4-addresses&gt;
+ &lt;excluded-v4-address&gt;192.168.1.7&lt;/excluded-v4-address&gt;
+ &lt;/excluded-v4-addresses&gt;
+ &lt;v4-dhcp-pool-prefix&gt;192.155.2.4&lt;/v4-dhcp-pool-prefix&gt;
+ &lt;/v4-dhcp-pools&gt;
+ &lt;use-v4-default-pool&gt;Y&lt;/use-v4-default-pool&gt;
+ &lt;excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-address&gt;1:5&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;excluded-v6-address&gt;1:6&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-dhcp-addresses-from-default-pool&gt;
+ &lt;v6-dhcp-pools&gt;
+ &lt;v6-dhcp-relay-next-hop-address&gt;4:4&lt;/v6-dhcp-relay-next-hop-address&gt;
+ &lt;v6-dhcp-pool-prefix-length&gt;28&lt;/v6-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;1:1&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-relay-gateway-address&gt;3:3&lt;/v6-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;2:2&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-pool-prefix&gt;0:0&lt;/v6-dhcp-pool-prefix&gt;
+ &lt;/v6-dhcp-pools&gt;
+ &lt;v6-dhcp-pools&gt;
+ &lt;v6-dhcp-relay-next-hop-address&gt;4:4&lt;/v6-dhcp-relay-next-hop-address&gt;
+ &lt;v6-dhcp-pool-prefix-length&gt;28&lt;/v6-dhcp-pool-prefix-length&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;1:1&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-relay-gateway-address&gt;3:3&lt;/v6-dhcp-relay-gateway-address&gt;
+ &lt;excluded-v6-addresses&gt;
+ &lt;excluded-v6-address&gt;2:2&lt;/excluded-v6-address&gt;
+ &lt;/excluded-v6-addresses&gt;
+ &lt;v6-dhcp-pool-prefix&gt;0:0&lt;/v6-dhcp-pool-prefix&gt;
+ &lt;/v6-dhcp-pools&gt;
+ &lt;/dhcp&gt;
+ &lt;firewall-lite&gt;
+ &lt;stateful-firewall-lite-v6-enabled&gt;N&lt;/stateful-firewall-lite-v6-enabled&gt;
+ &lt;stateful-firewall-lite-v4-enabled&gt;Y&lt;/stateful-firewall-lite-v4-enabled&gt;
+ &lt;v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-prefix&gt;0.0.0.1&lt;/v4-firewall-prefix&gt;
+ &lt;v4-firewall-prefix-length&gt;1&lt;/v4-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;1&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;1&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-packet-filters&gt;
+ &lt;v4-firewall-prefix&gt;0.0.0.2&lt;/v4-firewall-prefix&gt;
+ &lt;v4-firewall-prefix-length&gt;2&lt;/v4-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;2&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;2&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v4-firewall-packet-filters&gt;
+ &lt;v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-prefix&gt;:&lt;/v6-firewall-prefix&gt;
+ &lt;v6-firewall-prefix-length&gt;0&lt;/v6-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;3&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;3&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-packet-filters&gt;
+ &lt;v6-firewall-prefix&gt;:&lt;/v6-firewall-prefix&gt;
+ &lt;v6-firewall-prefix-length&gt;1&lt;/v6-firewall-prefix-length&gt;
+ &lt;allow-icmp-ping&gt;Y&lt;/allow-icmp-ping&gt;
+ &lt;udp-ports&gt;
+ &lt;port-number&gt;4&lt;/port-number&gt;
+ &lt;/udp-ports&gt;
+ &lt;tcp-ports&gt;
+ &lt;port-number&gt;4&lt;/port-number&gt;
+ &lt;/tcp-ports&gt;
+ &lt;/v6-firewall-packet-filters&gt;
+ &lt;/firewall-lite&gt;
+ &lt;pat&gt;
+ &lt;v4-pat-pools&gt;
+ &lt;v4-pat-pool-prefix&gt;192.168.1.44&lt;/v4-pat-pool-prefix&gt;
+ &lt;v4-pat-pool-next-hop-address&gt;192.168.1.5&lt;/v4-pat-pool-next-hop-address&gt;
+ &lt;v4-pat-pool-prefix-length&gt;0&lt;/v4-pat-pool-prefix-length&gt;
+ &lt;/v4-pat-pools&gt;
+ &lt;use-v4-default-pool&gt;Y&lt;/use-v4-default-pool&gt;
+ &lt;v4-pat-enabled&gt;N&lt;/v4-pat-enabled&gt;
+ &lt;v4-pat-pools&gt;
+ &lt;v4-pat-pool-prefix&gt;192.168.1.45&lt;/v4-pat-pool-prefix&gt;
+ &lt;v4-pat-pool-next-hop-address&gt;192.168.1.6&lt;/v4-pat-pool-next-hop-address&gt;
+ &lt;v4-pat-pool-prefix-length&gt;28&lt;/v4-pat-pool-prefix-length&gt;
+ &lt;/v4-pat-pools&gt;
+ &lt;/pat&gt;
+ &lt;nat&gt;
+ &lt;v4-nat-enabled&gt;Y&lt;/v4-nat-enabled&gt;
+ &lt;v4-nat-mapping-entries&gt;
+ &lt;v4-nat-internal&gt;0.0.0.0&lt;/v4-nat-internal&gt;
+ &lt;v4-nat-next-hop-address&gt;0.0.0.0&lt;/v4-nat-next-hop-address&gt;
+ &lt;v4-nat-external&gt;0.0.0.0&lt;/v4-nat-external&gt;
+ &lt;/v4-nat-mapping-entries&gt;
+ &lt;v4-nat-mapping-entries&gt;
+ &lt;v4-nat-internal&gt;0.0.0.1&lt;/v4-nat-internal&gt;
+ &lt;v4-nat-next-hop-address&gt;0.0.0.1&lt;/v4-nat-next-hop-address&gt;
+ &lt;v4-nat-external&gt;0.0.0.1&lt;/v4-nat-external&gt;
+ &lt;/v4-nat-mapping-entries&gt;
+ &lt;/nat&gt;
+ &lt;vr-designation&gt;primary&lt;/vr-designation&gt;
+ &lt;v4-vce-loopback-address&gt;162.200.3.144&lt;/v4-vce-loopback-address&gt;
+ &lt;v6-vr-lan-prefix-length&gt;64&lt;/v6-vr-lan-prefix-length&gt;
+ &lt;v6-vce-wan-address&gt;2001:1890:12e3:2da::&lt;/v6-vce-wan-address&gt;
+ &lt;v6-vr-lan-prefix&gt;2620:0:10d0:f:ffff:ffff:ffff:fffe&lt;/v6-vr-lan-prefix&gt;
+ &lt;v4-vr-lan-prefix-length&gt;24&lt;/v4-vr-lan-prefix-length&gt;
+ &lt;v4-vr-lan-prefix&gt;10.192.27.254&lt;/v4-vr-lan-prefix&gt;
+ &lt;v4-public-lan-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.2&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.1&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.72&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.71&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.68&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.67&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;/v4-public-lan-prefixes&gt;
+ &lt;v6-public-lan-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:3da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:4da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;/v6-public-lan-prefixes&gt;
+ &lt;/vr-lan-interface&gt;
+ &lt;routing-protocol&gt;none&lt;/routing-protocol&gt;
+ &lt;/vr-lan&gt;
+&lt;ucpe-vms-service-information&gt;
+ &lt;transport-service-information&gt;
+ &lt;transport-service-type&gt;AVPN&lt;/transport-service-type&gt;
+ &lt;access-circuit-info&gt;
+ &lt;access-circuit-id&gt;1&lt;/access-circuit-id&gt;
+ &lt;dual-mode&gt;Active&lt;/dual-mode&gt;
+ &lt;/access-circuit-info&gt;
+ &lt;access-circuit-info&gt;
+ &lt;access-circuit-id&gt;2&lt;/access-circuit-id&gt;
+ &lt;dual-mode&gt;Standby&lt;/dual-mode&gt;
+ &lt;/access-circuit-info&gt;
+ &lt;/transport-service-information&gt;
+ &lt;ucpe-information&gt;
+ &lt;ucpe-host-name&gt;hostname&lt;/ucpe-host-name&gt;
+ &lt;ucpe-activation-code&gt;activecode&lt;/ucpe-activation-code&gt;
+ &lt;out-of-band-management-modem&gt;OOB&lt;/out-of-band-management-modem&gt;
+ &lt;/ucpe-information&gt;
+ &lt;vnf-list&gt;
+ &lt;vnf-information&gt;
+ &lt;vnf-instance-id&gt;1&lt;/vnf-instance-id&gt;
+ &lt;vnf-sequence-number&gt;1&lt;/vnf-sequence-number&gt;
+ &lt;vnf-type&gt;ZZ&lt;/vnf-type&gt;
+ &lt;vnf-vendor&gt;JUNIPER&lt;/vnf-vendor&gt;
+ &lt;vnf-model&gt;MODEL1&lt;/vnf-model&gt;
+ &lt;vnf-id&gt;1&lt;/vnf-id&gt;
+ &lt;prov-status&gt;1&lt;/prov-status&gt;
+ &lt;operational-state&gt;1&lt;/operational-state&gt;
+ &lt;orchestration-status&gt;1&lt;/orchestration-status&gt;
+ &lt;equipment-role&gt;1&lt;/equipment-role&gt;
+ &lt;/vnf-information&gt;
+ &lt;vnf-information&gt;
+ &lt;vnf-instance-id&gt;2&lt;/vnf-instance-id&gt;
+ &lt;vnf-sequence-number&gt;2&lt;/vnf-sequence-number&gt;
+ &lt;vnf-type&gt;HY&lt;/vnf-type&gt;
+ &lt;vnf-vendor&gt;JUNIPER&lt;/vnf-vendor&gt;
+ &lt;vnf-model&gt;MODEL2&lt;/vnf-model&gt;
+ &lt;vnf-id&gt;2&lt;/vnf-id&gt;
+ &lt;prov-status&gt;2&lt;/prov-status&gt;
+ &lt;operational-state&gt;2&lt;/operational-state&gt;
+ &lt;orchestration-status&gt;2&lt;/orchestration-status&gt;
+ &lt;equipment-role&gt;2&lt;/equipment-role&gt;
+ &lt;/vnf-information&gt;
+ &lt;/vnf-list&gt;
+ &lt;/ucpe-vms-service-information&gt;
+ &lt;request-information&gt;
+ &lt;request-action&gt;Layer3ServiceActivateRequest&lt;/request-action&gt;
+ &lt;order-number&gt;4281555&lt;/order-number&gt;
+ &lt;request-id&gt;155415ab-b4a7-4382-b4c6-d17d9sm42855&lt;/request-id&gt;
+ &lt;notification-url&gt;https://csi-tst-q22.it.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws&lt;/notification-url&gt;
+ &lt;source&gt;OMX&lt;/source&gt;
+ &lt;order-version&gt;1&lt;/order-version&gt;
+ &lt;/request-information&gt;
+ &lt;sdnc-request-header&gt;
+ &lt;svc-action&gt;activate&lt;/svc-action&gt;
+ &lt;svc-notification-url&gt;https://msojra.mtsnjdcp1.aic.cip.com:8443/adapters/rest/SDNCNotify&lt;/svc-notification-url&gt;
+ &lt;svc-request-id&gt;5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760&lt;/svc-request-id&gt;
+ &lt;/sdnc-request-header&gt;
+ &lt;l2-homing-information&gt;
+ &lt;topology&gt;MultiPoint&lt;/topology&gt;
+ &lt;preferred-aic-clli&gt;MTSNJA4LCP1&lt;/preferred-aic-clli&gt;
+ &lt;evc-name&gt;AS/VLXM/003717//SW&lt;/evc-name&gt;
+ &lt;/l2-homing-information&gt;
+ &lt;service-information&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;subscriber-name&gt;FOUR SEASONS HEATING &amp; COOLING_8310006378683&lt;/subscriber-name&gt;
+ &lt;service-type&gt;SDN-ETHERNET-INTERNET&lt;/service-type&gt;
+ &lt;/service-information&gt;
+ &lt;internet-service-change-details&gt;
+ &lt;internet-evc-speed-value&gt;10&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Kbps&lt;/internet-evc-speed-units&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.15&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.15&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v4-lan-public-prefixes&gt;
+ &lt;request-index&gt;2&lt;/request-index&gt;
+ &lt;v4-next-hop-address&gt;192.168.1.16&lt;/v4-next-hop-address&gt;
+ &lt;v4-lan-public-prefix&gt;192.168.1.16&lt;/v4-lan-public-prefix&gt;
+ &lt;v4-lan-public-prefix-length&gt;28&lt;/v4-lan-public-prefix-length&gt;
+ &lt;/t-provided-v4-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;t-provided-v6-lan-public-prefixes&gt;
+ &lt;request-index&gt;1&lt;/request-index&gt;
+ &lt;v6-next-hop-address&gt;2001:1890:12e3:2da::&lt;/v6-next-hop-address&gt;
+ &lt;v6-lan-public-prefix&gt;2001:1890:12e3:2da::&lt;/v6-lan-public-prefix&gt;
+ &lt;v6-lan-public-prefix-length&gt;28&lt;/v6-lan-public-prefix-length&gt;
+ &lt;/t-provided-v6-lan-public-prefixes&gt;
+ &lt;/internet-service-change-details&gt;
+ &lt;/service-data&gt;
+ &lt;/layer3-service-list&gt;
+</RequestData>
+</SDNCAdapterCallbackRequest>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest_404CallBack.xml b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest_404CallBack.xml
new file mode 100644
index 0000000000..aa481ea600
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequest_404CallBack.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<SDNCAdapterCallbackRequest
+ xmlns="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>39542e39-ccc3-4d1a-8b79-04ce88526613</RequestId>
+ <ResponseCode>404</ResponseCode>
+ <ResponseMessage>Error processing request to SDNC. Not Found.
+ https://sdncodl.us.aic.cip.com:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
+ SDNC Returned-[error-type:application, error-tag:data-missing,
+ error-message:Request could not be completed because the relevant
+ data model content does not exist.]</ResponseMessage>
+ </CallbackHeader>
+</SDNCAdapterCallbackRequest> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata-nonfinal.text b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata-nonfinal.text
new file mode 100644
index 0000000000..fa90fa3510
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata-nonfinal.text
@@ -0,0 +1,42 @@
+ &lt;output xmlns="com:att:sdnctl:l3api"&gt;&lt;ack-final-indicator&gt;N&lt;/ack-final-indicator&gt;&lt;/output&gt;
+ &lt;layer3-service-list xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;service-status&gt;
+ &lt;rpc-name&gt;service-configuration-operation&lt;/rpc-name&gt;
+ &lt;rpc-action&gt;activate&lt;/rpc-action&gt;
+ &lt;request-status&gt;synccomplete&lt;/request-status&gt;
+ &lt;final-indicator&gt;N&lt;/final-indicator&gt;
+ &lt;l3sdn-action&gt;Layer3ServiceActivateRequest&lt;/l3sdn-action&gt;
+ &lt;l3sdn-subaction&gt;SUPP&lt;/l3sdn-subaction&gt;
+ &lt;response-timestamp&gt;2015-04-28T21:32:11.386Z&lt;/response-timestamp&gt;
+ &lt;/service-status&gt;
+ &lt;service-data&gt;
+ &lt;internet-evc-access-information&gt;
+ &lt;ip-version&gt;ds&lt;/ip-version&gt;
+ &lt;internet-evc-speed-value&gt;8&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Mbps&lt;/internet-evc-speed-units&gt;
+ &lt;/internet-evc-access-information&gt;
+ &lt;request-information&gt;
+ &lt;request-action&gt;Layer3ServiceActivateRequest&lt;/request-action&gt;
+ &lt;order-number&gt;4281555&lt;/order-number&gt;
+ &lt;request-id&gt;155415ab-b4a7-4382-b4c6-d17d9sm42855&lt;/request-id&gt;
+ &lt;source&gt;mysrc&lt;/source&gt;
+ &lt;order-version&gt;1&lt;/order-version&gt;
+ &lt;/request-information&gt;
+ &lt;sdnc-request-header&gt;
+ &lt;svc-action&gt;activate&lt;/svc-action&gt;
+ &lt;svc-notification-url&gt;http://localhost:28080/adapters/rest/SDNCNotify&lt;/svc-notification-url&gt;
+ &lt;svc-request-id&gt;5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760&lt;/svc-request-id&gt;
+ &lt;/sdnc-request-header&gt;
+ &lt;l2-homing-information&gt;
+ &lt;topology&gt;MultiPoint&lt;/topology&gt;
+ &lt;preferred-aic-clli&gt;clli&lt;/preferred-aic-clli&gt;
+ &lt;evc-name&gt;AS/VLXM/003717//SW&lt;/evc-name&gt;
+ &lt;/l2-homing-information&gt;
+ &lt;service-information&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;subscriber-name&gt;ST E2E Test42855_1300004281555&lt;/subscriber-name&gt;
+ &lt;service-type&gt;SDN-ETHERNET-INTERNET&lt;/service-type&gt;
+ &lt;/service-information&gt;
+ &lt;/service-data&gt;
+ &lt;/layer3-service-list&gt;
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata.text b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata.text
new file mode 100644
index 0000000000..816bef97eb
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncadaptercallbackrequestdata.text
@@ -0,0 +1,42 @@
+ &lt;output xmlns="com:att:sdnctl:l3api"&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;/output&gt;
+ &lt;layer3-service-list xmlns="com:att:sdnctl:l3api"&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;service-status&gt;
+ &lt;rpc-name&gt;service-configuration-operation&lt;/rpc-name&gt;
+ &lt;rpc-action&gt;activate&lt;/rpc-action&gt;
+ &lt;request-status&gt;synccomplete&lt;/request-status&gt;
+ &lt;final-indicator&gt;N&lt;/final-indicator&gt;
+ &lt;l3sdn-action&gt;Layer3ServiceActivateRequest&lt;/l3sdn-action&gt;
+ &lt;l3sdn-subaction&gt;SUPP&lt;/l3sdn-subaction&gt;
+ &lt;response-timestamp&gt;2015-04-28T21:32:11.386Z&lt;/response-timestamp&gt;
+ &lt;/service-status&gt;
+ &lt;service-data&gt;
+ &lt;internet-evc-access-information&gt;
+ &lt;ip-version&gt;ds&lt;/ip-version&gt;
+ &lt;internet-evc-speed-value&gt;8&lt;/internet-evc-speed-value&gt;
+ &lt;internet-evc-speed-units&gt;Mbps&lt;/internet-evc-speed-units&gt;
+ &lt;/internet-evc-access-information&gt;
+ &lt;request-information&gt;
+ &lt;request-action&gt;Layer3ServiceActivateRequest&lt;/request-action&gt;
+ &lt;order-number&gt;4281555&lt;/order-number&gt;
+ &lt;request-id&gt;155415ab-b4a7-4382-b4c6-d17d9sm42855&lt;/request-id&gt;
+ &lt;source&gt;OMX&lt;/source&gt;
+ &lt;order-version&gt;1&lt;/order-version&gt;
+ &lt;/request-information&gt;
+ &lt;sdnc-request-header&gt;
+ &lt;svc-action&gt;activate&lt;/svc-action&gt;
+ &lt;svc-notification-url&gt;https://localhost:28080/adapters/rest/SDNCNotify&lt;/svc-notification-url&gt;
+ &lt;svc-request-id&gt;5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760&lt;/svc-request-id&gt;
+ &lt;/sdnc-request-header&gt;
+ &lt;l2-homing-information&gt;
+ &lt;topology&gt;MultiPoint&lt;/topology&gt;
+ &lt;preferred-aic-clli&gt;clli&lt;/preferred-aic-clli&gt;
+ &lt;evc-name&gt;AS/VLXM/003717//SW&lt;/evc-name&gt;
+ &lt;/l2-homing-information&gt;
+ &lt;service-information&gt;
+ &lt;service-instance-id&gt;FK/VLXM/003717//SW_INTERNET&lt;/service-instance-id&gt;
+ &lt;subscriber-name&gt;test HEATING &amp; COOLING_8310006378683&lt;/subscriber-name&gt;
+ &lt;service-type&gt;SDN-ETHERNET-INTERNET&lt;/service-type&gt;
+ &lt;/service-information&gt;
+ &lt;/service-data&gt;
+ &lt;/layer3-service-list&gt;
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest-act.xml b/bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest-act.xml
new file mode 100644
index 0000000000..231898adfa
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest-act.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:v11="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <v1:SDNCAdapterWorkflowRequest>
+ <v11:RequestHeader>
+ <v11:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</v11:RequestId>
+ <v11:SvcAction>activate</v11:SvcAction>
+ <v11:SvcOperation>service-configuration-operation</v11:SvcOperation>
+ <v11:CallbackUrl>http://127.0.0.1:28080/camunda/services/SDNCAdapterCallback</v11:CallbackUrl>
+ </v11:RequestHeader>
+ <v1:SDNCRequestData>
+ <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd" contentType="text/xml">
+ <tag0:service-request xmlns:tag0="http://org.openecomp/mso/request/details/schema/v1">
+ <tag0:request-information>
+ <tag0:request-id>12570a36-7388-4c0a-bec4-189ce3kg9956</tag0:request-id>
+ <tag0:request-action>Layer3ServiceActivate</tag0:request-action>
+ <tag0:source>OMX</tag0:source>
+ </tag0:request-information>
+ <tag0:service-information>
+ <tag0:service-type>mysvctype</tag0:service-type>
+ <tag0:service-instance-id>PD/VLXM/003717//SW_INTERNET</tag0:service-instance-id>
+ </tag0:service-information>
+ </tag0:service-request>
+ </rest:payload>
+ </v1:SDNCRequestData>
+ <v1:SDNCTimeOutValueInMinutes>1</v1:SDNCTimeOutValueInMinutes>
+ <v1:InterimSDNCTimeOutValueInHours>2</v1:InterimSDNCTimeOutValueInHours>
+ </v1:SDNCAdapterWorkflowRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest.xml b/bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest.xml
new file mode 100644
index 0000000000..f71f529593
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/sdncadapterworkflowrequest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:v11="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <v1:SDNCAdapterWorkflowRequest>
+ <v11:RequestHeader>
+ <v11:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</v11:RequestId>
+ <v11:SvcAction>query</v11:SvcAction>
+ <v11:SvcOperation>services/layer3-service-list/AS%2FVLXM%2F000199%2F%2FSB_INTERNET</v11:SvcOperation>
+ <v11:CallbackUrl>http://127.0.0.1:28080/camunda/services/SDNCAdapterCallback</v11:CallbackUrl>
+ </v11:RequestHeader>
+ <v1:SDNCRequestData>
+ <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd" contentType="text/xml">
+ <tag0:service-request xmlns:tag0="http://org.openecomp/mso/request/details/schema/v1">
+ <tag0:request-information>
+ <tag0:request-id>12570a36-7388-4c0a-bec4-189ce3kg9956</tag0:request-id>
+ <tag0:request-action>GetLayer3ServiceDetailsRequest</tag0:request-action>
+ <tag0:source>OMX</tag0:source>
+ </tag0:request-information>
+ <tag0:service-information>
+ <tag0:service-type>SDN-ETHERNET-INTERNET</tag0:service-type>
+ <tag0:service-instance-id>PD/VLXM/003717//SW_INTERNET</tag0:service-instance-id>
+ </tag0:service-information>
+ </tag0:service-request>
+ </rest:payload>
+ </v1:SDNCRequestData>
+ <v1:SDNCTimeOutValueInMinutes>1</v1:SDNCTimeOutValueInMinutes>
+ </v1:SDNCAdapterWorkflowRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/testAsyncResource.bpmn b/bpmn/MSOCommonBPMN/src/test/resources/testAsyncResource.bpmn
new file mode 100644
index 0000000000..e5498e4d2b
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/testAsyncResource.bpmn
@@ -0,0 +1,81 @@
+<?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="_l2hJ8CccEeW3d--PaFJMbg" 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="testAsyncProcess" name="testAsyncProcess" isExecutable="true">
+ <bpmn2:startEvent id="ReceiveQueryAAIMessage" name="Receive Message">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:messageEventDefinition id="_MessageEventDefinition_3" messageRef="Message_2" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ReceiveQueryAAIMessage" targetRef="ScriptTask_5" />
+ <bpmn2:scriptTask id="ScriptTask_5" name="Send Response and continue execution" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[//import java.net.InetAddress;
+import org.openecomp.mso.bpmn.common.workflow.service.*
+
+//def hostname = InetAddress.getLocalHost().getCanonicalHostName()
+//println ("my host name =================" + hostname)
+
+WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse()
+callbackResponse.setStatusCode(200)
+callbackResponse.setMessage("Success")
+callbackResponse.setResponse("Received the request, the process is getting executed, request message" + execution.getVariable("testAsyncRequestMsg"))
+
+WorkflowContextHolder.getInstance().processCallback("testAsyncProcess", execution.getProcessInstanceId(), execution.getVariable("mso-request-id"), callbackResponse)
+
+//def callbackUrl = "http://" + hostname + ":28080/mso/async/services/callback/asyncQueryAAICustomer/"+ execution.getProcessInstanceId() + "/" + execution.getVariable("mso-request-id")
+//println "callback url" + callbackUrl
+//execution.setVariable("callbackUrl", callbackUrl)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_6" name="Wait Script Task" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[//Just sleep for a second
+Thread.sleep(1000)
+execution.setVariable("completed",true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_5" targetRef="ScriptTask_6" />
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_6" targetRef="EndEvent_4" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_2" name="testAsyncRequestMsg" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="testAsyncProcess">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_33" bpmnElement="ReceiveQueryAAIMessage">
+ <dc:Bounds x="182" y="145" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="133" y="186" width="134" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_88" bpmnElement="EndEvent_4">
+ <dc:Bounds x="708" y="145" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="726" y="186" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_76" bpmnElement="ScriptTask_5">
+ <dc:Bounds x="372" y="123" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_33" targetElement="_BPMNShape_ScriptTask_76">
+ <di:waypoint xsi:type="dc:Point" x="218" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="372" y="163" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="268" y="163" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_123" bpmnElement="ScriptTask_6">
+ <dc:Bounds x="522" y="123" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_76" targetElement="_BPMNShape_ScriptTask_123">
+ <di:waypoint xsi:type="dc:Point" x="472" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="522" y="163" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_123" targetElement="_BPMNShape_EndEvent_88">
+ <di:waypoint xsi:type="dc:Point" x="622" y="163" />
+ <di:waypoint xsi:type="dc:Point" x="708" y="163" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/vnfAdapter/vnfUpdateSimResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/vnfAdapter/vnfUpdateSimResponse.xml
new file mode 100644
index 0000000000..4e7c4ee687
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/vnfAdapter/vnfUpdateSimResponse.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.openecomp.mso/vnfNotify">
+ <soapenv:Header />
+ <soapenv:Body>
+<ns2:updateVnfNotification xmlns:ns2="http://org.openecomp.mso/vnfNotify">
+ <messageId>testRequestId</messageId>
+ <completed>true</completed>
+ <rollback>
+ <cloudSiteId>MTSNJA4LCP1</cloudSiteId>
+ <msoRequest>
+ <requestId>1512_1120-BB11-1</requestId>
+ <serviceInstanceId>BB11/VLXM/003717//SW_INTERNET</serviceInstanceId>
+ </msoRequest>
+ <tenantCreated>false</tenantCreated>
+ <tenantId>e25ac2f1e73d46428de81a6130a6fdad</tenantId>
+ <vnfCreated>true</vnfCreated>
+ <vnfId>slcp34248vbc/020a112b-a0c8-4143-87a3-698680ba2efe</vnfId>
+ </rollback>
+</ns2:updateVnfNotification>
+ </soapenv:Body>
+</soapenv:Envelope> \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/pom.xml b/bpmn/MSOCoreBPMN/pom.xml
index 9decd590e3..bdc26713e9 100644
--- a/bpmn/MSOCoreBPMN/pom.xml
+++ b/bpmn/MSOCoreBPMN/pom.xml
@@ -1,181 +1,177 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>bpmn</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSOCoreBPMN</artifactId>
- <packaging>jar</packaging>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCoreBPMN</artifactId>
+ <packaging>jar</packaging>
- <build>
- <plugins>
- <!-- Note: test utilities really ought to exist only in the test scope but -->
- <!-- this doesn't seem to work in the jenkins build environment. When unit -->
- <!-- tests are disabled, maven skips building the test scoped jar but then -->
- <!-- it inexplicably requires the jar when it is included as a test-scoped -->
- <!-- dependency in other projects. There might be something strange in the -->
- <!-- jenkins configuration because I don't have this problem on my PC, and -->
- <!-- I'm using the same version of maven/surefire -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <!-- Build MSOCoreBPMN-${version}.jar -->
- <!-- excluding unit test utilities -->
- <id>default-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>org/openecomp/mso/bpmn/test/**</exclude>
- </excludes>
- </configuration>
- </execution>
- <execution>
- <!-- Build MSOCoreBPMN-${version}-test.jar -->
- <!-- containing only the unit test utilities -->
- <id>test-utilities</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>test</classifier>
- <includes>
- <include>org/openecomp/mso/bpmn/test/**</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>test-compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>tests-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
- </plugins>
- </build>
+ </build>
- <dependencies>
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine-rest</artifactId>
- <classifier>classes</classifier>
- <!-- exclusion to use latest commons-fileupload -->
- <exclusions>
- <exclusion>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- latest commons-fileupload -->
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.3.2</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.10.19</version>
- <scope>test</scope>
- </dependency>
- <!-- Connectors, in compile scope to include it in the war file -->
- <dependency>
- <groupId>org.camunda.connect</groupId>
- <artifactId>camunda-connect-connectors-all</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.camunda.template-engines</groupId>
- <artifactId>camunda-template-engines-freemarker</artifactId>
- </dependency>
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine-plugin-spin</artifactId>
- </dependency>
- <!-- OPTIONAL: spin dataformats -->
- <dependency>
- <groupId>org.camunda.spin</groupId>
- <artifactId>camunda-spin-dataformat-json-jackson</artifactId>
- </dependency>
- <dependency>
- <groupId>org.camunda.spin</groupId>
- <artifactId>camunda-spin-dataformat-xml-dom</artifactId>
- </dependency>
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine-plugin-connect</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>net.sf.saxon</groupId>
- <artifactId>Saxon-HE</artifactId>
- </dependency>
- <dependency>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxrs</artifactId>
- <version>3.0.19.Final</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- <version>20160212</version>
- </dependency>
- <dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
- <version>1.6</version>
- </dependency>
- </dependencies>
-</project>
+ <dependencies>
+ <dependency>
+ <groupId>org.evosuite</groupId>
+ <artifactId>evosuite-standalone-runtime</artifactId>
+ <version>${evosuiteVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-rest</artifactId>
+ <classifier>classes</classifier>
+ <!-- exclusion to use latest commons-fileupload -->
+ <exclusions>
+ <exclusion>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- latest commons-fileupload -->
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.10.19</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- Connectors, in compile scope to include it in the war file -->
+ <dependency>
+ <groupId>org.camunda.connect</groupId>
+ <artifactId>camunda-connect-connectors-all</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.template-engines</groupId>
+ <artifactId>camunda-template-engines-freemarker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-plugin-spin</artifactId>
+ </dependency>
+ <!-- OPTIONAL: spin dataformats -->
+ <!-- ...but required to support JsonProvider -->
+ <dependency>
+ <groupId>org.camunda.spin</groupId>
+ <artifactId>camunda-spin-dataformat-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-plugin-connect</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>Saxon-HE</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxrs</artifactId>
+ <version>3.0.19.Final</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20160212</version>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>status-control</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/CamundaDBSetup.java
index 13eed2d530..aba43eb522 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/CamundaDBSetup.java
@@ -1,24 +1,4 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.test;
+package org.openecomp.mso.bpmn.core;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -55,10 +35,10 @@ public class CamundaDBSetup {
stmt.close();
stmt = null;
- stmt = connection.prepareStatement("ALTER TABLE ACT_HI_VARINST alter column NAME_ clob");
- stmt.executeUpdate();
- stmt.close();
- stmt = null;
+// stmt = connection.prepareStatement("ALTER TABLE ACT_HI_VARINST alter column NAME_ clob");
+// stmt.executeUpdate();
+// stmt.close();
+// stmt = null;
stmt = connection.prepareStatement("delete from ACT_HI_DETAIL");
stmt.executeUpdate();
@@ -70,10 +50,10 @@ public class CamundaDBSetup {
stmt.close();
stmt = null;
- stmt = connection.prepareStatement("ALTER TABLE ACT_HI_DETAIL alter column NAME_ clob");
- stmt.executeUpdate();
- stmt.close();
- stmt = null;
+// stmt = connection.prepareStatement("ALTER TABLE ACT_HI_DETAIL alter column NAME_ clob");
+// stmt.executeUpdate();
+// stmt.close();
+// stmt = null;
stmt = connection.prepareStatement("ALTER TABLE ACT_RU_VARIABLE alter column TEXT_ clob");
stmt.executeUpdate();
@@ -105,4 +85,4 @@ public class CamundaDBSetup {
}
}
}
-}
+} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
index df6213284c..409297c927 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,12 +30,18 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import java.io.BufferedReader;
+import java.io.InputStream;
import java.io.InputStreamReader;
+import java.util.Base64;
import java.util.Map;
+import java.util.Properties;
import java.util.UUID;
import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.utils.UUIDChecker;
+import org.openecomp.mso.HealthCheckUtils;
import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.utils.CryptoUtils;
import javax.ws.rs.GET;
import javax.ws.rs.HEAD;
import javax.ws.rs.Path;
@@ -48,10 +54,14 @@ import org.camunda.bpm.engine.ProcessEngines;
@Path("/")
public class HealthCheckHandler {
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
private static final String SITENAME = "mso.sitename";
private static final String ADPTER_ENDPOINT = "mso.adapters.db.endpoint";
private static final String CONFIG = "mso.bpmn.urn.properties";
+ private static final String PENGINE_PROPERTY = "processengine.properties";
+ private static final String PENGINE_PARAM = "processEngineName";
+ private static final String CREDENTIAL = "mso.adapters.db.auth";
+ private static final String MSOKEY = "mso.msoKey";
private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not started. Properties file missing or invalid or database Connection failed</body></html>";
@@ -68,6 +78,59 @@ public class HealthCheckHandler {
@HEAD
@GET
+ @Path("/nodehealthcheck")
+ @Produces("text/html")
+ public Response nodeHealthcheck () {
+ MsoLogger.setServiceName ("NodeHealthcheck");
+ // Generate a Request Id
+ String requestId = UUIDChecker.generateUUID(msoLogger);
+
+ PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+ Map<String,String> props = propertyConfiguration.getProperties(CONFIG);
+
+ if (props == null) {
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.AvailabilityError, "Unable to load " + CONFIG);
+
+ return NOT_STARTED_RESPONSE;
+ }
+
+ String siteName = props.get(SITENAME);
+ String endpoint = props.get(ADPTER_ENDPOINT);
+
+ if (null == siteName || siteName.length () == 0 || null == endpoint || endpoint.length () == 0) {
+
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, "Unable to load key attributes (" + SITENAME + " or " + ADPTER_ENDPOINT + ") from the config file:" + CONFIG);
+
+ return NOT_STARTED_RESPONSE;
+ }
+
+ try {
+ if (!this.getSiteStatus (endpoint, siteName, props.get(CREDENTIAL), props.get(MSOKEY))) {
+ msoLogger.debug("This site is currently disabled for maintenance.");
+ return HEALTH_CHECK_NOK_RESPONSE;
+ }
+ } catch (Exception e) {
+
+ msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception while getting SiteStatus", e);
+
+ msoLogger.debug("Exception while getting SiteStatus");
+ return NOT_STARTED_RESPONSE;
+ }
+
+
+ HealthCheckUtils healthCheck = new HealthCheckUtils ();
+ if (healthCheck.verifyNodeHealthCheck(HealthCheckUtils.NodeType.BPMN, requestId)) {
+ msoLogger.debug("nodeHealthcheck - Successful");
+ return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+ } else {
+ msoLogger.debug("nodeHealthcheck - At leaset one of the sub-modules is not available.");
+ return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+ }
+ }
+
+ @HEAD
+ @GET
@Path("/healthcheck")
@Produces("text/html")
public Response healthcheck (@QueryParam("requestId") String requestId) {
@@ -95,7 +158,7 @@ public class HealthCheckHandler {
}
try {
- if (!this.getSiteStatus (endpoint, siteName)) {
+ if (!this.getSiteStatus (endpoint, siteName, props.get(CREDENTIAL), props.get(MSOKEY))) {
msoLogger.debug("This site is currently disabled for maintenance.");
return HEALTH_CHECK_NOK_RESPONSE;
}
@@ -108,7 +171,13 @@ public class HealthCheckHandler {
}
try {
- ProcessEngines.getDefaultProcessEngine().getIdentityService().createGroupQuery().list();
+ InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(PENGINE_PROPERTY);
+ Properties prop = new Properties();
+ prop.load(stream);
+ String [] engineNames = prop.getProperty(PENGINE_PARAM).split(",");
+ for (String engine : engineNames) {
+ ProcessEngines.getProcessEngine(engine).getIdentityService().createGroupQuery().list();
+ }
} catch (final Exception e) {
msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception while verifying Camunda engine", e);
@@ -144,8 +213,18 @@ public class HealthCheckHandler {
}
}
- private boolean getSiteStatus (String url, String site) throws Exception {
- HttpResponse response;
+ private String decrypt(String encryptedString, String key){
+ try {
+ if (encryptedString != null && !encryptedString.isEmpty() && key != null && !key.isEmpty()) {
+ return CryptoUtils.decrypt(encryptedString, key);
+ }
+ } catch (Exception e) {
+ msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Failed to decrypt credentials", e);
+ }
+ return null;
+ }
+
+ private boolean getSiteStatus (String url, String site, String credential, String key) throws Exception {
// set the connection timeout value to 30 seconds (30000 milliseconds)
RequestConfig.Builder requestBuilder = RequestConfig.custom();
requestBuilder = requestBuilder.setConnectTimeout(30000);
@@ -154,12 +233,17 @@ public class HealthCheckHandler {
builder.setDefaultRequestConfig (requestBuilder.build ());
HttpPost post = new HttpPost(url);
+
+ String cred = decrypt(credential, key);
+ if (cred != null && !cred.isEmpty()) {
+ post.setHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(cred.getBytes()));
+ }
msoLogger.debug("Post url is: " + url);
//now create a soap request message as follows:
final StringBuffer payload = new StringBuffer();
payload.append("\n");
- payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"http://com.att.mso/requestsdb\">\n");
+ payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"http://org.openecomp.mso/requestsdb\">\n");
payload.append("<soapenv:Header/>\n");
payload.append("<soapenv:Body>\n");
payload.append("<req:getSiteStatus>\n");
@@ -173,31 +257,31 @@ public class HealthCheckHandler {
HttpEntity entity = new StringEntity(payload.toString(),"UTF-8");
post.setEntity(entity);
- try (CloseableHttpClient client = builder.build()) {
- response = client.execute(post);
- msoLogger.debug("Response received is:" + response);
-
- int statusCode = response.getStatusLine().getStatusCode();
- if (statusCode != 200) {
+ CloseableHttpClient client = builder.build ();
+ HttpResponse response = client.execute(post);
+ msoLogger.debug("Response received is:" + response);
- msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError,
- "Communication with DB Adapter failed, The response received from DB Adapter is with failed status code:" + statusCode);
+ int statusCode = response.getStatusLine().getStatusCode();
+ if (statusCode != 200) {
- Exception e = new Exception("Communication with DB Adapter failed");
- throw e;
- }
- BufferedReader rd = new BufferedReader(
- new InputStreamReader(response.getEntity().getContent()));
+ msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError,
+ "Communication with DB Adapter failed, The response received from DB Adapter is with failed status code:" + statusCode);
- StringBuffer result = new StringBuffer();
- String line = "";
- while ((line = rd.readLine()) != null) {
- result.append(line);
- }
- msoLogger.debug("Content of the response is:" + result);
- String status = result.substring(result.indexOf("<return>") + 8, result.indexOf("</return>"));
+ Exception e = new Exception("Communication with DB Adapter failed");
+ throw e;
+ }
+ BufferedReader rd = new BufferedReader(
+ new InputStreamReader(response.getEntity().getContent()));
- return Boolean.valueOf(status);
+ StringBuffer result = new StringBuffer();
+ String line = "";
+ while ((line = rd.readLine()) != null) {
+ result.append(line);
}
+ msoLogger.debug("Content of the response is:" + result);
+ String status = result.substring(result.indexOf("<return>") + 8, result.indexOf("</return>"));
+
+ client.close (); //shut down the connection
+ return Boolean.valueOf(status);
}
-}
+} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
index 90df1da7e5..d58d046598 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,11 +51,11 @@ import org.openecomp.mso.logger.MsoLogger;
/**
* Loads the property configuration from file system and refreshes the
* properties when the property gets changed.
- *
+ *
* WARNING: automatic refreshes might not work on network filesystems.
*/
public class PropertyConfiguration {
-
+
/**
* The base name of the MSO BPMN properties file (mso.bpmn.properties).
*/
@@ -65,7 +65,11 @@ public class PropertyConfiguration {
* The base name of the MSO BPMN URN-Mappings properties file (mso.bpmn.urn.properties).
*/
public static final String MSO_BPMN_URN_PROPERTIES = "mso.bpmn.urn.properties";
-
+
+ /**
+ * The base name of the MSO Topology properties file (topology.properties).
+ */
+ public static final String MSO_TOPOLOGY_PROPERTIES = "topology.properties";
/**
* The name of the meta-property holding the time the properties were loaded
* from the file.
@@ -75,7 +79,7 @@ public class PropertyConfiguration {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
private static final List<String> SUPPORTED_FILES =
- Arrays.asList(MSO_BPMN_PROPERTIES, MSO_BPMN_URN_PROPERTIES);
+ Arrays.asList(MSO_BPMN_PROPERTIES, MSO_BPMN_URN_PROPERTIES, MSO_TOPOLOGY_PROPERTIES);
private volatile String msoConfigPath = null;
@@ -87,7 +91,7 @@ public class PropertyConfiguration {
// The key is the file name
private Map<String, TimerTask> timerTaskMap = new HashMap<String, TimerTask>();
-
+
/**
* Singleton holder pattern eliminates locking when accessing the instance
* and still provides for lazy initialization.
@@ -116,7 +120,7 @@ public class PropertyConfiguration {
private PropertyConfiguration() {
startUp();
}
-
+
/**
* May be called to restart the PropertyConfiguration if it was previously shut down.
*/
@@ -228,7 +232,7 @@ public class PropertyConfiguration {
return Collections.unmodifiableMap(properties);
}
-
+
/**
* Reads properties from the specified file, updates the property file cache, and
* returns the properties in a map.
@@ -270,7 +274,7 @@ public class PropertyConfiguration {
return properties;
}
-
+
/**
* File watcher thread which monitors a directory for file modification.
*/
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
index 6f1cd7d8cc..f58efe79c8 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
@@ -1,24 +1,4 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.test;
+package org.openecomp.mso.bpmn.core;
import java.io.FileOutputStream;
import java.io.FileReader;
@@ -312,4 +292,4 @@ public class PropertyConfigurationSetup {
}
}
}
-}
+} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java
index 8a7b20016b..31da7376be 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java
@@ -1,243 +1,243 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.util.Iterator;
-
-import javax.xml.transform.stream.StreamSource;
-
-import org.camunda.bpm.engine.ProcessEngineException;
-import org.camunda.bpm.engine.delegate.DelegateExecution;
-//import java.util.logging.Logger;
-import org.camunda.bpm.engine.delegate.Expression;
-
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
-
-import net.sf.saxon.Configuration;
-import net.sf.saxon.s9api.DocumentBuilder;
-import net.sf.saxon.s9api.Processor;
-import net.sf.saxon.s9api.QName;
-import net.sf.saxon.s9api.XQueryCompiler;
-import net.sf.saxon.s9api.XQueryEvaluator;
-import net.sf.saxon.s9api.XQueryExecutable;
-import net.sf.saxon.s9api.XdmAtomicValue;
-import net.sf.saxon.s9api.XdmItem;
-import net.sf.saxon.s9api.XdmNode;
-
-/**
- * Executes an XQuery script.
- * <p>
- * Required fields:<br/><br/>
- * &nbsp;&nbsp;&nbsp;&nbsp;scriptFile: the XQuery script file path<br/>
- * &nbsp;&nbsp;&nbsp;&nbsp;outputVariable: the output variable name<br/>
- * <p>
- * Optional fields:<br/><br/>
- * &nbsp;&nbsp;&nbsp;&nbsp;xmlInputVariables: CSV list of variables containing
- * XML data to be injected into the script<br/>
- * &nbsp;&nbsp;&nbsp;&nbsp;atomicInputVariables: CSV list of variables containing
- * atomic data to be injected into the script<br/>
- */
-public class XQueryScriptTask extends BaseTask {
-
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
-
- private Expression scriptFile;
- private Expression xmlInputVariables;
- private Expression atomicInputVariables;
- private Expression outputVariable;
-
- public void execute(DelegateExecution execution) throws Exception {
- if (msoLogger.isDebugEnabled()) {
- msoLogger.debug("Started Executing " + getTaskName());
- }
-
- String theScriptFile =
- getStringField(scriptFile, execution, "scriptFile");
- String theXmlInputVariables =
- getOptionalStringField(xmlInputVariables, execution, "xmlInputVariables");
- String theAtomicInputVariables =
- getOptionalStringField(atomicInputVariables, execution, "atomicInputVariables");
- String theOutputVariable =
- getStringField(outputVariable, execution, "outputVariable");
-
- if (msoLogger.isDebugEnabled()) {
- System.out.println("scriptFile = " + theScriptFile
- + " xmlInputVariables = " + theXmlInputVariables
- + " atomicInputVariables = " + theAtomicInputVariables
- + "outputVariable = " + theOutputVariable);
- }
-
- String[] xmlInputVariableArray = (theXmlInputVariables == null)
- ? new String[0] : theXmlInputVariables.split(",[ ]*");
-
- String[] atomicInputVariableArray = (theAtomicInputVariables == null)
- ? new String[0] : theAtomicInputVariables.split(",[ ]*");
-
- Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
-
- if (shouldFail != null && shouldFail) {
- throw new ProcessEngineException(getClass().getSimpleName() + " Failed");
- }
-
- // The script could be compiled once and reused, but we are reading it
- // and compiling it every time.
- Configuration configuration = new Configuration();
- Processor processor = new Processor(configuration);
- XQueryCompiler compiler = processor.newXQueryCompiler();
- XQueryExecutable executable = compile(compiler, theScriptFile);
-
- // The evaluator must not be shared by multiple threads. Here is where
- // the initial context may be set, as well as values of external variables.
- XQueryEvaluator evaluator = executable.load();
-
- // Convert XML string variable content to document-node objects and inject
- // these into the evaluator. Note: the script must accept the document-node
- // type. Most MSO scripts today expect element() input, not document-node
- // input. TODO: figure out how to pass the variable data as element() types.
-
- for (String xmlInputVariable : xmlInputVariableArray) {
- if (msoLogger.isDebugEnabled()) {
- msoLogger.debug("Injecting XML variable '" + xmlInputVariable + "'");
- msoLogger.debug("printing the variable content>>'" + execution.getVariable(xmlInputVariable) +"'");
- }
-
- String xml = (String) execution.getVariable(xmlInputVariable);
- DocumentBuilder documentBuilder = processor.newDocumentBuilder();
- StreamSource source = new StreamSource(new ByteArrayInputStream(xml.getBytes("UTF-8")));
- XdmNode xdmNode = documentBuilder.build(source);
-
- // Inject the document-node object into the XQueryEvaluator.
- // TODO: transform it to an element()
- QName variable = new QName(xmlInputVariable);
- evaluator.setExternalVariable(variable, xdmNode);
- }
-
- // Inject atomic variables into the evaluator.
-
- for (String atomicInputVariable : atomicInputVariableArray) {
-
- if (msoLogger.isDebugEnabled()) {
- System.out.println("Injecting object variable '"
- + atomicInputVariable + "'");
- }
-
- QName variable = new QName(atomicInputVariable);
- Object value = execution.getVariable(atomicInputVariable);
-
- if (value == null) {
- // The variable value is null, so we have no way to know what
- // type it is. I don't know how to deal with this, so for
- // now, just skip it.
-
- msoLogger.warn (MessageEnum.BPMN_VARIABLE_NULL, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, atomicInputVariable);
-
- continue;
- }
-
- // There might be a better way to do this...
- if (value instanceof BigDecimal) {
- evaluator.setExternalVariable(variable,
- new XdmAtomicValue((BigDecimal) value));
- } else if (value instanceof Boolean) {
- evaluator.setExternalVariable(variable,
- new XdmAtomicValue((Boolean) value));
- } else if (value instanceof Double) {
- evaluator.setExternalVariable(variable,
- new XdmAtomicValue((Double) value));
- } else if (value instanceof Float) {
- evaluator.setExternalVariable(variable,
- new XdmAtomicValue((Float) value));
- } else if (value instanceof Long) {
- evaluator.setExternalVariable(variable,
- new XdmAtomicValue((Long) value));
- } else if (value instanceof String) {
- evaluator.setExternalVariable(variable,
- new XdmAtomicValue((String) value));
- } else if (value instanceof URI) {
- evaluator.setExternalVariable(variable,
- new XdmAtomicValue((URI) value));
- } else {
- throw new BadInjectedFieldException(
- "atomicInputVariables", getTaskName(),
- "'" + atomicInputVariable + "' type is not supported: "
- + value.getClass());
- }
- }
-
- // Evaluate the query and collect the output.
- StringBuilder output = new StringBuilder();
- Iterator<XdmItem> xdmItems = evaluator.iterator();
- while (xdmItems.hasNext()) {
- XdmItem item = xdmItems.next();
-
- if (msoLogger.isDebugEnabled()) {
- msoLogger.debug("XQuery result item = " + item);
- }
-
- output.append(item.toString());
- }
-
- // Set the output variable.
- execution.setVariable(theOutputVariable, output.toString());
-
- if (msoLogger.isDebugEnabled()) {
- msoLogger.debug("Done Executing " + getTaskName());
- }
- }
-
- /**
- * Compiles an XQuery script contained in a resource (file).
- * @param compiler the XQueryCompiler
- * @param resource the resource path
- * @return an XQueryExecutable
- * @throws Exception on error
- */
- private XQueryExecutable compile(XQueryCompiler compiler, String resource)
- throws Exception {
- InputStream xqStream = null;
- try {
- xqStream = getClass().getResourceAsStream(resource);
-
- if (xqStream == null) {
- throw new IOException("Resource not found: " + resource);
- }
-
- XQueryExecutable executable = compiler.compile(xqStream);
- xqStream.close();
- xqStream = null;
- return executable;
- } finally {
- if (xqStream != null) {
- try {
- xqStream.close();
- } catch (Exception e) {
- // Do nothing
- }
- }
- }
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.Iterator;
+
+import javax.xml.transform.stream.StreamSource;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+//import java.util.logging.Logger;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+import net.sf.saxon.Configuration;
+import net.sf.saxon.s9api.DocumentBuilder;
+import net.sf.saxon.s9api.Processor;
+import net.sf.saxon.s9api.QName;
+import net.sf.saxon.s9api.XQueryCompiler;
+import net.sf.saxon.s9api.XQueryEvaluator;
+import net.sf.saxon.s9api.XQueryExecutable;
+import net.sf.saxon.s9api.XdmAtomicValue;
+import net.sf.saxon.s9api.XdmItem;
+import net.sf.saxon.s9api.XdmNode;
+
+/**
+ * Executes an XQuery script.
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;scriptFile: the XQuery script file path<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;outputVariable: the output variable name<br/>
+ * <p>
+ * Optional fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;xmlInputVariables: CSV list of variables containing
+ * XML data to be injected into the script<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;atomicInputVariables: CSV list of variables containing
+ * atomic data to be injected into the script<br/>
+ */
+public class XQueryScriptTask extends BaseTask {
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ private Expression scriptFile;
+ private Expression xmlInputVariables;
+ private Expression atomicInputVariables;
+ private Expression outputVariable;
+
+ public void execute(DelegateExecution execution) throws Exception {
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Started Executing " + getTaskName());
+ }
+
+ String theScriptFile =
+ getStringField(scriptFile, execution, "scriptFile");
+ String theXmlInputVariables =
+ getOptionalStringField(xmlInputVariables, execution, "xmlInputVariables");
+ String theAtomicInputVariables =
+ getOptionalStringField(atomicInputVariables, execution, "atomicInputVariables");
+ String theOutputVariable =
+ getStringField(outputVariable, execution, "outputVariable");
+
+ if (msoLogger.isDebugEnabled()) {
+ System.out.println("scriptFile = " + theScriptFile
+ + " xmlInputVariables = " + theXmlInputVariables
+ + " atomicInputVariables = " + theAtomicInputVariables
+ + "outputVariable = " + theOutputVariable);
+ }
+
+ String[] xmlInputVariableArray = (theXmlInputVariables == null)
+ ? new String[0] : theXmlInputVariables.split(",[ ]*");
+
+ String[] atomicInputVariableArray = (theAtomicInputVariables == null)
+ ? new String[0] : theAtomicInputVariables.split(",[ ]*");
+
+ Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
+
+ if (shouldFail != null && shouldFail) {
+ throw new ProcessEngineException(getClass().getSimpleName() + " Failed");
+ }
+
+ // The script could be compiled once and reused, but we are reading it
+ // and compiling it every time.
+ Configuration configuration = new Configuration();
+ Processor processor = new Processor(configuration);
+ XQueryCompiler compiler = processor.newXQueryCompiler();
+ XQueryExecutable executable = compile(compiler, theScriptFile);
+
+ // The evaluator must not be shared by multiple threads. Here is where
+ // the initial context may be set, as well as values of external variables.
+ XQueryEvaluator evaluator = executable.load();
+
+ // Convert XML string variable content to document-node objects and inject
+ // these into the evaluator. Note: the script must accept the document-node
+ // type. Most MSO scripts today expect element() input, not document-node
+ // input. TODO: figure out how to pass the variable data as element() types.
+
+ for (String xmlInputVariable : xmlInputVariableArray) {
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Injecting XML variable '" + xmlInputVariable + "'");
+ msoLogger.debug("printing the variable content>>'" + execution.getVariable(xmlInputVariable) +"'");
+ }
+
+ String xml = (String) execution.getVariable(xmlInputVariable);
+ DocumentBuilder documentBuilder = processor.newDocumentBuilder();
+ StreamSource source = new StreamSource(new ByteArrayInputStream(xml.getBytes("UTF-8")));
+ XdmNode xdmNode = documentBuilder.build(source);
+
+ // Inject the document-node object into the XQueryEvaluator.
+ // TODO: transform it to an element()
+ QName variable = new QName(xmlInputVariable);
+ evaluator.setExternalVariable(variable, xdmNode);
+ }
+
+ // Inject atomic variables into the evaluator.
+
+ for (String atomicInputVariable : atomicInputVariableArray) {
+
+ if (msoLogger.isDebugEnabled()) {
+ System.out.println("Injecting object variable '"
+ + atomicInputVariable + "'");
+ }
+
+ QName variable = new QName(atomicInputVariable);
+ Object value = execution.getVariable(atomicInputVariable);
+
+ if (value == null) {
+ // The variable value is null, so we have no way to know what
+ // type it is. I don't know how to deal with this, so for
+ // now, just skip it.
+
+ msoLogger.warn (MessageEnum.BPMN_VARIABLE_NULL, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, atomicInputVariable);
+
+ continue;
+ }
+
+ // There might be a better way to do this...
+ if (value instanceof BigDecimal) {
+ evaluator.setExternalVariable(variable,
+ new XdmAtomicValue((BigDecimal) value));
+ } else if (value instanceof Boolean) {
+ evaluator.setExternalVariable(variable,
+ new XdmAtomicValue((Boolean) value));
+ } else if (value instanceof Double) {
+ evaluator.setExternalVariable(variable,
+ new XdmAtomicValue((Double) value));
+ } else if (value instanceof Float) {
+ evaluator.setExternalVariable(variable,
+ new XdmAtomicValue((Float) value));
+ } else if (value instanceof Long) {
+ evaluator.setExternalVariable(variable,
+ new XdmAtomicValue((Long) value));
+ } else if (value instanceof String) {
+ evaluator.setExternalVariable(variable,
+ new XdmAtomicValue((String) value));
+ } else if (value instanceof URI) {
+ evaluator.setExternalVariable(variable,
+ new XdmAtomicValue((URI) value));
+ } else {
+ throw new BadInjectedFieldException(
+ "atomicInputVariables", getTaskName(),
+ "'" + atomicInputVariable + "' type is not supported: "
+ + value.getClass());
+ }
+ }
+
+ // Evaluate the query and collect the output.
+ StringBuilder output = new StringBuilder();
+ Iterator<XdmItem> xdmItems = evaluator.iterator();
+ while (xdmItems.hasNext()) {
+ XdmItem item = xdmItems.next();
+
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("XQuery result item = " + item);
+ }
+
+ output.append(item.toString());
+ }
+
+ // Set the output variable.
+ execution.setVariable(theOutputVariable, output.toString());
+
+ if (msoLogger.isDebugEnabled()) {
+ msoLogger.debug("Done Executing " + getTaskName());
+ }
+ }
+
+ /**
+ * Compiles an XQuery script contained in a resource (file).
+ * @param compiler the XQueryCompiler
+ * @param resource the resource path
+ * @return an XQueryExecutable
+ * @throws Exception on error
+ */
+ private XQueryExecutable compile(XQueryCompiler compiler, String resource)
+ throws Exception {
+ InputStream xqStream = null;
+ try {
+ xqStream = getClass().getResourceAsStream(resource);
+
+ if (xqStream == null) {
+ throw new IOException("Resource not found: " + resource);
+ }
+
+ XQueryExecutable executable = compiler.compile(xqStream);
+ xqStream.close();
+ xqStream = null;
+ return executable;
+ } finally {
+ if (xqStream != null) {
+ try {
+ xqStream.close();
+ } catch (Exception e) {
+ // Do nothing
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
index 8329746347..4c0d068b28 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
@@ -1,443 +1,830 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.core.json;
-
-import java.util.Iterator;
-import java.util.StringTokenizer;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.json.XML;
-
-//import org.openecomp.mso.bpmn.core.BPMNLogger;
-import org.openecomp.mso.bpmn.core.xml.XmlTool;
-import org.openecomp.mso.logger.MsoLogger;
-
-/**
- * Utility class for JSON processing
- *
- * @version 1.0
- */
-
-public class JsonUtils {
-
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- private static int MSOJsonIndentFactor = 3;
-
- /**
- * Uses the JSONObject static method to convert a XML doc to JSON.
- *
- * @param xml String containing the XML doc
- * @param pretty flag to determine if the output should be formatted
- * @return String containing the JSON translation
- */
- public static String xml2json(String xml, Boolean pretty) {
-// String isDebugLogEnabled = "true";
- try {
- // name spaces cause problems, so just remove them
- JSONObject jsonObj = XML.toJSONObject(XmlTool.removeNamespaces(xml));
- if (!pretty) {
- return jsonObj.toString();
- } else {
- // add an indent to make it 'pretty'
- return jsonObj.toString(MSOJsonIndentFactor);
- }
- } catch (Exception e){
- msoLogger.debug("xml2json(): unable to parse xml and convert to json. Exception was: " + e.toString());
- return null;
- }
- }
-
- /**
- * Invokes xml2json(String, Boolean) defaulting to 'pretty' output.
- *
- * @param xml String containing the XML doc
- * @return String containing the JSON translation
- */
- public static String xml2json(String xml) {
- return xml2json(xml, true);
- }
-
- /**
- * Uses the JSONObject static method to convert a JSON doc to XML.
- * Note: this method will not generate valid XML if the JSONObject
- * contains JSONArrays which are used to represent XML attributes
- * in the JSON doc.
- *
- * @param jsonStr String containing the JSON doc
- * @param pretty flag to determine if the output should be formatted
- * @return String containing the XML translation
- */
- public static String json2xml(String jsonStr, Boolean pretty) {
-// String isDebugLogEnabled = "true";
- try {
- JSONObject jsonObj = new JSONObject(jsonStr);
- if (pretty) {
- return XmlTool.normalize(XML.toString(jsonObj));
- } else {
- return XML.toString(jsonObj);
- }
- } catch (Exception e){
- msoLogger.debug("json2xml(): unable to parse json and convert to xml. Exception was: " + e.toString());
- return null;
- }
- }
-
- /**
- * Invokes json2xml(String, Boolean) defaulting to 'pretty' output.
- *
- * @param jsonStr String containing the XML doc
- * @return String containing the JSON translation
- */
- public static String json2xml(String jsonStr) {
- return json2xml(jsonStr, true);
- }
-
- /**
- * Uses the JSONObject static method to convert a JSON doc to XML.
- *
- * @param jsonStr String containing the JSON doc
- * @return Iterator over the JSON keys
- */
- public static Iterator <String> getJsonIterator(String jsonStr) {
-// String isDebugLogEnabled = "true";
- try {
- JSONObject json = new JSONObject(jsonStr);
- return json.keys();
-
- } catch (Exception e){
- msoLogger.debug("getJsonIterator(): unable to parse json to retrieve the keys iterator. Exception was: " + e.toString());
- return null;
- }
- }
-
- /**
- * Invokes the getJsonRawValue() method and returns the String equivalent of
- * the object returned.
- *
- * TBD: May need separate methods for boolean, float, and integer fields if the
- * String representation is not sufficient to meet client needs.
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the target value in the format of "key1.key2.key3..."
- * @return String field value associated with keys
- */
- public static String getJsonValue(String jsonStr, String keys) {
-// String isDebugLogEnabled = "true";
- try {
- Object rawValue = getJsonRawValue(jsonStr, keys);
- if (rawValue == null) {
- return null;
- } else {
- if (rawValue instanceof String) {
- msoLogger.debug("getJsonValue(): the raw value is a String Object=" + ((String) rawValue).toString());
- return (String) rawValue;
- } else {
- msoLogger.debug("getJsonValue(): the raw value is NOT a String Object=" + rawValue.toString());
- return rawValue.toString();
- }
- }
- } catch (Exception e) {
- msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
- }
- return null;
- }
-
- /**
- * Invokes the getJsonRawValue() method to obtain the JSONArray associated with
- * the specified keys. The JSONArray is then walked to retrieve the content value of
- * the specified field name.
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the target value in the format of "key1.key2.key3..."
- * @param name field name for the param to be retrieved
- * @return String param value associated with field name
- */
- public static String getJsonParamValue(String jsonStr, String keys, String name) {
-// String isDebugLogEnabled = "true";
- try {
- Object rawValue = getJsonRawValue(jsonStr, keys);
- if (rawValue == null) {
- return null;
- } else {
- if (rawValue instanceof JSONArray) {
- msoLogger.debug("getJsonParamValue(): keys=" + keys + " points to JSONArray: " + ((JSONArray) rawValue).toString());
- for (int i = 0; i < ((JSONArray) rawValue).length(); i++) {
- msoLogger.debug("getJsonParamValue(): index: " + i + ", value: " + ((JSONArray) rawValue).get(i).toString());
- if (((JSONArray) rawValue).get(i) instanceof JSONObject) {
- msoLogger.debug("getJsonParamValue(): index: " + i + " is a JSONObject");
- JSONObject jsonObj = (JSONObject)((JSONArray) rawValue).get(i);
- if (jsonObj.get("name").equals(name)) {
- msoLogger.debug("getJsonParamValue(): found value: " + (String) jsonObj.get("content") + " for name: " + name);
- return (String) jsonObj.get("content");
- }
- } else {
- msoLogger.debug("getJsonParamValue(): the JSONArray element is NOT a JSONObject=" + rawValue.toString());
- return null;
- }
- }
- msoLogger.debug("getJsonParamValue(): content value NOT found for name: " + name);
- return null;
- } else {
- msoLogger.debug("getJsonParamValue(): the raw value is NOT a JSONArray Object=" + rawValue.toString());
- return null;
- }
- }
- } catch (JSONException je) {
- // JSONObject::get() throws this exception if one of the specified keys is not found
- msoLogger.debug("getJsonParamValue(): caught JSONException attempting to retrieve param value for keys:" + keys + ", name=" + name);
- } catch (Exception e) {
- msoLogger.debug("getJsonParamValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
- }
- return null;
- }
-
- /**
- * Wrapper to generate the JSONObject to pass to the getJsonValueForKey(JSONObject, String)
- * method so that recursion over the subobjects can be supported there
- *
- * @param jsonStr String containing the JSON doc
- * @param key key to the target value
- * @return String field value associated with key
- */
- public static String getJsonValueForKey(String jsonStr, String key) {
-// String isDebugLogEnabled = "true";
- try {
- JSONObject jsonObj = new JSONObject(jsonStr);
- if (jsonObj != null) {
- return getJsonValueForKey(jsonObj, key);
- }
- } catch (Exception e) {
- msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());
- }
- return null;
- }
-
- /**
- * Walks the JSONObject (and sub-objects recursively), searching for the first value associated with the
- * single key/field name specified. Returns the associated value if found or null if the key is not found
- *
- * @param jsonObj JSONObject representation of the the JSON doc
- * @param key key to the target value
- * @return String field value associated with key
- */
- public static String getJsonValueForKey(JSONObject jsonObj, String key) {
-// String isDebugLogEnabled = "true";
- String keyValue = null;
- try {
- if (jsonObj.has(key)) {
- msoLogger.debug("getJsonValueForKey(): found value for key=" + key);
- return ((String) jsonObj.get(key));
- } else {
- msoLogger.debug("getJsonValueForKey(): iterating over the keys");
- Iterator <String> itr = jsonObj.keys();
- while (itr.hasNext()) {
- String nextKey = (String) itr.next();
- Object obj = jsonObj.get(nextKey);
- if (obj instanceof JSONObject) {
- msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");
- keyValue = getJsonValueForKey((JSONObject) obj, key);
- if (keyValue != null) {
- msoLogger.debug("getJsonValueForKey(): found value=" + keyValue + ", for key=" + key);
- break;
- }
- } else {
- msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", does not point to a JSONObject, next key");
- }
- }
- }
- } catch (JSONException je) {
- // JSONObject::get() throws this exception if one of the specified keys is not found
- msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key);
- keyValue = null;
- } catch (Exception e) {
- msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());
- }
- return keyValue;
- }
-
- /**
- * Boolean method to determine if a key path is valid for the JSON doc. Invokes
- * getJsonValue().
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the target value in the format of "key1.key2.key3..."
- * @return Boolean true if keys points to value in the JSON doc
- */
- public static Boolean jsonValueExists(String jsonStr, String keys) {
- if (getJsonRawValue(jsonStr, keys) == null) {
- return false;
- } else {
- return true;
- }
- }
-
- /**
- * Inserts the new key/value pair at the appropriate location in the JSON
- * document after first determining if keyed field already exists. If
- * it does exist, return the JSON unmodified, otherwise return the new JSON
- * Note: this method currently only supports String value inserts.
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the value to be added in the format of "key1.key2.key3..."
- * @return String containing the updated JSON doc
- */
- public static String addJsonValue(String jsonStr, String keys, String value) {
-// String isDebugLogEnabled = "true";
- // only attempt to insert the key/value pair if it does not exist
- if (!jsonValueExists(jsonStr, keys)) {
- return putJsonValue(jsonStr, keys, value);
- } else {
- msoLogger.debug("addJsonValue(): JSON add failed, key=" + keys + "/value=" + (String) value + " already exists");
- return jsonStr;
- }
- }
-
- /**
- * Updates the value for the specified key in the JSON document
- * after first determining if keyed field exists. If it does
- * not exist, return the JSON unmodified, otherwise return the updated JSON.
- * Note: this method currently only supports String value updates.
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the value to be updated in the format of "key1.key2.key3..."
- * @return String containing the updated JSON doc
- */
- public static String updJsonValue(String jsonStr, String keys, String newValue) {
-// String isDebugLogEnabled = "true";
- // only attempt to modify the key/value pair if it exists
- if (jsonValueExists(jsonStr, keys)) {
- return putJsonValue(jsonStr, keys, newValue);
- } else {
- msoLogger.debug("updJsonValue(): JSON update failed, no value exists for key=" + keys);
- return jsonStr;
- }
- }
-
- /**
- * Deletes the value for the specified key in the JSON document
- * after first determining if keyed field exists. If it does
- * not exist, return the JSON unmodified, otherwise return the updated JSON
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the value to be deleted in the format of "key1.key2.key3..."
- * @return String containing the updated JSON doc
- */
- public static String delJsonValue(String jsonStr, String keys) {
-// String isDebugLogEnabled = "true";
- // only attempt to remove the key/value pair if it exists
- if (jsonValueExists(jsonStr, keys)) {
- // passing a null value results in a delete
- return putJsonValue(jsonStr, keys, null);
- } else {
- msoLogger.debug("delJsonValue(): JSON delete failed, no value exists for key=" + keys);
- return jsonStr;
- }
- }
-
- /**
- * Walks the JSON doc using the full key path to retrieve the associated
- * value. All but the last key points to the 'parent' object name(s) in order
- * in the JSON hierarchy with the last key pointing to the target value.
- * The value returned is a Java object.
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the target value in the format of "key1.key2.key3..."
- * @return Object field value associated with keys
- */
- private static Object getJsonRawValue(String jsonStr, String keys) {
-// String isDebugLogEnabled = "true";
- String keyStr = "";
- try {
- JSONObject jsonObj = new JSONObject(jsonStr);
- StringTokenizer keyTokens = new StringTokenizer(keys, ".");
- while (keyTokens.hasMoreElements()) {
- keyStr = keyTokens.nextToken();
- Object keyValue = jsonObj.get(keyStr);
- if (keyValue instanceof JSONObject) {
- msoLogger.debug("getJsonRawValue(): key=" + keyStr + " points to json object");
- jsonObj = (JSONObject) keyValue;
- } else {
- if (keyTokens.hasMoreElements()) {
- msoLogger.debug("getJsonRawValue(): value found prior to last key for key=" + keyStr);
- }
- return keyValue;
- }
- }
- // we should not hit this point: either the key points to a valid value and
- // we return it above or the key is invalid and we handle the JSONException
- // below and return null
- return null;
-
- } catch (JSONException je) {
- // JSONObject::get() throws this exception if one of the specified keys is not found
- msoLogger.debug("getJsonRawValue(): caught JSONException attempting to retrieve raw value for key=" + keyStr);
- } catch (Exception e) {
- msoLogger.debug("getJsonRawValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
- }
- return null;
- }
-
- /**
- * Private method invoked by the public add, update, and delete methods.
- *
- * @param jsonStr String containing the JSON doc
- * @param keys full key path to the value to be deleted in the format of "key1.key2.key3..."
- * @return String containing the updated JSON doc
- */
- private static String putJsonValue(String jsonStr, String keys, String value) {
-// String isDebugLogEnabled = "true";
- String keyStr = "";
- try {
- JSONObject jsonObj = new JSONObject(jsonStr);
- JSONObject jsonObjOut = jsonObj;
- StringTokenizer keyTokens = new StringTokenizer(keys, ".");
- while (keyTokens.hasMoreElements()) {
- keyStr = keyTokens.nextToken();
- if (keyTokens.hasMoreElements()) {
- Object keyValue = jsonObj.get(keyStr);
- if (keyValue instanceof JSONObject) {
- msoLogger.debug("putJsonValue(): key=" + keyStr + " points to json object");
- jsonObj = (JSONObject) keyValue;
- } else {
- msoLogger.debug("putJsonValue(): key=" + keyStr + " not the last key but points to non-json object: " + (String) keyValue);
- return null;
- }
- } else { // at the last/new key value
- jsonObj.put(keyStr, value);
- return jsonObjOut.toString(3);
- }
- }
- // should not hit this point if the key points to a valid key value
- return null;
-
- } catch (JSONException je) {
- // JSONObject::get() throws this exception if one of the specified keys is not found
- msoLogger.debug("putJsonValue(): caught JSONException attempting to retrieve value for key=" + keyStr);
- return null;
- } catch (Exception e) {
- msoLogger.debug("putJsonValue(): unable to parse json to put value for key=" + keys + ". Exception was: " + e.toString());
- }
- return null;
- }
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.json;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.StringTokenizer;
+
+import org.camunda.bpm.engine.runtime.Execution;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.json.XML;
+
+//import org.openecomp.mso.bpmn.core.BPMNLogger;
+import org.openecomp.mso.bpmn.core.xml.XmlTool;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Utility class for JSON processing
+ *
+ * @version 1.0
+ */
+
+public class JsonUtils {
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ private static int MSOJsonIndentFactor = 3;
+
+ /**
+ * Uses the JSONObject static method to convert a XML doc to JSON.
+ *
+ * @param xml String containing the XML doc
+ * @param pretty flag to determine if the output should be formatted
+ * @return String containing the JSON translation
+ */
+ public static String xml2json(String xml, Boolean pretty) {
+// String isDebugLogEnabled = "true";
+ try {
+ // name spaces cause problems, so just remove them
+ JSONObject jsonObj = XML.toJSONObject(XmlTool.removeNamespaces(xml));
+ if (!pretty) {
+ return jsonObj.toString();
+ } else {
+ // add an indent to make it 'pretty'
+ return jsonObj.toString(MSOJsonIndentFactor);
+ }
+ } catch (Exception e){
+ msoLogger.debug("xml2json(): unable to parse xml and convert to json. Exception was: " + e.toString());
+ return null;
+ }
+ }
+
+ /**
+ * Invokes xml2json(String, Boolean) defaulting to 'pretty' output.
+ *
+ * @param xml String containing the XML doc
+ * @return String containing the JSON translation
+ */
+ public static String xml2json(String xml) {
+ return xml2json(xml, true);
+ }
+
+ /**
+ * Uses the JSONObject static method to convert a JSON doc to XML.
+ * Note: this method may not generate valid XML if the JSONObject
+ * contains JSONArrays which are used to represent XML attributes
+ * in the JSON doc.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param pretty flag to determine if the output should be formatted
+ * @return String containing the XML translation
+ */
+ public static String json2xml(String jsonStr, Boolean pretty) {
+// String isDebugLogEnabled = "true";
+ try {
+ JSONObject jsonObj = new JSONObject(jsonStr);
+ if (pretty) {
+ // use the local class method which properly handles certain JSONArray content
+ return XmlTool.normalize(toXMLString(jsonObj, null));
+ } else {
+// use the local class method which properly handles certain JSONArray content
+ return toXMLString(jsonObj, null);
+ }
+ } catch (Exception e){
+ msoLogger.debug("json2xml(): unable to parse json and convert to xml. Exception was: " + e.toString());
+ return null;
+ }
+ }
+
+ /**
+ * Uses a modified version of the org.json.XML toString() algorithm
+ * to convert a JSONObject to an XML Doc. The intent of this is to
+ * correctly generate XML from JSON including TAGs for JSONArrays
+ *
+ * @param jsonObj org.json.JSON object to be converted to XML
+ * @param tagName optional XML tagname supplied primarily during recursive calls
+ * @return String containing the XML translation
+ */
+ public static String toXMLString(Object obj, String tagName) throws JSONException {
+ StringBuffer strBuf = new StringBuffer();
+ int i;
+ JSONArray jsonArr;
+ JSONObject jsonObj;
+ String key;
+ Iterator<String> keys;
+ int len;
+ String str;
+ Object curObj;
+ if (obj instanceof JSONObject) {
+ // msoLogger.debug("toXMLString(): is a JSONObject");
+ // append "<tagName>" to the XML output
+ if (tagName != null) {
+// msoLogger.debug("toXMLString(): adding opening tagName: " + tagName);
+ strBuf.append("<");
+ strBuf.append(tagName);
+ strBuf.append(">");
+ }
+ // iterate thru the keys.
+ jsonObj = (JSONObject) obj;
+ keys = jsonObj.keys();
+ while (keys.hasNext()) {
+ key = keys.next().toString();
+ // msoLogger.debug("toXMLString(): key is " + k);
+ curObj = jsonObj.opt(key);
+ if (curObj == null) {
+ curObj = "";
+ }
+ if (curObj instanceof String) {
+ str = (String) curObj;
+ } else {
+ str = null;
+ }
+ // append the content to the XML output
+ if (key.equals("content")) {
+ if (curObj instanceof JSONArray) {
+ jsonArr = (JSONArray) curObj;
+ len = jsonArr.length();
+ for (i = 0; i < len; i += 1) {
+ if (i > 0) {
+ strBuf.append('\n');
+ }
+ strBuf.append(XML.escape(jsonArr.get(i).toString()));
+ }
+ } else {
+ strBuf.append(XML.escape(curObj.toString()));
+ }
+ // append an array of similar keys to the XML output
+ } else if (curObj instanceof JSONArray) {
+ jsonArr = (JSONArray) curObj;
+ len = jsonArr.length();
+// msoLogger.debug("toXMLString(): found JSONArray: " + key + ", size: " + len);
+ for (i = 0; i < len; i += 1) {
+ curObj = jsonArr.get(i);
+ if (curObj instanceof JSONArray) {
+// The XML tags for the nested array should be generated below when this method
+// is called recursively and the JSONArray object is passed
+// strBuf.append("<");
+// strBuf.append(key);
+// strBuf.append(">");
+ strBuf.append(toXMLString(curObj, null));
+// strBuf.append("</");
+// strBuf.append(key);
+// strBuf.append(">");
+ } else {
+// msoLogger.debug("toXMLString(): recursive call toXML() with tagName null");
+ // append the opening tag for the array (before 1st element)
+ if (i == 0) {
+ strBuf.append("<");
+ strBuf.append(key);
+ strBuf.append(">");
+ }
+ // append the opening tag for the array
+ strBuf.append(toXMLString(curObj, null));
+ // append the closing tag for the array (after last element)
+ if (i == (len - 1)) {
+ strBuf.append("</");
+ strBuf.append(key);
+ strBuf.append(">");
+ }
+ }
+ }
+ } else if (curObj.equals("")) {
+ // append a closing tag "<key>" to the XML output
+ strBuf.append("<");
+ strBuf.append(key);
+ strBuf.append("/>");
+ } else {
+// msoLogger.debug("toXMLString(): recursive call toXMLString() with tagName: " + key);
+ strBuf.append(toXMLString(curObj, key));
+ }
+ // msoLogger.debug("toXML(): partial XML: " + strBuf.toString());
+ }
+ if (tagName != null) {
+ // append the closing tag "</tagName>" to the XML output
+// msoLogger.debug("toXMLString(): adding closing tagName: " + tagName);
+ strBuf.append("</");
+ strBuf.append(tagName);
+ strBuf.append(">");
+ }
+ return strBuf.toString();
+ // XML does not have good support for arrays. If an array appears in a place
+ // where XML is lacking, synthesize an < array > element.
+ } else if (obj instanceof JSONArray) {
+ jsonArr = (JSONArray) obj;
+ len = jsonArr.length();
+ for (i = 0; i < len; ++i) {
+ curObj = jsonArr.opt(i);
+ strBuf.append(toXMLString(curObj, (tagName == null) ? "array"
+ : tagName));
+ }
+ return strBuf.toString();
+ } else {
+// msoLogger.debug("toXML(): in else block with tagName: " + tagName);
+ str = (obj == null) ? "null" : XML.escape(obj.toString());
+ return (tagName == null) ? "\"" + str + "\""
+ : (str.length() == 0) ? "<" + tagName + "/>" : "<"
+ + tagName + ">" + str + "</" + tagName + ">";
+ }
+ }
+
+ /**
+ * Formats the JSON String using the value of MSOJsonIndentFactor.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @return String containing the formatted JSON doc
+ */
+ public static String prettyJson(String jsonStr) {
+// String isDebugLogEnabled = "true";
+ try {
+ JSONObject jsonObj = new JSONObject(jsonStr);
+ return jsonObj.toString(MSOJsonIndentFactor);
+ } catch (Exception e){
+ msoLogger.debug("prettyJson(): unable to parse/format json input. Exception was: " + e.toString());
+ return null;
+ }
+ }
+
+ /**
+ * Invokes json2xml(String, Boolean) defaulting to 'pretty' output.
+ *
+ * @param jsonStr String containing the XML doc
+ * @return String containing the JSON translation
+ */
+ public static String json2xml(String jsonStr) {
+ return json2xml(jsonStr, true);
+ }
+
+ /**
+ * Returns an Iterator over the JSON keys in the specified JSON doc.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @return Iterator over the JSON keys
+ * @throws JSONException if the doc cannot be parsed
+ */
+ public static Iterator <String> getJsonIterator(String jsonStr) throws JSONException {
+ return new JSONObject(jsonStr).keys();
+ }
+
+ /**
+ * Returns the name of the "root" property in the specified JSON doc. The
+ * "root" property is the single top-level property in the JSON doc. An
+ * exception is thrown if the doc is empty or if it contains more than one
+ * top-level property.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @return the name of the "root" property
+ * @throws JSONException if the doc cannot be parsed, or if it is empty, or if
+ * it contains more than one top-level property
+ */
+ public static String getJsonRootProperty(String jsonStr) throws JSONException {
+ Iterator<String> iter = getJsonIterator(jsonStr);
+
+ if (!iter.hasNext()) {
+ throw new JSONException("Empty JSON object");
+ }
+
+ String rootPropertyName = iter.next();
+
+ if (iter.hasNext()) {
+ throw new JSONException("JSON object has more than one root property");
+ }
+
+ return rootPropertyName;
+ }
+
+ /**
+ * Invokes the getJsonRawValue() method and returns the String equivalent of
+ * the object returned.
+ *
+ * TBD: May need separate methods for boolean, float, and integer fields if the
+ * String representation is not sufficient to meet client needs.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @return String field value associated with keys
+ */
+ public static String getJsonValue(String jsonStr, String keys) {
+// String isDebugLogEnabled = "true";
+ try {
+ Object rawValue = getJsonRawValue(jsonStr, keys);
+ if (rawValue == null) {
+ return null;
+ } else {
+ if (rawValue instanceof String) {
+ msoLogger.debug("getJsonValue(): the raw value is a String Object=" + ((String) rawValue).toString());
+ return (String) rawValue;
+ } else {
+ msoLogger.debug("getJsonValue(): the raw value is NOT a String Object=" + rawValue.toString());
+ return rawValue.toString();
+ }
+ }
+ } catch (Exception e) {
+ msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
+ }
+ return null;
+ }
+
+
+ /**
+ * Invokes the getJsonRawValue() method with the wrap flag set to true
+ * and returns the String equivalent of the json node object returned.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @return String field value associated with keys
+ */
+ public static String getJsonNodeValue(String jsonStr, String keys) {
+// String isDebugLogEnabled = "true";
+ try {
+ Object rawValue = getJsonRawValue(jsonStr, keys, true);
+ if (rawValue == null) {
+ return null;
+ } else {
+ if (rawValue instanceof String) {
+ msoLogger.debug("getJsonNodeValue(): the raw value is a String Object=" + ((String) rawValue).toString());
+ return (String) rawValue;
+ } else {
+ msoLogger.debug("getJsonNodeValue(): the raw value is NOT a String Object=" + rawValue.toString());
+ return rawValue.toString();
+ }
+ }
+ } catch (Exception e) {
+ msoLogger.debug("getJsonNodeValue(): unable to parse json to retrieve node for field=" + keys + ". Exception was: " + e.toString());
+ }
+ return null;
+ }
+
+ /**
+ * Invokes the getJsonRawValue() method and returns the String equivalent of
+ * the object returned.
+ *
+ * TBD: May need separate methods for boolean, float, and integer fields if the
+ * String representation is not sufficient to meet client needs.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @return String field value associated with keys
+ */
+ public static int getJsonIntValue(String jsonStr, String keys) {
+// String isDebugLogEnabled = "true";
+ try {
+ Object rawValue = getJsonRawValue(jsonStr, keys);
+ if (rawValue == null) {
+ return 0;
+ } else {
+ if (rawValue instanceof Integer) {
+ msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + ((String) rawValue).toString());
+ return (Integer) rawValue;
+ } else {
+ msoLogger.debug("getJsonValue(): the raw value is NOT an Integer Object=" + rawValue.toString());
+ return 0;
+ }
+ }
+ } catch (Exception e) {
+ msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
+ }
+ return 0;
+ }
+
+ /**
+ * Invokes the getJsonParamValue() method to obtain the JSONArray associated with
+ * the specified keys. The JSONArray is then walked to retrieve the first array
+ * value associated with the specified field name (index=0).
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @param name field name for the param to be retrieved
+ * @return String param value associated with field name
+ */
+ public static String getJsonParamValue(String jsonStr, String keys, String name) {
+ return getJsonParamValue(jsonStr, keys, name, 0);
+ }
+
+ /**
+ * Invokes the getJsonRawValue() method to obtain the JSONArray associated with
+ * the specified keys. The JSONArray is then walked to retrieve the nth array
+ * value associated with the specified field name and index
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @param name field name for the param to be retrieved
+ * @param index the nth param associated with name starting at 0
+ * @return String param value associated with field name
+ */
+ public static String getJsonParamValue(String jsonStr, String keys, String name, int index) {
+// String isDebugLogEnabled = "true";
+ try {
+ Object rawValue = getJsonRawValue(jsonStr, keys);
+ if (rawValue == null) {
+ return null;
+ } else {
+ if (rawValue instanceof JSONArray) {
+ msoLogger.debug("getJsonParamValue(): keys=" + keys + " points to JSONArray: " + ((JSONArray) rawValue).toString());
+ int arrayLen = ((JSONArray) rawValue).length();
+ if (index < 0 || arrayLen < index+1) {
+ msoLogger.debug("getJsonParamValue(): index: " + index + " is out of bounds for array size of " + arrayLen);
+ return null;
+ }
+ int foundCnt = 0;
+ for (int i = 0; i < arrayLen; i++) {
+ msoLogger.debug("getJsonParamValue(): index: " + i + ", value: " + ((JSONArray) rawValue).get(i).toString());
+ if (((JSONArray) rawValue).get(i) instanceof JSONObject) {
+ msoLogger.debug("getJsonParamValue(): index: " + i + " is a JSONObject");
+ JSONObject jsonObj = (JSONObject)((JSONArray) rawValue).get(i);
+ String parmValue = jsonObj.get(name).toString();
+ if (parmValue != null) {
+ msoLogger.debug("getJsonParamValue(): found value: " + parmValue + " for name: " + name + " and index: " + i);
+ if (foundCnt == index) {
+ return parmValue;
+ } else {
+ foundCnt++;
+ continue;
+ }
+ } else {
+ continue;
+ }
+ } else {
+ msoLogger.debug("getJsonParamValue(): the JSONArray element is NOT a JSONObject=" + rawValue.toString());
+ return null;
+ }
+ }
+ msoLogger.debug("getJsonParamValue(): content value NOT found for name: " + name);
+ return null;
+ } else {
+ msoLogger.debug("getJsonParamValue(): the raw value is NOT a JSONArray Object=" + rawValue.toString());
+ return null;
+ }
+ }
+ } catch (JSONException je) {
+ // JSONObject::get() throws this exception if one of the specified keys is not found
+ msoLogger.debug("getJsonParamValue(): caught JSONException attempting to retrieve param value for keys:" + keys + ", name=" + name);
+ } catch (Exception e) {
+ msoLogger.debug("getJsonParamValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
+ }
+ return null;
+ }
+
+ /**
+ * Wrapper to generate the JSONObject to pass to the getJsonValueForKey(JSONObject, String)
+ * method so that recursion over the subobjects can be supported there
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param key key to the target value
+ * @return String field value associated with key
+ */
+ public static String getJsonValueForKey(String jsonStr, String key) {
+// String isDebugLogEnabled = "true";
+ try {
+ JSONObject jsonObj = new JSONObject(jsonStr);
+ if (jsonObj != null) {
+ return getJsonValueForKey(jsonObj, key);
+ }
+ } catch (Exception e) {
+ msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());
+ }
+ return null;
+ }
+
+ /**
+ * Walks the JSONObject (and sub-objects recursively), searching for the first value associated with the
+ * single key/field name specified. Returns the associated value if found or null if the key is not found
+ *
+ * @param jsonObj JSONObject representation of the the JSON doc
+ * @param key key to the target value
+ * @return String field value associated with key
+ */
+ public static String getJsonValueForKey(JSONObject jsonObj, String key) {
+// String isDebugLogEnabled = "true";
+ String keyValue = null;
+ try {
+ if (jsonObj.has(key)) {
+ msoLogger.debug("getJsonValueForKey(): found value for key=" + key);
+ return ((String) jsonObj.get(key));
+ } else {
+ msoLogger.debug("getJsonValueForKey(): iterating over the keys");
+ Iterator <String> itr = jsonObj.keys();
+ while (itr.hasNext()) {
+ String nextKey = (String) itr.next();
+ Object obj = jsonObj.get(nextKey);
+ if (obj instanceof JSONObject) {
+ msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");
+ keyValue = getJsonValueForKey((JSONObject) obj, key);
+ if (keyValue != null) {
+ msoLogger.debug("getJsonValueForKey(): found value=" + keyValue + ", for key=" + key);
+ break;
+ }
+ } else {
+ msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", does not point to a JSONObject, next key");
+ }
+ }
+ }
+ } catch (JSONException je) {
+ // JSONObject::get() throws this exception if one of the specified keys is not found
+ msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key);
+ keyValue = null;
+ } catch (Exception e) {
+ msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());
+ }
+ return keyValue;
+ }
+
+ /**
+ * Walks the JSONObject (and sub-objects recursively), searching for the first value associated with the
+ * single key/field name specified. Returns the associated value if found or null if the key is not found
+ *
+ * @param jsonObj JSONObject representation of the the JSON doc
+ * @param key key to the target value
+ * @return String field value associated with key
+ */
+ public static Integer getJsonIntValueForKey(JSONObject jsonObj, String key) {
+// String isDebugLogEnabled = "true";
+ Integer keyValue = 0;
+ try {
+ if (jsonObj.has(key)) {
+ msoLogger.debug("getJsonValueForKey(): found value for key=" + key);
+ return ((Integer) jsonObj.get(key));
+ } else {
+ msoLogger.debug("getJsonValueForKey(): iterating over the keys");
+ Iterator <String> itr = jsonObj.keys();
+ while (itr.hasNext()) {
+ String nextKey = (String) itr.next();
+ Object obj = jsonObj.get(nextKey);
+ if (obj instanceof JSONObject) {
+ msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");
+ keyValue = getJsonIntValueForKey((JSONObject) obj, key);
+ if (keyValue != null) {
+ msoLogger.debug("getJsonValueForKey(): found value=" + keyValue + ", for key=" + key);
+ break;
+ }
+ } else {
+ msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", does not point to a JSONObject, next key");
+ }
+ }
+ }
+ } catch (JSONException je) {
+ // JSONObject::get() throws this exception if one of the specified keys is not found
+ msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key);
+ keyValue = null;
+ } catch (Exception e) {
+ msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());
+ }
+ return keyValue;
+ }
+
+ /**
+ * Boolean method to determine if a key path is valid for the JSON doc. Invokes
+ * getJsonValue().
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @return Boolean true if keys points to value in the JSON doc
+ */
+ public static Boolean jsonValueExists(String jsonStr, String keys) {
+ if (getJsonRawValue(jsonStr, keys) == null) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Inserts the new key/value pair at the appropriate location in the JSON
+ * document after first determining if keyed field already exists. If
+ * it does exist, return the JSON unmodified, otherwise return the new JSON
+ * Note: this method currently only supports String value inserts.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the value to be added in the format of "key1.key2.key3..."
+ * @return String containing the updated JSON doc
+ */
+ public static String addJsonValue(String jsonStr, String keys, String value) {
+// String isDebugLogEnabled = "true";
+ // only attempt to insert the key/value pair if it does not exist
+ if (!jsonValueExists(jsonStr, keys)) {
+ return putJsonValue(jsonStr, keys, value);
+ } else {
+ msoLogger.debug("addJsonValue(): JSON add failed, key=" + keys + "/value=" + (String) value + " already exists");
+ return jsonStr;
+ }
+ }
+
+ /**
+ * Updates the value for the specified key in the JSON document
+ * after first determining if keyed field exists. If it does
+ * not exist, return the JSON unmodified, otherwise return the updated JSON.
+ * Note: this method currently only supports String value updates.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the value to be updated in the format of "key1.key2.key3..."
+ * @return String containing the updated JSON doc
+ */
+ public static String updJsonValue(String jsonStr, String keys, String newValue) {
+// String isDebugLogEnabled = "true";
+ // only attempt to modify the key/value pair if it exists
+ if (jsonValueExists(jsonStr, keys)) {
+ return putJsonValue(jsonStr, keys, newValue);
+ } else {
+ msoLogger.debug("updJsonValue(): JSON update failed, no value exists for key=" + keys);
+ return jsonStr;
+ }
+ }
+
+ /**
+ * Deletes the value for the specified key in the JSON document
+ * after first determining if keyed field exists. If it does
+ * not exist, return the JSON unmodified, otherwise return the updated JSON
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the value to be deleted in the format of "key1.key2.key3..."
+ * @return String containing the updated JSON doc
+ */
+ public static String delJsonValue(String jsonStr, String keys) {
+// String isDebugLogEnabled = "true";
+ // only attempt to remove the key/value pair if it exists
+ if (jsonValueExists(jsonStr, keys)) {
+ // passing a null value results in a delete
+ return putJsonValue(jsonStr, keys, null);
+ } else {
+ msoLogger.debug("delJsonValue(): JSON delete failed, no value exists for key=" + keys);
+ return jsonStr;
+ }
+ }
+
+ /**
+ * Walks the JSON doc using the full key path to retrieve the associated
+ * value. All but the last key points to the 'parent' object name(s) in order
+ * in the JSON hierarchy with the last key pointing to the target value.
+ * The value returned is a Java object.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @return Object field value associated with keys
+ */
+ private static Object getJsonRawValue(String jsonStr, String keys) {
+ return getJsonRawValue(jsonStr, keys, false);
+ }
+
+ /**
+ * Walks the JSON doc using the full key path to retrieve the associated
+ * value. All but the last key points to the 'parent' object name(s) in order
+ * in the JSON hierarchy with the last key pointing to the target value.
+ * The value returned is a Java object.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * * @param wrap Boolean which determines if returned JSONObjects sould be "wrapped"
+ * Note: wrap does not apply to returned scalar values
+ * @return Object field value associated with keys
+ */
+ private static Object getJsonRawValue(String jsonStr, String keys, Boolean wrap) {
+// String isDebugLogEnabled = "true";
+ String keyStr = "";
+ try {
+ JSONObject jsonObj = new JSONObject(jsonStr);
+ StringTokenizer keyTokens = new StringTokenizer(keys, ".");
+ while (keyTokens.hasMoreElements()) {
+ keyStr = keyTokens.nextToken();
+ Object keyValue = jsonObj.get(keyStr);
+ if (keyValue instanceof JSONObject) {
+ msoLogger.debug("getJsonRawValue(): key=" + keyStr + " points to json object");
+ jsonObj = (JSONObject) keyValue;
+ } else {
+ if (keyTokens.hasMoreElements()) {
+ msoLogger.debug("getJsonRawValue(): value found prior to last key for key=" + keyStr);
+ }
+ return keyValue;
+ }
+ }
+ // return the json 'node' that the key points to
+ // note: since this is a json object and not a scalar value,
+ // use the wrap flag to determine if the object should
+ // be wrapped with a root node value
+ // (the last key in the keys String)
+ if (wrap) {
+ JSONObject wrappedJsonObj = new JSONObject();
+ wrappedJsonObj.put(keyStr, jsonObj);
+ return wrappedJsonObj.toString();
+ } else {
+ return jsonObj.toString();
+ }
+
+ } catch (JSONException je) {
+ // JSONObject::get() throws this exception if one of the specified keys is not found
+ msoLogger.debug("getJsonRawValue(): caught JSONException attempting to retrieve raw value for key=" + keyStr);
+ } catch (Exception e) {
+ msoLogger.debug("getJsonRawValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
+ }
+ return null;
+ }
+
+ /**
+ * Private method invoked by the public add, update, and delete methods.
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the value to be deleted in the format of "key1.key2.key3..."
+ * @return String containing the updated JSON doc
+ */
+ private static String putJsonValue(String jsonStr, String keys, String value) {
+// String isDebugLogEnabled = "true";
+ String keyStr = "";
+ try {
+ JSONObject jsonObj = new JSONObject(jsonStr);
+ JSONObject jsonObjOut = jsonObj;
+ StringTokenizer keyTokens = new StringTokenizer(keys, ".");
+ while (keyTokens.hasMoreElements()) {
+ keyStr = keyTokens.nextToken();
+ if (keyTokens.hasMoreElements()) {
+ Object keyValue = jsonObj.get(keyStr);
+ if (keyValue instanceof JSONObject) {
+ msoLogger.debug("putJsonValue(): key=" + keyStr + " points to json object");
+ jsonObj = (JSONObject) keyValue;
+ } else {
+ msoLogger.debug("putJsonValue(): key=" + keyStr + " not the last key but points to non-json object: " + (String) keyValue);
+ return null;
+ }
+ } else { // at the last/new key value
+ jsonObj.put(keyStr, value);
+ return jsonObjOut.toString(3);
+ }
+ }
+ // should not hit this point if the key points to a valid key value
+ return null;
+
+ } catch (JSONException je) {
+ // JSONObject::get() throws this exception if one of the specified keys is not found
+ msoLogger.debug("putJsonValue(): caught JSONException attempting to retrieve value for key=" + keyStr);
+ return null;
+ } catch (Exception e) {
+ msoLogger.debug("putJsonValue(): unable to parse json to put value for key=" + keys + ". Exception was: " + e.toString());
+ }
+ return null;
+ }
+
+ /**
+ * This json util method converts a json "Key" and "Value"
+ * entry Array to a Java map.
+ *
+ * @param execution
+ * @param entryArray - the json value of the entry Array
+ *
+ * @return map - a Map containing the entries
+ *
+ */
+ public Map<String, String> entryArrayToMap(Execution execution, String entryArray) {
+ msoLogger.debug("Started Entry Array To Map Util Method");
+
+ Map<String, String> map = new HashMap<String, String>();
+
+ //Populate Map
+ String entryListJson = "{ \"entry\":" + entryArray + "}";
+ JSONObject obj = new JSONObject(entryListJson);
+ JSONArray arr = obj.getJSONArray("entry");
+ for (int i = 0; i < arr.length(); i++){
+ JSONObject jo = arr.getJSONObject(i);
+ String key = jo.getString("key");
+ String value =jo.getString("value");
+ map.put(key, value);
+ }
+ msoLogger.debug("Outgoing Map is: " + map);
+ msoLogger.debug("Completed Entry Array To Map Util Method");
+ return map;
+ }
+
+
+ /**
+ * Invokes the getJsonRawValue() method to determine if the
+ * json element/variable exist. Returns true if the
+ * json element exist
+ *
+ * @param jsonStr String containing the JSON doc
+ * @param keys full key path to the target value in the format of "key1.key2.key3..."
+ * @return boolean field value associated with keys
+ */
+ public static boolean jsonElementExist(String jsonStr, String keys) {
+
+ try {
+ Object rawValue = getJsonRawValue(jsonStr, keys);
+ if (rawValue == null) {
+ return false;
+ } else {
+ return true;
+ }
+ } catch (Exception e) {
+ msoLogger.debug("jsonElementExist(): unable to determine if json element exist. Exception is: " + e.toString());
+ }
+ return true;
+ }
+
+}
+
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index 8e3f254def..2453700bce 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -399,8 +399,8 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
MsoLogger.setServiceName("MSO." + prefix.substring(0,prefix.length()-1));
}
- String requestId = (String) execution.getVariable("att-mso-request-id");
- String svcid = (String) execution.getVariable("att-mso-service-instance-id");
+ String requestId = (String) execution.getVariable("mso-request-id");
+ String svcid = (String) execution.getVariable("mso-service-instance-id");
MsoLogger.setLogContext(requestId, svcid);
long startTime = startTimes.remove(id);
diff --git a/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml b/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml
index fd5d586278..274c859dd9 100644
--- a/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml
+++ b/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml
@@ -32,12 +32,12 @@
<select id="selectAll" resultMap="urnMapping">
select NAME_, VALUE_, REV_
- from ATT_URN_MAPPING
+ from MSO_URN_MAPPING
</select>
<select id="selectOne" resultMap="urnMapping">
select NAME_, VALUE_, REV_
- from ATT_URN_MAPPING
+ from MSO_URN_MAPPING
where name = #{name}
</select>
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java
deleted file mode 100644
index 71b9e089c3..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:35:04 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class BPMNLoggerESTest extends BPMNLoggerESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- BPMNLogger.debug("true", "<,A1M\"[ K3\\u");
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- BPMNLogger.debug("trud", (String) null);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- BPMNLogger bPMNLogger0 = new BPMNLogger();
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java
deleted file mode 100644
index 2449157b43..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:35:04 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class BPMNLoggerESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.BPMNLogger";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BPMNLoggerESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.logger.MsoLogger",
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.openecomp.mso.entity.MsoRequest",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "com.att.eelf.configuration.EELFLogger",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.openecomp.mso.bpmn.core.BPMNLogger",
- "com.att.eelf.i18n.EELFResourceManager"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(BPMNLoggerESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.bpmn.core.BPMNLogger"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java
deleted file mode 100644
index 113c819f8c..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:35:23 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class BadInjectedFieldExceptionESTest extends BadInjectedFieldExceptionESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- BadInjectedFieldException badInjectedFieldException0 = new BadInjectedFieldException("", "", "");
- BadInjectedFieldException badInjectedFieldException1 = new BadInjectedFieldException("y#,,", "4tX0!<", (Object) badInjectedFieldException0, (Throwable) badInjectedFieldException0);
- assertFalse(badInjectedFieldException1.equals((Object)badInjectedFieldException0));
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java
deleted file mode 100644
index 69ee3dcd48..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:35:23 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class BadInjectedFieldExceptionESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.BadInjectedFieldException";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BadInjectedFieldExceptionESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(BadInjectedFieldExceptionESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
index 6176029075..8a2b0a5578 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
@@ -18,6 +18,26 @@
* ============LICENSE_END=========================================================
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.bpmn.core;
import java.io.BufferedReader;
@@ -25,11 +45,11 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.nio.CharBuffer;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.xml.sax.SAXException;
import org.custommonkey.xmlunit.Diff;
@@ -42,214 +62,311 @@ import org.openecomp.mso.bpmn.core.xml.XmlTool;
*/
public class JsonUtilsTest {
- private static final String EOL = "\n";
- private String xmlReq =
- "<vnf-request xmlns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <request-id>DEV-VF-0021</request-id>" + EOL +
- " <action>CREATE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>" + EOL +
- " <is-base-module>true</is-base-module>" + EOL +
- " <persona-model-id>00000000-0000-0000-0000-000000000000</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <vnf-persona-model-id>999999999-0000-0000-0000-000000000000</vnf-persona-model-id>" + EOL +
- " <vnf-persona-model-version>1.5</vnf-persona-model-version>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " <asdc-service-model-version>1</asdc-service-model-version>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\">" + EOL +
- " <param name=\"network\">network1111</param>" + EOL +
- " <param name=\"server\">server1111</param>" + EOL +
- " </vnf-params> " + EOL +
- "</vnf-request>" + EOL;
-
- private String xmlReqNoAttrs =
- "<vnf-request xmlns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <action>DELETE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\"/>" + EOL +
- "</vnf-request>" + EOL;
-
- // JSON request w/ embedded XML will be read from a file
- private String jsonReq = null;
-
- @Before
- public void initialize() {
- File file = new File("src/test/resources/request.json");
- FileInputStream fis = null;
-
- try {
- fis = new FileInputStream(file);
- BufferedReader br = new BufferedReader(new InputStreamReader(fis));
- jsonReq = br.readLine();
- if (jsonReq != null) {
- System.out.println("initialize(): json request: " + jsonReq);
- } else {
- System.out.println("initialize(): failed to read json request from src/test/resources/request.json");
- }
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- if (fis != null)
- fis.close();
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- }
- }
-
- @After
- public void cleanup(){
- }
-
- @Test
- public void testConversion() {
- // Note: the current version of the JsonUtils.json2xml() method
- // does not support converting the JSONObject representation
- // of XML attributes (JSONArray) back to XML. So this test will
- // only succeed if the original XML does not contain attributes
-
- // save a copy of the xml with the namespaces removed
- String xmlIn = XmlTool.removeNamespaces(xmlReqNoAttrs);
- // strip all the whitespace
- xmlIn = xmlIn.replaceAll("\\s+","");
- String json = JsonUtils.xml2json(xmlReqNoAttrs);
- System.out.println("testConversion(): xml request to json: " + json);
- String xmlOut = JsonUtils.json2xml(json);
- System.out.println("testConversion(): json request back to xml: " + xmlOut);
-
- // strip all the whitespace
- xmlOut = xmlOut.replaceAll("\\s+","");
-// System.out.println("testConversion(): xml in: " + xmlIn);
-// System.out.println("testConversion(): xml out: " + xmlOut);
-
- Diff diffXml;
- try {
- diffXml = new Diff(xmlIn, xmlOut);
- Assert.assertTrue(diffXml.similar());
-// Assert.assertTrue(diffXml.identical());
- } catch (SAXException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieval() {
- String json = JsonUtils.xml2json(xmlReq);
- System.out.println("testRetrieval(): xml request to json: " + json);
- // full JSON path
- String value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.vnf-name");
- Assert.assertEquals(value, "STMTN5MMSC21");
- value = JsonUtils.getJsonValue(json, "vnf-request.request-info.action");
- Assert.assertEquals(value, "CREATE_VF_MODULE");
- // retrieving an integer
- value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.persona-model-version");
- Assert.assertEquals(value, "1");
- // retrieving a float
- value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.vnf-persona-model-version");
- Assert.assertEquals(value, "1.5");
- // retrieving a boolean
- value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.is-base-module");
- Assert.assertEquals(value, "true");
- // attempt to retrieve a value for a non-existent field
- value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.bad");
- Assert.assertEquals(value, null);
- // retrieving a parameter value (originally a XML attribute)
- value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "server");
-// Assert.assertEquals(value, "[{\"content\":\"network1111\",\"name\":\"network\"},{\"content\":\"server1111\",\"name\":\"server\"}]");
- Assert.assertEquals(value, "server1111");
- value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "badParam");
- Assert.assertEquals(value, null);
- // by field name/key
- value = JsonUtils.getJsonValueForKey(json, "source");
- Assert.assertEquals(value, "PORTAL");
- value = JsonUtils.getJsonValueForKey(json, "vnf-module");
- Assert.assertEquals(value, null);
- }
-
- @Test
- public void testUpdate() {
- String json = JsonUtils.xml2json(xmlReq);
- System.out.println("testUpdate(): xml request to json: " + json);
- // the add should be successful
- String jsonUpd = JsonUtils.addJsonValue(json, "vnf-request.request-info.comment", "Some comment");
-// System.out.println("testUpdate(): post add json request: " + jsonUpd);
- String value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.request-info.comment");
- Assert.assertEquals(value, "Some comment");
- // the add should be ignored as the field already exists
- jsonUpd = JsonUtils.addJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name", "STMTN5MMSC22");
- value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name");
- Assert.assertEquals(value, "STMTN5MMSC21");
- // the update should be successful
- jsonUpd = JsonUtils.updJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name", "STMTN5MMSC22");
-// System.out.println("testUpdate(): post update json request: " + jsonUpd);
- value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name");
- Assert.assertEquals(value, "STMTN5MMSC22");
- // the delete should be successful
- jsonUpd = JsonUtils.delJsonValue(jsonUpd, "vnf-request.request-info.comment");
-// System.out.println("testUpdate(): post delete json request: " + jsonUpd);
- value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.request-info.comment");
- Assert.assertEquals(value, null);
- // the delete should fail as field 'vnf-model' does not exist
- String jsonCur = jsonUpd;
- jsonUpd = JsonUtils.delJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-module");
- Assert.assertEquals(jsonCur, jsonUpd);
- }
-
- @Test
- public void testEmbededXmlRetrievalConversion() {
- try {
- // extract the embedded XML from the request
- String value = JsonUtils.getJsonValue(jsonReq, "variables.bpmnRequest.value");
- String xmlReq = XmlTool.removeNamespaces(XmlTool.normalize(value));
- System.out.println("testEmbededXmlRetrievalConversion(): xml payload: " + xmlReq);
- // strip all the whitespace
-// xmlIn = xmlIn.replaceAll("\\s+","");
- String json = JsonUtils.xml2json(xmlReq);
- System.out.println("testEmbededXmlRetrievalConversion(): xml request to json: " + json);
- String xmlOut = JsonUtils.json2xml(json);
- System.out.println("testEmbededXmlRetrievalConversion(): json request back to xml: " + xmlOut);
- Diff diffXml;
- try {
- // compare the XML before and after
- diffXml = new Diff(xmlReq, xmlOut);
- Assert.assertTrue(diffXml.similar());
- } catch (SAXException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+ private static final String EOL = "\n";
+ private String xmlReq =
+ "<vnf-request xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <request-id>DEV-VF-0021</request-id>" + EOL +
+ " <action>CREATE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>" + EOL +
+ " <is-base-module>true</is-base-module>" + EOL +
+ " <persona-model-id>00000000-0000-0000-0000-000000000000</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <vnf-persona-model-id>999999999-0000-0000-0000-000000000000</vnf-persona-model-id>" + EOL +
+ " <vnf-persona-model-version>1.5</vnf-persona-model-version>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " <asdc-service-model-version>1</asdc-service-model-version>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + EOL +
+ " <param name=\"network\">network1111</param>" + EOL +
+ " <param name=\"server\">server1111</param>" + EOL +
+ " </vnf-params> " + EOL +
+ "</vnf-request>" + EOL;
+
+ private String xmlReqNoAttrs =
+ "<vnf-request xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://org.openecomp/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ private String xmlArrayReq =
+ "<ucpeInfo>" + EOL +
+ " <outOfBandManagementModem>BROADBAND</outOfBandManagementModem>" + EOL +
+ " <internetTopology>IVLAN</internetTopology>" + EOL +
+ " <ucpeAliasHostName>SHELLUCPE31</ucpeAliasHostName>" + EOL +
+ " <wanList>" + EOL +
+ " <wanInfo>" + EOL +
+ " <wanType>AVPN</wanType>" + EOL +
+ " <interfaceType>1000BASE-T</interfaceType>" + EOL +
+ " <transportProviderName>ATT</transportProviderName>" + EOL +
+ " <circuitId>BT/SLIR/70911</circuitId>" + EOL +
+ " <dualMode>Active</dualMode>" + EOL +
+ " <wanPortNumber>WAN1</wanPortNumber>" + EOL +
+ " <transportManagementOption>ATT</transportManagementOption>" + EOL +
+ " <transportVendorTotalBandwidth>100</transportVendorTotalBandwidth>" + EOL +
+ " <mediaType>ELECTRICAL</mediaType>" + EOL +
+ " </wanInfo>" + EOL +
+ " <wanInfo>" + EOL +
+ " <wanType>AVPN</wanType>" + EOL +
+ " <interfaceType>10/100/1000BASE-T</interfaceType>" + EOL +
+ " <transportProviderName>ATT</transportProviderName>" + EOL +
+ " <circuitId>AS/KRFN/34611</circuitId>" + EOL +
+ " <dualMode>Active</dualMode>" + EOL +
+ " <wanPortNumber>WAN2</wanPortNumber>" + EOL +
+ " <transportManagementOption>ATT</transportManagementOption>" + EOL +
+ " <transportVendorTotalBandwidth>10000</transportVendorTotalBandwidth>" + EOL +
+ " <mediaType>MMF</mediaType>" + EOL +
+ " </wanInfo>" + EOL +
+ " </wanList>" + EOL +
+ " <ucpeActivationCode>ASD-987-M31</ucpeActivationCode>" + EOL +
+ " <ucpeHostName>USOSTCDALTX0101UJZZ31</ucpeHostName>" + EOL +
+ " <ucpePartNumber>FG-VM00*</ucpePartNumber>" + EOL +
+ "</ucpeInfo>";
+
+ // JSON request w/ embedded XML will be read from a file
+ private String jsonReq = null;
+ private String jsonReqArray = null;
+
+ @Before
+ public void initialize() {
+ File file = new File("src/test/resources/request.json");
+ File file2 = new File("src/test/resources/requestArray.json");
+ FileInputStream fis = null;
+
+ try {
+ fis = new FileInputStream(file);
+ BufferedReader br = new BufferedReader(new InputStreamReader(fis));
+// jsonReq = br.readLine();
+ CharBuffer cbuf = CharBuffer.allocate((int)file.length()+1);
+ br.read(cbuf);
+ cbuf.flip();
+ jsonReq = cbuf.toString();
+ if (jsonReq != null) {
+ System.out.println("initialize(): json request: " + jsonReq);
+ } else {
+ System.out.println("initialize(): failed to read json request from src/test/resources/request.json");
+ }
+ fis.close();
+ fis = new FileInputStream(file2);
+ br = new BufferedReader(new InputStreamReader(fis));
+// jsonReqArray = br.readLine();
+ cbuf = CharBuffer.allocate((int)file.length()+1);
+ br.read(cbuf);
+ cbuf.flip();
+ jsonReqArray = cbuf.toString();
+ if (jsonReq != null) {
+ System.out.println("initialize(): json request w/ array: " + jsonReqArray);
+ } else {
+ System.out.println("initialize(): failed to read json request from src/test/resources/request2.json");
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ if (fis != null)
+ fis.close();
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ @After
+ public void cleanup(){
+ }
+
+ @Test
+// @Ignore
+ public void testConversion() {
+ // Note: the current version of the JsonUtils.json2xml() method
+ // does not support converting the JSONObject representation
+ // of XML attributes (JSONArray) back to XML. So this test will
+ // only succeed if the original XML does not contain attributes
+
+ // save a copy of the xml with the namespaces removed
+ String xmlIn = XmlTool.removeNamespaces(xmlReqNoAttrs);
+ // strip all the non-data whitespace
+ xmlIn = xmlIn.replaceAll(">\\s*<", "><");
+ String json = JsonUtils.xml2json(xmlReqNoAttrs);
+ System.out.println("testConversion(): xml request to json: " + json);
+ String xmlOut = JsonUtils.json2xml(json);
+ System.out.println("testConversion(): json request back to xml: " + xmlOut);
+
+ // strip all the non-data whitespace
+ xmlOut = xmlOut.replaceAll(">\\s*<", "><");
+// System.out.println("testConversion(): xml in: " + xmlIn);
+// System.out.println("testConversion(): xml out: " + xmlOut);
+
+ Diff diffXml;
+ try {
+ diffXml = new Diff(xmlIn, xmlOut);
+ Assert.assertTrue(diffXml.similar());
+// Assert.assertTrue(diffXml.identical());
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+// @Ignore
+ public void testRetrieval() {
+ String json = JsonUtils.xml2json(xmlReq);
+ System.out.println("testRetrieval(): xml request to json: " + json);
+ // full JSON path
+ String value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.vnf-name");
+ Assert.assertEquals(value, "STMTN5MMSC21");
+ value = JsonUtils.getJsonValue(json, "vnf-request.request-info.action");
+ Assert.assertEquals(value, "CREATE_VF_MODULE");
+ // retrieving an integer
+ value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.persona-model-version");
+ Assert.assertEquals(value, "1");
+ // retrieving a float
+ value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.vnf-persona-model-version");
+ Assert.assertEquals(value, "1.5");
+ // retrieving a boolean
+ value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.is-base-module");
+ Assert.assertEquals(value, "true");
+ // attempt to retrieve a value for a non-existent field
+ value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.bad");
+ Assert.assertEquals(value, null);
+ // retrieving a parameter/array value (originally a XML attribute)
+ value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "name");
+// Assert.assertEquals(value, "[{\"content\":\"network1111\",\"name\":\"network\"},{\"content\":\"server1111\",\"name\":\"server\"}]");
+ Assert.assertEquals(value, "network");
+ value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "content");
+ Assert.assertEquals(value, "network1111");
+ // retrieving a parameter/array value by index
+ value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "content", 1);
+ Assert.assertEquals(value, "server1111");
+ value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "name", 1);
+ Assert.assertEquals(value, "server");
+ // failure due to invalid parameter name
+ value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "badParam");
+ Assert.assertEquals(value, null);
+ // failure due to array index out of bounds
+ value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "name", 2);
+ Assert.assertEquals(value, null);
+ // by field name/key
+ value = JsonUtils.getJsonValueForKey(json, "source");
+ Assert.assertEquals(value, "PORTAL");
+ value = JsonUtils.getJsonValueForKey(json, "vnf-module");
+ Assert.assertEquals(value, null);
+ }
+
+ @Test
+// @Ignore
+ public void testUpdate() {
+ String json = JsonUtils.xml2json(xmlReq);
+ System.out.println("testUpdate(): xml request to json: " + json);
+ // the add should be successful
+ String jsonUpd = JsonUtils.addJsonValue(json, "vnf-request.request-info.comment", "Some comment");
+// System.out.println("testUpdate(): post add json request: " + jsonUpd);
+ String value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.request-info.comment");
+ Assert.assertEquals(value, "Some comment");
+ // the add should be ignored as the field already exists
+ jsonUpd = JsonUtils.addJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name", "STMTN5MMSC22");
+ value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name");
+ Assert.assertEquals(value, "STMTN5MMSC21");
+ // the update should be successful
+ jsonUpd = JsonUtils.updJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name", "STMTN5MMSC22");
+// System.out.println("testUpdate(): post update json request: " + jsonUpd);
+ value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name");
+ Assert.assertEquals(value, "STMTN5MMSC22");
+ // the delete should be successful
+ jsonUpd = JsonUtils.delJsonValue(jsonUpd, "vnf-request.request-info.comment");
+// System.out.println("testUpdate(): post delete json request: " + jsonUpd);
+ value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.request-info.comment");
+ Assert.assertEquals(value, null);
+ // the delete should fail as field 'vnf-model' does not exist
+ String jsonCur = jsonUpd;
+ jsonUpd = JsonUtils.delJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-module");
+ Assert.assertEquals(jsonCur, jsonUpd);
+ }
+
+ @Test
+// @Ignore
+ public void testEmbededXmlRetrievalConversion() {
+ try {
+ // extract the embedded XML from the request
+ String value = JsonUtils.getJsonValue(jsonReq, "variables.bpmnRequest.value");
+ String xmlReq = XmlTool.removeNamespaces(XmlTool.normalize(value));
+ System.out.println("testEmbededXmlRetrievalConversion(): xml payload: " + xmlReq);
+ String json = JsonUtils.xml2json(xmlReq);
+ System.out.println("testEmbededXmlRetrievalConversion(): xml request to json: " + json);
+ String xmlOut = JsonUtils.json2xml(json);
+ System.out.println("testEmbededXmlRetrievalConversion(): json request back to xml: " + xmlOut);
+ Diff diffXml;
+ try {
+ // compare the XML before and after
+ diffXml = new Diff(xmlReq, xmlOut);
+ Assert.assertTrue(diffXml.similar());
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+// @Ignore
+ // Tests the conversion of a JSON Doc containing a JSON Array to XML
+ public void testConversionArray() {
+ try {
+ String jsonParm = JsonUtils.getJsonNodeValue(jsonReqArray, "requestDetails.requestParameters.ucpeInfo");
+ System.out.println("testConversionArray(): json value: " + JsonUtils.prettyJson(jsonParm));
+ String xmlOut = JsonUtils.json2xml(jsonParm);
+ System.out.println("testConversionArray(): json parameters to xml: " + xmlOut);
+ // strip all the non-data whitespace
+ xmlOut = xmlOut.replaceAll(">\\s*<", "><");
+ System.out.println("testConversionArray(): XML after removing whitespace:" + xmlOut);
+ String xmlTest = xmlArrayReq.replaceAll(">\\s*<", "><");
+// System.out.println("testConversion(): xml test: " + xmlTest);
+// System.out.println("testConversion(): xml out: " + xmlOut);
+
+ Diff diffXml;
+ try {
+ diffXml = new Diff(xmlTest, xmlOut);
+ Assert.assertTrue(diffXml.similar());
+// Assert.assertTrue(diffXml.identical());
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java
deleted file mode 100644
index 70e505095e..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:29:34 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class LogTaskESTest extends LogTaskESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- LogTask logTask0 = null;
- try {
- logTask0 = new LogTask();
- fail("Expecting exception: NoClassDefFoundError");
-
- } catch(NoClassDefFoundError e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- ExecutionImpl executionImpl0 = new ExecutionImpl();
- LogTask logTask0 = null;
- try {
- logTask0 = new LogTask();
- fail("Expecting exception: NoClassDefFoundError");
-
- } catch(NoClassDefFoundError e) {
- }
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java
deleted file mode 100644
index ab7ee56884..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:29:34 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class LogTaskESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.LogTask";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(LogTaskESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.engine.impl.persistence.entity.IdentityLinkEntity",
- "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
- "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
- "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
- "org.camunda.bpm.engine.impl.pvm.PvmScope",
- "org.camunda.bpm.engine.delegate.JavaDelegate",
- "org.camunda.bpm.engine.runtime.ProcessInstance",
- "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
- "org.camunda.bpm.application.ProcessApplicationReference",
- "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
- "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
- "org.camunda.bpm.engine.delegate.DelegateExecution",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration",
- "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
- "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
- "com.att.eelf.i18n.EELFMsgs",
- "org.camunda.bpm.engine.impl.javax.el.ELContext",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
- "org.camunda.bpm.engine.variable.type.ValueType",
- "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
- "org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
- "org.camunda.bpm.engine.repository.CaseDefinition",
- "org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity",
- "org.camunda.bpm.engine.impl.db.HasDbRevision",
- "org.camunda.bpm.model.bpmn.instance.FlowElement",
- "org.camunda.bpm.engine.delegate.Expression",
- "org.camunda.bpm.engine.variable.type.SerializableValueType",
- "org.camunda.bpm.engine.impl.pvm.PvmActivity",
- "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
- "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
- "org.camunda.bpm.model.cmmn.instance.CmmnModelElementInstance",
- "org.camunda.bpm.engine.impl.pvm.PvmException",
- "org.camunda.bpm.engine.task.DelegationState",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "org.camunda.bpm.application.ProcessApplicationUnavailableException",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
- "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration",
- "org.camunda.bpm.engine.runtime.CaseExecution",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
- "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
- "org.camunda.bpm.engine.repository.ProcessDefinition",
- "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
- "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.camunda.bpm.engine.task.IdentityLink",
- "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
- "org.camunda.bpm.engine.delegate.DelegateTask",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
- "org.camunda.bpm.engine.impl.core.model.CoreActivity",
- "org.camunda.bpm.model.bpmn.BpmnModelInstance",
- "org.camunda.bpm.engine.delegate.VariableScope",
- "org.camunda.bpm.engine.ProcessEngine",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
- "org.camunda.bpm.engine.impl.interceptor.CommandContext",
- "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
- "org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.camunda.bpm.engine.BadUserRequestException",
- "org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity",
- "org.camunda.bpm.engine.impl.context.ExecutionContext",
- "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.authorization.Authorization",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "org.camunda.bpm.engine.runtime.Execution",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "org.camunda.bpm.engine.impl.pvm.process.Lane",
- "org.camunda.bpm.engine.impl.pvm.process.ParticipantProcess",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
- "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
- "org.camunda.bpm.engine.ProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
- "org.camunda.bpm.engine.impl.util.BitMaskUtil",
- "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
- "org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
- "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
- "org.camunda.bpm.engine.impl.pvm.PvmExecution",
- "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
- "org.camunda.bpm.engine.runtime.VariableInstance",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
- "org.camunda.bpm.engine.runtime.Job",
- "org.camunda.bpm.engine.runtime.Incident",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState$CaseExecutionStateImpl",
- "org.camunda.bpm.model.xml.ModelInstance",
- "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
- "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
- "org.openecomp.mso.entity.MsoRequest",
- "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "org.camunda.bpm.model.bpmn.instance.UserTask",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
- "org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation",
- "org.camunda.bpm.engine.impl.task.TaskDecorator",
- "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
- "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
- "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
- "org.camunda.bpm.model.xml.instance.ModelElementInstance",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
- "org.camunda.bpm.engine.impl.db.DbEntity",
- "org.camunda.bpm.model.bpmn.instance.InteractionNode",
- "org.camunda.bpm.engine.impl.task.TaskDefinition",
- "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
- "org.camunda.bpm.engine.runtime.EventSubscription",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
- "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
- "org.camunda.bpm.model.bpmn.instance.Activity",
- "org.camunda.bpm.engine.management.JobDefinition",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior",
- "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
- "org.camunda.bpm.engine.impl.javax.el.ValueReference",
- "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
- "org.camunda.bpm.engine.impl.persistence.entity.ByteArrayEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
- "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
- "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
- "com.att.eelf.configuration.EELFLogger",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireProcessStart",
- "org.camunda.bpm.engine.runtime.CaseInstance",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
- "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
- "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
- "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseSentryPartImpl",
- "org.camunda.bpm.engine.variable.value.TypedValue",
- "org.openecomp.mso.logger.MsoAlarmLogger",
- "org.apache.ibatis.transaction.TransactionFactory",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnSentryPart",
- "org.camunda.bpm.engine.impl.pvm.process.LaneSet",
- "org.camunda.bpm.engine.delegate.DelegateListener",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
- "org.camunda.bpm.engine.impl.persistence.entity.TaskEntityVariableStore",
- "org.camunda.bpm.engine.delegate.ExecutionListener",
- "org.camunda.bpm.engine.exception.NotAllowedException",
- "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "org.openecomp.mso.bpmn.core.LogTask",
- "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.camunda.bpm.engine.task.Task",
- "org.camunda.bpm.engine.impl.javax.el.Expression",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmEventAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
- "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
- "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
- "org.camunda.bpm.model.bpmn.instance.FlowNode",
- "org.openecomp.mso.logger.MsoLogger",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "org.camunda.bpm.model.cmmn.CmmnModelInstance",
- "org.camunda.bpm.model.bpmn.instance.Task",
- "org.camunda.bpm.engine.variable.VariableMap",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
- "org.camunda.bpm.model.bpmn.instance.BaseElement",
- "org.camunda.bpm.engine.exception.NullValueException",
- "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
- "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
- "org.openecomp.mso.bpmn.core.BaseTask",
- "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
- "org.apache.ibatis.session.SqlSessionFactory",
- "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
- "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.camunda.bpm.engine.impl.el.FixedValue",
- "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.camunda.bpm.engine.SuspendedEntityInteractionException",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.camunda.bpm.engine.impl.db.HasDbReferences",
- "org.camunda.bpm.engine.impl.tree.Collector",
- "com.att.eelf.configuration.EELFManager",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
- "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
- "org.camunda.bpm.engine.impl.el.Expression",
- "org.camunda.bpm.engine.impl.pvm.PvmTransition",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.model.cmmn.instance.CmmnElement",
- "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart",
- "org.camunda.bpm.engine.impl.jobexecutor.JobHandler",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
- "org.camunda.bpm.engine.variable.type.PrimitiveValueType",
- "org.camunda.bpm.engine.delegate.VariableListener",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(LogTaskESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.impl.javax.el.Expression",
- "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
- "org.camunda.bpm.engine.impl.core.model.CoreActivity",
- "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "org.camunda.bpm.engine.impl.pvm.PvmException",
- "org.camunda.bpm.engine.exception.NullValueException",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
- "org.camunda.bpm.engine.impl.util.BitMaskUtil",
- "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
- "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
- "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
- "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.logger.MsoAlarmLogger",
- "org.openecomp.mso.bpmn.core.LogTask"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java
deleted file mode 100644
index f62d6afaf0..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:35:52 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class MissingInjectedFieldExceptionESTest extends MissingInjectedFieldExceptionESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- MissingInjectedFieldException missingInjectedFieldException0 = new MissingInjectedFieldException("", "");
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java
deleted file mode 100644
index 03cb94f4e6..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:35:52 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MissingInjectedFieldExceptionESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.MissingInjectedFieldException";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MissingInjectedFieldExceptionESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MissingInjectedFieldExceptionESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
index ff92355b8a..fa0f8d8dd8 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
@@ -18,6 +18,26 @@
* ============LICENSE_END=========================================================
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.bpmn.core;
import java.io.IOException;
@@ -31,7 +51,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import org.openecomp.mso.bpmn.test.PropertyConfigurationSetup;
public class PropertyConfigurationTest {
@Before
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java
deleted file mode 100644
index 6422685f92..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:29:36 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.camunda.bpm.engine.delegate.Expression;
-import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ReadConfigTaskESTest extends ReadConfigTaskESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- ReadConfigTask readConfigTask0 = new ReadConfigTask();
- ExecutionImpl executionImpl0 = new ExecutionImpl();
- Expression expression0 = mock(Expression.class, new ViolatedAssumptionAnswer());
- doReturn((Object) null).when(expression0).getValue(any(org.camunda.bpm.engine.delegate.VariableScope.class));
- PrivateAccess.setVariable((Class<ReadConfigTask>) ReadConfigTask.class, readConfigTask0, "propertiesFile", (Object) expression0);
- try {
- readConfigTask0.execute(executionImpl0);
- fail("Expecting exception: RuntimeException");
-
- } catch(RuntimeException e) {
- //
- // ReadConfigTask injected field 'propertiesFile' is bad: required field has null value
- //
- verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- ReadConfigTask readConfigTask0 = new ReadConfigTask();
- ExecutionImpl executionImpl0 = new ExecutionImpl();
- try {
- readConfigTask0.execute(executionImpl0);
- fail("Expecting exception: RuntimeException");
-
- } catch(RuntimeException e) {
- //
- // ReadConfigTask injected field 'propertiesFile' is bad: missing required field
- //
- verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
- }
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java
deleted file mode 100644
index c134c9cca9..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:29:36 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ReadConfigTaskESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.ReadConfigTask";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ReadConfigTaskESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
- "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
- "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
- "org.camunda.bpm.engine.impl.pvm.PvmScope",
- "org.camunda.bpm.engine.delegate.JavaDelegate",
- "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
- "org.camunda.bpm.engine.runtime.ProcessInstance",
- "org.camunda.bpm.application.ProcessApplicationReference",
- "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
- "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
- "org.camunda.bpm.engine.delegate.DelegateExecution",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration",
- "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
- "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
- "com.att.eelf.i18n.EELFMsgs",
- "org.camunda.bpm.engine.impl.javax.el.ELContext",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceStart",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
- "org.camunda.bpm.engine.variable.type.ValueType",
- "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
- "org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationInterruptScope",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
- "org.camunda.bpm.engine.repository.CaseDefinition",
- "org.camunda.bpm.engine.impl.db.HasDbRevision",
- "org.camunda.bpm.model.bpmn.instance.FlowElement",
- "org.camunda.bpm.engine.delegate.Expression",
- "org.camunda.bpm.engine.variable.type.SerializableValueType",
- "org.camunda.bpm.engine.impl.pvm.PvmActivity",
- "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
- "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
- "org.camunda.bpm.model.cmmn.instance.CmmnModelElementInstance",
- "org.camunda.bpm.engine.impl.pvm.PvmException",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "org.camunda.bpm.application.ProcessApplicationUnavailableException",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
- "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityNotifyListenerEnd",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration",
- "org.camunda.bpm.engine.runtime.CaseExecution",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
- "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
- "org.camunda.bpm.engine.repository.ProcessDefinition",
- "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartConcurrent",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmAtomicOperationTransitionNotifyListenerTake",
- "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
- "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
- "org.camunda.bpm.engine.delegate.DelegateTask",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
- "org.camunda.bpm.engine.impl.core.model.CoreActivity",
- "org.camunda.bpm.model.bpmn.BpmnModelInstance",
- "org.camunda.bpm.engine.delegate.VariableScope",
- "org.camunda.bpm.engine.ProcessEngine",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
- "org.camunda.bpm.engine.impl.interceptor.CommandContext",
- "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.camunda.bpm.engine.BadUserRequestException",
- "org.camunda.bpm.engine.impl.context.ExecutionContext",
- "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "org.camunda.bpm.engine.runtime.Execution",
- "org.camunda.bpm.engine.impl.pvm.process.Lane",
- "org.camunda.bpm.engine.impl.pvm.process.ParticipantProcess",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
- "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
- "org.camunda.bpm.engine.ProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
- "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
- "org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
- "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
- "org.camunda.bpm.engine.impl.pvm.PvmExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCreateScope",
- "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
- "org.camunda.bpm.engine.runtime.VariableInstance",
- "org.camunda.bpm.engine.runtime.Job",
- "org.camunda.bpm.engine.runtime.Incident",
- "org.camunda.bpm.model.xml.ModelInstance",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStart",
- "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
- "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
- "org.openecomp.mso.entity.MsoRequest",
- "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
- "org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation",
- "org.camunda.bpm.engine.impl.task.TaskDecorator",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStackNotifyListenerStart",
- "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
- "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
- "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationsTransitionInterruptFlowScope",
- "org.camunda.bpm.model.xml.instance.ModelElementInstance",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
- "org.camunda.bpm.engine.impl.db.DbEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd",
- "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireActivityEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationStartTransitionNotifyListenerTake",
- "org.camunda.bpm.engine.runtime.EventSubscription",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
- "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
- "org.camunda.bpm.engine.management.JobDefinition",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior",
- "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
- "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
- "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
- "com.att.eelf.configuration.EELFLogger",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireProcessStart",
- "org.camunda.bpm.engine.runtime.CaseInstance",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
- "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
- "org.openecomp.mso.bpmn.core.ReadConfigTask",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
- "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
- "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
- "org.camunda.bpm.engine.variable.value.TypedValue",
- "org.apache.ibatis.transaction.TransactionFactory",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnSentryPart",
- "org.camunda.bpm.engine.impl.pvm.process.LaneSet",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStack",
- "org.camunda.bpm.engine.delegate.DelegateListener",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
- "org.camunda.bpm.engine.delegate.ExecutionListener",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascadeFireActivityEnd",
- "org.camunda.bpm.engine.exception.NotAllowedException",
- "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.camunda.bpm.engine.task.Task",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmEventAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascade",
- "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
- "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
- "org.openecomp.mso.logger.MsoLogger",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "org.camunda.bpm.engine.variable.VariableMap",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
- "org.camunda.bpm.model.bpmn.instance.BaseElement",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateConcurrentExecution",
- "org.camunda.bpm.engine.exception.NullValueException",
- "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
- "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
- "org.openecomp.mso.bpmn.core.BaseTask",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartInterruptEventScope",
- "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCancelScope",
- "org.apache.ibatis.session.SqlSessionFactory",
- "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
- "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
- "org.openecomp.mso.logger.MessageEnum",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.camunda.bpm.engine.SuspendedEntityInteractionException",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCancelActivity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.camunda.bpm.engine.impl.db.HasDbReferences",
- "org.camunda.bpm.engine.impl.tree.Collector",
- "com.att.eelf.configuration.EELFManager",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
- "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.PvmTransition",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.model.cmmn.instance.CmmnElement",
- "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
- "org.camunda.bpm.engine.variable.type.PrimitiveValueType",
- "org.camunda.bpm.engine.delegate.VariableListener",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ReadConfigTaskESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.bpmn.core.ReadConfigTask",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.camunda.bpm.engine.exception.NullValueException",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
- "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.PvmException",
- "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
- "org.camunda.bpm.engine.impl.core.model.CoreActivity",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
- "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
- "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java
deleted file mode 100644
index 741872af7a..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:30:51 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.camunda.bpm.engine.delegate.Expression;
-import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ReadFileTaskESTest extends ReadFileTaskESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- ReadFileTask readFileTask0 = new ReadFileTask();
- ExecutionImpl executionImpl0 = new ExecutionImpl();
- Expression expression0 = mock(Expression.class, new ViolatedAssumptionAnswer());
- doReturn((Object) null).when(expression0).getValue(any(org.camunda.bpm.engine.delegate.VariableScope.class));
- PrivateAccess.setVariable((Class<ReadFileTask>) ReadFileTask.class, readFileTask0, "inputVariable", (Object) expression0);
- try {
- readFileTask0.execute(executionImpl0);
- fail("Expecting exception: RuntimeException");
-
- } catch(RuntimeException e) {
- //
- // ReadFileTask injected field 'inputVariable' is bad: required field has null value
- //
- verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- ReadFileTask readFileTask0 = new ReadFileTask();
- ExecutionImpl executionImpl0 = new ExecutionImpl();
- try {
- readFileTask0.execute(executionImpl0);
- fail("Expecting exception: RuntimeException");
-
- } catch(RuntimeException e) {
- //
- // ReadFileTask injected field 'inputVariable' is bad: missing required field
- //
- verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
- }
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java
deleted file mode 100644
index 4b11c761cc..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:30:51 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ReadFileTaskESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.ReadFileTask";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ReadFileTaskESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
- "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
- "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
- "org.camunda.bpm.engine.impl.pvm.PvmScope",
- "org.camunda.bpm.engine.delegate.JavaDelegate",
- "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
- "org.camunda.bpm.engine.runtime.ProcessInstance",
- "org.camunda.bpm.application.ProcessApplicationReference",
- "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
- "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
- "org.openecomp.mso.bpmn.core.ReadFileTask",
- "org.camunda.bpm.engine.delegate.DelegateExecution",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration",
- "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
- "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
- "com.att.eelf.i18n.EELFMsgs",
- "org.camunda.bpm.engine.impl.javax.el.ELContext",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceStart",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
- "org.camunda.bpm.engine.variable.type.ValueType",
- "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
- "org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationInterruptScope",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
- "org.camunda.bpm.engine.impl.db.HasDbRevision",
- "org.camunda.bpm.model.bpmn.instance.FlowElement",
- "org.camunda.bpm.engine.delegate.Expression",
- "org.camunda.bpm.engine.variable.type.SerializableValueType",
- "org.camunda.bpm.engine.impl.pvm.PvmActivity",
- "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
- "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
- "org.camunda.bpm.model.cmmn.instance.CmmnModelElementInstance",
- "org.camunda.bpm.engine.impl.pvm.PvmException",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "org.camunda.bpm.application.ProcessApplicationUnavailableException",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
- "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityNotifyListenerEnd",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration",
- "org.camunda.bpm.engine.runtime.CaseExecution",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
- "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
- "org.camunda.bpm.engine.repository.ProcessDefinition",
- "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartConcurrent",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmAtomicOperationTransitionNotifyListenerTake",
- "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
- "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
- "org.camunda.bpm.engine.delegate.DelegateTask",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
- "org.camunda.bpm.engine.impl.core.model.CoreActivity",
- "org.camunda.bpm.model.bpmn.BpmnModelInstance",
- "org.camunda.bpm.engine.delegate.VariableScope",
- "org.camunda.bpm.engine.ProcessEngine",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
- "org.camunda.bpm.engine.impl.interceptor.CommandContext",
- "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.camunda.bpm.engine.BadUserRequestException",
- "org.camunda.bpm.engine.impl.context.ExecutionContext",
- "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "org.camunda.bpm.engine.runtime.Execution",
- "org.camunda.bpm.engine.impl.pvm.process.Lane",
- "org.camunda.bpm.engine.impl.pvm.process.ParticipantProcess",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
- "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
- "org.camunda.bpm.engine.ProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
- "org.camunda.bpm.engine.impl.util.BitMaskUtil",
- "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
- "org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
- "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
- "org.camunda.bpm.engine.impl.pvm.PvmExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCreateScope",
- "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
- "org.camunda.bpm.engine.runtime.VariableInstance",
- "org.camunda.bpm.engine.runtime.Job",
- "org.camunda.bpm.engine.runtime.Incident",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState$CaseExecutionStateImpl",
- "org.camunda.bpm.model.xml.ModelInstance",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStart",
- "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
- "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
- "org.openecomp.mso.entity.MsoRequest",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
- "org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation",
- "org.camunda.bpm.engine.impl.task.TaskDecorator",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStackNotifyListenerStart",
- "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
- "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
- "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationsTransitionInterruptFlowScope",
- "org.camunda.bpm.model.xml.instance.ModelElementInstance",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
- "org.camunda.bpm.engine.impl.db.DbEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd",
- "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireActivityEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationStartTransitionNotifyListenerTake",
- "org.camunda.bpm.engine.runtime.EventSubscription",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
- "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
- "org.camunda.bpm.engine.management.JobDefinition",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior",
- "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
- "org.camunda.bpm.engine.impl.javax.el.ValueReference",
- "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
- "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
- "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
- "com.att.eelf.configuration.EELFLogger",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireProcessStart",
- "org.camunda.bpm.engine.runtime.CaseInstance",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
- "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
- "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
- "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseSentryPartImpl",
- "org.camunda.bpm.engine.variable.value.TypedValue",
- "org.apache.ibatis.transaction.TransactionFactory",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnSentryPart",
- "org.camunda.bpm.engine.impl.pvm.process.LaneSet",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStack",
- "org.camunda.bpm.engine.delegate.DelegateListener",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
- "org.camunda.bpm.engine.delegate.ExecutionListener",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascadeFireActivityEnd",
- "org.camunda.bpm.engine.exception.NotAllowedException",
- "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.camunda.bpm.engine.task.Task",
- "org.camunda.bpm.engine.impl.javax.el.Expression",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmEventAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascade",
- "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
- "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
- "org.openecomp.mso.logger.MsoLogger",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "org.camunda.bpm.model.cmmn.CmmnModelInstance",
- "org.camunda.bpm.engine.variable.VariableMap",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
- "org.camunda.bpm.model.bpmn.instance.BaseElement",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateConcurrentExecution",
- "org.camunda.bpm.engine.exception.NullValueException",
- "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
- "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
- "org.openecomp.mso.bpmn.core.BaseTask",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartInterruptEventScope",
- "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCancelScope",
- "org.apache.ibatis.session.SqlSessionFactory",
- "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
- "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
- "org.openecomp.mso.logger.MessageEnum",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.camunda.bpm.engine.SuspendedEntityInteractionException",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCancelActivity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.camunda.bpm.engine.impl.db.HasDbReferences",
- "org.camunda.bpm.engine.impl.tree.Collector",
- "com.att.eelf.configuration.EELFManager",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
- "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.PvmTransition",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.model.cmmn.instance.CmmnElement",
- "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
- "org.camunda.bpm.engine.variable.type.PrimitiveValueType",
- "org.camunda.bpm.engine.delegate.VariableListener",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ReadFileTaskESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.bpmn.core.ReadFileTask",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.engine.impl.javax.el.Expression",
- "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.exception.NullValueException",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
- "org.camunda.bpm.engine.impl.core.model.CoreActivity",
- "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
- "org.camunda.bpm.engine.impl.pvm.PvmException",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1",
- "org.camunda.bpm.engine.impl.util.BitMaskUtil",
- "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
- "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java
deleted file mode 100644
index e26f5a9a46..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:33:44 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class RollbackDataESTest extends RollbackDataESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- rollbackData0.put("", "", "");
- String string0 = (String)rollbackData0.get("", "0-0|Ox?");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- Serializable serializable0 = rollbackData0.get("", "0-0|Ox?");
- assertNull(serializable0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- rollbackData0.put("", "", "");
- String string0 = (String)rollbackData0.get("", "");
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- HashMap<String, Object> hashMap0 = new HashMap<String, Object>();
- HashMap<Serializable, Integer> hashMap1 = new HashMap<Serializable, Integer>();
- hashMap0.put("/0H\"wnR=^l|l$+qQDi", hashMap1);
- PrivateAccess.setVariable((Class<RollbackData>) RollbackData.class, rollbackData0, "dictionary", (Object) hashMap0);
- Map<String, Serializable> map0 = rollbackData0.get("/0H\"wnR=^l|l$+qQDi");
- assertEquals(0, map0.size());
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- rollbackData0.put("RollbackData[]", "$", "RollbackData[]");
- Map<String, Serializable> map0 = rollbackData0.get("RollbackData[]");
- assertFalse(map0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- rollbackData0.put("org.openecomp.mso.bpmn.core.RollbackData", "org.openecomp.mso.bpmn.core.RollbackData", "!{=|?cluq? yk]).");
- rollbackData0.get("");
- PrivateAccess.setVariable((Class<RollbackData>) RollbackData.class, rollbackData0, "dictionary", (Object) null);
- // Undeclared exception!
- try {
- rollbackData0.get("org.openecomp.mso.bpmn.core.RollbackData");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.bpmn.core.RollbackData", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- rollbackData0.put("$", "$", "RollbackData[]");
- rollbackData0.put("RollbackData[]", "$", "RollbackData[]");
- String string0 = rollbackData0.toString();
- assertEquals("RollbackData[${$=RollbackData[]},RollbackData[]{$=RollbackData[]}]", string0);
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- rollbackData0.put("$", "$", "RollbackData[]");
- rollbackData0.put("$", "RollbackData[]", "RollbackData[]");
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- HashMap<String, Object> hashMap0 = new HashMap<String, Object>();
- HashMap<Serializable, Integer> hashMap1 = new HashMap<Serializable, Integer>();
- hashMap0.put("/0H\"wnR=^l|l$+qQDi", hashMap1);
- PrivateAccess.setVariable((Class<RollbackData>) RollbackData.class, rollbackData0, "dictionary", (Object) hashMap0);
- boolean boolean0 = rollbackData0.hasType("/0H\"wnR=^l|l$+qQDi");
- assertTrue(boolean0);
- }
-
- @Test(timeout = 4000)
- public void test9() throws Throwable {
- RollbackData rollbackData0 = new RollbackData();
- boolean boolean0 = rollbackData0.hasType("RollbackData[]");
- assertFalse(boolean0);
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java
deleted file mode 100644
index 7dc6ca1e4e..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:33:44 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class RollbackDataESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.RollbackData";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackDataESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.bpmn.core.RollbackData"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackDataESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.bpmn.core.RollbackData"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
index 3f2f74d2f7..a45f1fdba2 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
@@ -20,6 +20,8 @@
package org.openecomp.mso.bpmn.core;
+import static org.junit.Assert.assertNotNull;
+
import java.util.HashMap;
import java.util.Map;
@@ -33,8 +35,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.openecomp.mso.bpmn.test.CamundaDBSetup;
-import org.openecomp.mso.bpmn.test.PropertyConfigurationSetup;
import org.openecomp.mso.logger.MsoLogger;
/**
@@ -61,6 +61,7 @@ public class TestBaseTask {
variables.put("lastVisit", (Long)1438270117000L);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
+ assertNotNull(runtimeService);
processEngineRule.getTaskService();
runtimeService.startProcessInstanceByKey("BaseTaskTest", variables);
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java
deleted file mode 100644
index 64220f016d..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:35:51 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class URNMappingsTaskESTest extends URNMappingsTaskESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- URNMappingsTask uRNMappingsTask0 = new URNMappingsTask();
- DelegateExecution delegateExecution0 = mock(DelegateExecution.class, new ViolatedAssumptionAnswer());
- uRNMappingsTask0.execute(delegateExecution0);
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java
deleted file mode 100644
index 93151d3271..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:35:51 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class URNMappingsTaskESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.URNMappingsTask";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMappingsTaskESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
- "org.camunda.bpm.model.xml.instance.ModelElementInstance",
- "org.camunda.bpm.engine.delegate.VariableScope",
- "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
- "org.camunda.bpm.engine.variable.value.TypedValue",
- "org.camunda.bpm.engine.delegate.DelegateExecution",
- "org.camunda.bpm.engine.delegate.Expression",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
- "org.openecomp.mso.bpmn.core.URNMappingsTask",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "org.openecomp.mso.bpmn.core.BaseTask",
- "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
- "org.camunda.bpm.engine.variable.VariableMap",
- "org.camunda.bpm.engine.delegate.JavaDelegate",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "org.camunda.bpm.model.bpmn.BpmnModelInstance",
- "org.camunda.bpm.model.bpmn.instance.BaseElement",
- "org.camunda.bpm.model.xml.ModelInstance",
- "org.camunda.bpm.model.bpmn.instance.FlowElement"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMappingsTaskESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java
deleted file mode 100644
index 1891c8d478..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:35:37 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class WorkflowExceptionESTest extends WorkflowExceptionESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException("(YdK~.N3;c2C", 336, "(YdK~.N3;c2C");
- workflowException0.getProcessKey();
- assertEquals(336, workflowException0.getErrorCode());
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException("", 0, "");
- workflowException0.getProcessKey();
- assertEquals(0, workflowException0.getErrorCode());
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException((String) null, 0, "^Y:");
- String string0 = workflowException0.getErrorMessage();
- assertEquals(0, workflowException0.getErrorCode());
- assertNotNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException("", 1216, "");
- workflowException0.getErrorMessage();
- assertEquals(1216, workflowException0.getErrorCode());
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException("", 0, "");
- int int0 = workflowException0.getErrorCode();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException((String) null, (-1911), (String) null);
- int int0 = workflowException0.getErrorCode();
- assertEquals((-1911), int0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
- workflowException0.getErrorMessage();
- assertEquals(336, workflowException0.getErrorCode());
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
- int int0 = workflowException0.getErrorCode();
- assertEquals(336, int0);
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
- workflowException0.getProcessKey();
- assertEquals(336, workflowException0.getErrorCode());
- }
-
- @Test(timeout = 4000)
- public void test9() throws Throwable {
- WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
- String string0 = workflowException0.toString();
- assertEquals("WorkflowException[processKey=null,errorCode=336,errorMessage=null]", string0);
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java
deleted file mode 100644
index 88e0e0f96f..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:35:37 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class WorkflowExceptionESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.WorkflowException";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(WorkflowExceptionESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.bpmn.core.WorkflowException"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(WorkflowExceptionESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.bpmn.core.WorkflowException"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java
deleted file mode 100644
index a14934193e..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:28:14 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import java.io.IOException;
-import net.sf.saxon.s9api.XQueryCompiler;
-import net.sf.saxon.s9api.XQueryExecutable;
-import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class XQueryScriptTaskESTest extends XQueryScriptTaskESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
- XQueryCompiler xQueryCompiler0 = mock(XQueryCompiler.class, new ViolatedAssumptionAnswer());
- doReturn((XQueryExecutable) null).when(xQueryCompiler0).compile(any(java.io.InputStream.class));
- Object object0 = PrivateAccess.callMethod((Class<XQueryScriptTask>) XQueryScriptTask.class, xQueryScriptTask0, "compile", (Object) xQueryCompiler0, (Class<?>) XQueryCompiler.class, (Object) "", (Class<?>) String.class);
- assertNull(object0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
- XQueryCompiler xQueryCompiler0 = mock(XQueryCompiler.class, new ViolatedAssumptionAnswer());
- try {
- PrivateAccess.callMethod((Class<XQueryScriptTask>) XQueryScriptTask.class, xQueryScriptTask0, "compile", (Object) xQueryCompiler0, (Class<?>) XQueryCompiler.class, (Object) "Sk##N$V^.", (Class<?>) String.class);
- fail("Expecting exception: IOException");
-
- } catch(IOException e) {
- //
- // Resource not found: Sk##N$V^.
- //
- verifyException("org.openecomp.mso.bpmn.core.XQueryScriptTask", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
- try {
- PrivateAccess.callMethod((Class<XQueryScriptTask>) XQueryScriptTask.class, xQueryScriptTask0, "compile", (Object) null, (Class<?>) XQueryCompiler.class, (Object) "", (Class<?>) String.class);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.bpmn.core.XQueryScriptTask", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
- ExecutionImpl executionImpl0 = new ExecutionImpl();
- try {
- xQueryScriptTask0.execute(executionImpl0);
- fail("Expecting exception: RuntimeException");
-
- } catch(RuntimeException e) {
- //
- // XQueryScriptTask injected field 'scriptFile' is bad: missing required field
- //
- verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
- }
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java
deleted file mode 100644
index b0c1585e59..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:28:14 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class XQueryScriptTaskESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.XQueryScriptTask";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(XQueryScriptTaskESTestscaffolding.class.getClassLoader() ,
- "net.sf.saxon.pattern.PatternFinder",
- "net.sf.saxon.pattern.AnyNodeTest",
- "net.sf.saxon.tree.linked.TextImpl",
- "net.sf.saxon.tree.linked.ElementImpl",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
- "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
- "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
- "org.camunda.bpm.engine.impl.pvm.PvmScope",
- "net.sf.saxon.type.TypeHierarchy",
- "net.sf.saxon.trans.Mode",
- "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
- "org.camunda.bpm.engine.runtime.ProcessInstance",
- "net.sf.saxon.trans.CompilerInfo",
- "net.sf.saxon.type.ConversionResult",
- "net.sf.saxon.type.ItemType",
- "net.sf.saxon.om.NamePool",
- "net.sf.saxon.value.NumericValue",
- "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
- "net.sf.saxon.s9api.Processor",
- "net.sf.saxon.om.NameChecker",
- "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
- "net.sf.saxon.expr.sort.SimpleCollation",
- "net.sf.saxon.z.IntIterator",
- "net.sf.saxon.expr.PendingUpdateList",
- "net.sf.saxon.om.NamespaceBinding",
- "net.sf.saxon.lib.StaticQueryContextFactory",
- "net.sf.saxon.serialize.charcode.CharacterSet",
- "net.sf.saxon.event.Receiver",
- "org.camunda.bpm.model.bpmn.instance.FlowElement",
- "net.sf.saxon.om.AbstractItem",
- "net.sf.saxon.lib.ExternalObjectModel",
- "net.sf.saxon.event.LocationProvider",
- "org.camunda.bpm.engine.delegate.Expression",
- "net.sf.saxon.value.QualifiedNameValue",
- "net.sf.saxon.om.MutableDocumentInfo",
- "org.camunda.bpm.engine.impl.pvm.PvmActivity",
- "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
- "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
- "net.sf.saxon.pattern.NodeTest",
- "net.sf.saxon.om.NamespaceException",
- "net.sf.saxon.lib.EnvironmentVariableResolver",
- "org.camunda.bpm.application.ProcessApplicationUnavailableException",
- "net.sf.saxon.expr.instruct.Procedure",
- "net.sf.saxon.om.Sequence",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
- "net.sf.saxon.type.ValidationFailure",
- "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
- "net.sf.saxon.tree.iter.UnfailingIterator",
- "net.sf.saxon.type.AnySimpleType",
- "org.camunda.bpm.engine.runtime.CaseExecution",
- "net.sf.saxon.event.ProxyReceiver",
- "net.sf.saxon.lib.ConversionRules",
- "net.sf.saxon.lib.OutputURIResolver",
- "net.sf.saxon.expr.instruct.ValidatingInstruction",
- "net.sf.saxon.om.FunctionItem",
- "net.sf.saxon.om.MutableNodeInfo",
- "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
- "net.sf.saxon.pattern.PatternWithPredicate",
- "net.sf.saxon.expr.ErrorExpression",
- "net.sf.saxon.om.Name10Checker",
- "net.sf.saxon.event.ComplexContentOutputter",
- "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
- "org.camunda.bpm.engine.delegate.DelegateTask",
- "net.sf.saxon.style.LiteralResultElement",
- "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
- "org.camunda.bpm.engine.impl.core.model.CoreActivity",
- "net.sf.saxon.tree.iter.LookaheadIterator",
- "net.sf.saxon.om.AtomicSequence",
- "net.sf.saxon.s9api.XQueryCompiler",
- "net.sf.saxon.pattern.LocalNameTest",
- "net.sf.saxon.pattern.PatternParser",
- "net.sf.saxon.expr.instruct.SlotManager",
- "net.sf.saxon.PreparedStylesheet",
- "org.camunda.bpm.engine.impl.interceptor.CommandContext",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "net.sf.saxon.lib.ParseOptions",
- "net.sf.saxon.expr.ItemMappingIterator",
- "net.sf.saxon.tree.iter.EmptyIterator",
- "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
- "org.camunda.bpm.engine.impl.context.Context",
- "net.sf.saxon.lib.LocalizerFactory",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "org.camunda.bpm.engine.runtime.Execution",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
- "net.sf.saxon.s9api.ItemType$1",
- "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
- "org.camunda.bpm.engine.ProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
- "net.sf.saxon.s9api.ItemType$2",
- "net.sf.saxon.s9api.ItemType$3",
- "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
- "net.sf.saxon.pattern.NodeKindTest",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
- "net.sf.saxon.expr.LetExpression",
- "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
- "net.sf.saxon.s9api.XdmItem",
- "net.sf.saxon.expr.Binding",
- "net.sf.saxon.expr.instruct.ParentNodeConstructor",
- "org.camunda.bpm.engine.runtime.VariableInstance",
- "org.camunda.bpm.engine.runtime.Incident",
- "net.sf.saxon.om.NamespaceResolver",
- "net.sf.saxon.expr.instruct.AnalyzeString",
- "net.sf.saxon.z.IntHashMap",
- "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
- "net.sf.saxon.expr.instruct.ResultDocument",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
- "net.sf.saxon.type.StringToDouble",
- "net.sf.saxon.value.SequenceType",
- "net.sf.saxon.type.ComplexType",
- "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
- "net.sf.saxon.type.AnyType",
- "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
- "net.sf.saxon.expr.StaticContext",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
- "net.sf.saxon.lib.SerializerFactory",
- "net.sf.saxon.tree.util.SteppingNode",
- "net.sf.saxon.functions.IntegratedFunctionLibrary",
- "net.sf.saxon.evpull.PullEvent",
- "net.sf.saxon.expr.XPathContextMinor",
- "org.camunda.bpm.engine.management.JobDefinition",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "net.sf.saxon.om.DocumentInfo",
- "net.sf.saxon.om.QNameException",
- "org.camunda.bpm.engine.impl.javax.el.ValueReference",
- "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
- "net.sf.saxon.type.SchemaComponentVisitor",
- "net.sf.saxon.z.AbstractIntSet",
- "net.sf.saxon.tree.iter.AxisIterator",
- "net.sf.saxon.s9api.XdmValue",
- "net.sf.saxon.lib.CollationURIResolver",
- "org.openecomp.mso.bpmn.core.XQueryScriptTask",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
- "net.sf.saxon.tree.tiny.AppendableCharSequence",
- "net.sf.saxon.om.GroundedValue",
- "net.sf.saxon.tree.linked.NodeFactory",
- "net.sf.saxon.type.SchemaDeclaration",
- "net.sf.saxon.tree.linked.CommentImpl",
- "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
- "org.camunda.bpm.engine.variable.value.TypedValue",
- "net.sf.saxon.trans.BuiltInRuleSet",
- "org.apache.ibatis.transaction.TransactionFactory",
- "net.sf.saxon.value.AtomicValue",
- "net.sf.saxon.trans.NonDelegatingURIResolver",
- "net.sf.saxon.functions.VendorFunctionLibrary",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
- "net.sf.saxon.pattern.PatternParser20",
- "net.sf.saxon.expr.instruct.TraceExpression",
- "org.camunda.bpm.engine.exception.NotAllowedException",
- "net.sf.saxon.Configuration",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "net.sf.saxon.tree.util.FastStringBuffer",
- "net.sf.saxon.tree.linked.NodeImpl",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.camunda.bpm.engine.task.Task",
- "org.camunda.bpm.engine.impl.javax.el.Expression",
- "net.sf.saxon.type.Type",
- "net.sf.saxon.s9api.XdmNode",
- "net.sf.saxon.value.QNameValue",
- "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
- "org.openecomp.mso.logger.MsoLogger",
- "net.sf.saxon.type.SchemaType",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "net.sf.saxon.java.JavaPlatform$1",
- "net.sf.saxon.expr.instruct.ElementCreator",
- "net.sf.saxon.om.Item",
- "org.camunda.bpm.engine.variable.VariableMap",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
- "net.sf.saxon.lib.SchemaURIResolver",
- "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
- "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
- "net.sf.saxon.lib.ModuleURIResolver",
- "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
- "net.sf.saxon.expr.parser.ExpressionVisitor",
- "net.sf.saxon.om.SequenceIterator",
- "net.sf.saxon.z.IntHashSet",
- "net.sf.saxon.type.BuiltInType",
- "org.apache.ibatis.session.SqlSessionFactory",
- "net.sf.saxon.expr.instruct.Executable",
- "net.sf.saxon.om.DocumentPool",
- "net.sf.saxon.expr.LastPositionFinder",
- "net.sf.saxon.expr.instruct.TailCallReturner",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "net.sf.saxon.type.BuiltInAtomicType",
- "org.camunda.bpm.engine.SuspendedEntityInteractionException",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "com.att.eelf.configuration.EELFManager",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
- "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
- "org.camunda.bpm.engine.impl.pvm.PvmTransition",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
- "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
- "net.sf.saxon.pattern.ContentTypeTest",
- "net.sf.saxon.query.QueryParser",
- "net.sf.saxon.om.NodeName",
- "net.sf.saxon.value.Closure",
- "net.sf.saxon.expr.instruct.FixedElement",
- "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
- "net.sf.saxon.s9api.ConstructedItemType",
- "net.sf.saxon.lib.Numberer",
- "org.camunda.bpm.engine.delegate.JavaDelegate",
- "net.sf.saxon.om.IdentityComparable",
- "net.sf.saxon.z.IntSet",
- "org.camunda.bpm.application.ProcessApplicationReference",
- "net.sf.saxon.pattern.QNameTest",
- "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
- "net.sf.saxon.expr.sort.SortKeyDefinition",
- "net.sf.saxon.style.XSLAnalyzeString",
- "org.camunda.bpm.engine.delegate.DelegateExecution",
- "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
- "net.sf.saxon.expr.instruct.ValueOf",
- "net.sf.saxon.type.AnyItemType",
- "com.att.eelf.i18n.EELFMsgs",
- "org.camunda.bpm.engine.impl.javax.el.ELContext",
- "net.sf.saxon.expr.instruct.WithParam",
- "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
- "net.sf.saxon.expr.Assignation",
- "net.sf.saxon.value.StringToDouble11",
- "org.camunda.bpm.engine.variable.type.ValueType",
- "net.sf.saxon.style.StylesheetModule",
- "net.sf.saxon.value.EmptySequence",
- "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
- "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
- "net.sf.saxon.style.PrincipalStylesheetModule",
- "net.sf.saxon.type.PlainType",
- "org.camunda.bpm.engine.repository.CaseDefinition",
- "org.camunda.bpm.engine.impl.db.HasDbRevision",
- "net.sf.saxon.query.StaticQueryContext",
- "net.sf.saxon.expr.instruct.SimpleNodeConstructor",
- "net.sf.saxon.trans.DynamicLoader",
- "net.sf.saxon.s9api.ItemType$BuiltInAtomicItemType",
- "org.camunda.bpm.engine.variable.type.SerializableValueType",
- "net.sf.saxon.event.SaxonLocator",
- "net.sf.saxon.expr.parser.Optimizer",
- "org.camunda.bpm.engine.impl.pvm.PvmException",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "net.sf.saxon.expr.sort.Sortable",
- "net.sf.saxon.type.ExternalObjectType",
- "net.sf.saxon.expr.Literal",
- "net.sf.saxon.style.StyleElement",
- "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
- "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
- "net.sf.saxon.type.ValidationException",
- "org.camunda.bpm.engine.repository.ProcessDefinition",
- "net.sf.saxon.style.AbsentExtensionElement",
- "net.sf.saxon.style.XSLStylesheet",
- "net.sf.saxon.query.XQueryFunctionBinder",
- "net.sf.saxon.Platform",
- "net.sf.saxon.om.AbsolutePath",
- "net.sf.saxon.style.SourceBinding",
- "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
- "net.sf.saxon.trace.InstructionInfo",
- "net.sf.saxon.pattern.NameTest",
- "net.sf.saxon.trans.XPathException",
- "net.sf.saxon.pattern.ItemTypePattern",
- "org.camunda.bpm.model.bpmn.BpmnModelInstance",
- "net.sf.saxon.type.SimpleType",
- "net.sf.saxon.tree.linked.ProcInstImpl",
- "net.sf.saxon.expr.instruct.UserFunction",
- "net.sf.saxon.event.SequenceReceiver",
- "org.camunda.bpm.engine.delegate.VariableScope",
- "net.sf.saxon.event.FilterFactory",
- "org.camunda.bpm.engine.ProcessEngine",
- "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
- "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
- "org.camunda.bpm.engine.BadUserRequestException",
- "net.sf.saxon.expr.Callable",
- "org.camunda.bpm.engine.impl.context.ExecutionContext",
- "net.sf.saxon.tree.tiny.TinyTree",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "net.sf.saxon.tree.iter.EmptyAxisIterator",
- "net.sf.saxon.om.NotationSet",
- "net.sf.saxon.expr.CollationMap",
- "net.sf.saxon.tree.util.AttributeCollectionImpl",
- "net.sf.saxon.type.UnionType",
- "net.sf.saxon.expr.instruct.GeneralVariable",
- "net.sf.saxon.trans.LicenseException",
- "org.camunda.bpm.engine.impl.pvm.PvmExecution",
- "net.sf.saxon.functions.FunctionLibrary",
- "net.sf.saxon.lib.StandardURIResolver",
- "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
- "net.sf.saxon.type.TypeHierarchy$2",
- "net.sf.saxon.trans.Mode$RuleAction",
- "org.camunda.bpm.engine.runtime.Job",
- "net.sf.saxon.type.TypeHierarchy$1",
- "org.camunda.bpm.model.xml.ModelInstance",
- "net.sf.saxon.om.FingerprintedNode",
- "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
- "net.sf.saxon.tree.linked.ParentNodeImpl",
- "net.sf.saxon.type.ErrorType",
- "org.openecomp.mso.entity.MsoRequest",
- "net.sf.saxon.value.NotationValue",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "net.sf.saxon.s9api.ItemType",
- "net.sf.saxon.type.Untyped",
- "net.sf.saxon.expr.parser.PathMap$PathMapRoot",
- "net.sf.saxon.expr.instruct.AttributeCreator",
- "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
- "net.sf.saxon.expr.instruct.AttributeSet",
- "net.sf.saxon.trans.Mode$RuleFilter",
- "net.sf.saxon.s9api.XdmAtomicValue",
- "net.sf.saxon.om.AttributeCollection",
- "org.camunda.bpm.model.xml.instance.ModelElementInstance",
- "net.sf.saxon.expr.sort.RuleBasedSubstringMatcher",
- "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
- "org.camunda.bpm.engine.impl.db.DbEntity",
- "net.sf.saxon.java.JavaPlatform",
- "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
- "org.camunda.bpm.engine.runtime.EventSubscription",
- "net.sf.saxon.lib.URIChecker",
- "net.sf.saxon.tree.linked.DocumentImpl",
- "net.sf.saxon.s9api.XQueryExecutable",
- "net.sf.saxon.expr.instruct.FixedAttribute",
- "net.sf.saxon.expr.XPathContextMajor",
- "net.sf.saxon.type.AtomicType",
- "net.sf.saxon.expr.instruct.DocumentInstr",
- "net.sf.saxon.expr.Expression",
- "net.sf.saxon.serialize.charcode.CharacterSetFactory",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
- "net.sf.saxon.tree.util.Navigator",
- "net.sf.saxon.pattern.NamespaceTest",
- "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
- "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
- "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
- "net.sf.saxon.tree.iter.ReversibleIterator",
- "com.att.eelf.configuration.EELFLogger",
- "net.sf.saxon.event.Builder",
- "org.camunda.bpm.engine.runtime.CaseInstance",
- "net.sf.saxon.s9api.SaxonApiException",
- "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
- "net.sf.saxon.om.StructuredQName",
- "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
- "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
- "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
- "net.sf.saxon.style.StyleNodeFactory",
- "net.sf.saxon.expr.instruct.Instruction",
- "net.sf.saxon.functions.FunctionLibraryList",
- "org.camunda.bpm.engine.delegate.DelegateListener",
- "net.sf.saxon.event.TeeOutputter",
- "net.sf.saxon.lib.CollectionURIResolver",
- "net.sf.saxon.type.SchemaException",
- "net.sf.saxon.serialize.CDATAFilter",
- "net.sf.saxon.lib.StringCollator",
- "net.sf.saxon.expr.XPathContext",
- "net.sf.saxon.lib.SourceResolver",
- "net.sf.saxon.expr.MappingFunction",
- "net.sf.saxon.expr.Container",
- "net.sf.saxon.type.SchemaComponent",
- "net.sf.saxon.om.Name11Checker",
- "net.sf.saxon.expr.parser.ExpressionParser",
- "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
- "net.sf.saxon.event.PipelineConfiguration",
- "net.sf.saxon.tree.wrapper.SiblingCountingNode",
- "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
- "net.sf.saxon.value.MemoClosure",
- "net.sf.saxon.value.DecimalValue",
- "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
- "net.sf.saxon.TypeCheckerEnvironment",
- "net.sf.saxon.serialize.AttributeSorter",
- "net.sf.saxon.regex.RegularExpression",
- "net.sf.saxon.style.DataElement",
- "net.sf.saxon.lib.ExtensionFunctionDefinition",
- "net.sf.saxon.lib.SubstringMatcher",
- "net.sf.saxon.lib.TraceListener",
- "org.camunda.bpm.model.bpmn.instance.BaseElement",
- "net.sf.saxon.style.Declaration",
- "net.sf.saxon.value.BooleanValue",
- "net.sf.saxon.expr.parser.CodeInjector",
- "net.sf.saxon.tree.util.DocumentNumberAllocator",
- "net.sf.saxon.pattern.PatternThatSetsCurrent",
- "net.sf.saxon.expr.instruct.Debugger",
- "org.openecomp.mso.bpmn.core.BaseTask",
- "net.sf.saxon.pattern.Pattern",
- "net.sf.saxon.expr.parser.PathMap$PathMapNode",
- "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
- "net.sf.saxon.expr.instruct.SavedNamespaceContext",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
- "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
- "net.sf.saxon.om.NodeInfo",
- "net.sf.saxon.event.NamespaceReducer",
- "org.openecomp.mso.logger.MessageEnum",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.camunda.bpm.engine.impl.db.HasDbReferences",
- "org.camunda.bpm.engine.impl.tree.Collector",
- "net.sf.saxon.expr.StringLiteral",
- "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
- "net.sf.saxon.expr.ItemMappingFunction",
- "net.sf.saxon.expr.instruct.UseAttributeSets",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "net.sf.saxon.tree.iter.GroundedIterator",
- "org.camunda.bpm.engine.variable.type.PrimitiveValueType"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(XQueryScriptTaskESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "com.att.eelf.i18n.EELFResourceManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.bpmn.core.XQueryScriptTask",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.camunda.bpm.engine.impl.javax.el.Expression",
- "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
- "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
- "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
- "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
- "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
- "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
- "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.ProcessEngineException",
- "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
- "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
- "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
- "net.sf.saxon.java.JavaPlatform",
- "net.sf.saxon.Configuration",
- "net.sf.saxon.tree.linked.NodeImpl",
- "net.sf.saxon.style.StyleElement",
- "net.sf.saxon.style.LiteralResultElement",
- "net.sf.saxon.style.AbsentExtensionElement",
- "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
- "net.sf.saxon.tree.iter.EmptyIterator",
- "net.sf.saxon.tree.iter.EmptyAxisIterator",
- "net.sf.saxon.style.XSLAnalyzeString",
- "net.sf.saxon.tree.util.Navigator",
- "net.sf.saxon.om.NamespaceBinding",
- "net.sf.saxon.type.AnySimpleType",
- "net.sf.saxon.pattern.NodeTest",
- "net.sf.saxon.pattern.AnyNodeTest",
- "net.sf.saxon.type.AnyItemType",
- "net.sf.saxon.type.Type",
- "net.sf.saxon.z.IntHashMap",
- "net.sf.saxon.type.AnyType",
- "net.sf.saxon.type.Untyped",
- "net.sf.saxon.type.ErrorType",
- "net.sf.saxon.type.BuiltInType",
- "net.sf.saxon.type.BuiltInAtomicType",
- "net.sf.saxon.value.BooleanValue"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java
deleted file mode 100644
index fec405ef96..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:28:11 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core.json;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.util.Iterator;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.json.JSONObject;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class JsonUtilsESTest extends JsonUtilsESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- String string0 = JsonUtils.updJsonValue((String) null, "#", "#");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- String string0 = JsonUtils.getJsonValueForKey((JSONObject) null, "LPZc4`q5w]IQMS.^'3");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- String string0 = JsonUtils.getJsonParamValue("", ":bnv,&jl3bK", "");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- String string0 = JsonUtils.getJsonParamValue("", "", "tuw[9j$Sz");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- String string0 = JsonUtils.getJsonValue((String) null, "");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- String string0 = JsonUtils.addJsonValue((String) null, (String) null, (String) null);
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- String string0 = JsonUtils.xml2json("", (Boolean) null);
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- String string0 = JsonUtils.xml2json((String) null);
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- String string0 = JsonUtils.updJsonValue("tV a^wGCAwX", "tV a^wGCAwX", "tV a^wGCAwX");
- assertEquals("tV a^wGCAwX", string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- String string0 = JsonUtils.updJsonValue("", "", "");
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- Boolean boolean0 = Boolean.TRUE;
- String string0 = JsonUtils.json2xml("", boolean0);
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- String string0 = JsonUtils.getJsonValueForKey("java.io.StringWriter@0000000003", "#");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- Iterator<String> iterator0 = JsonUtils.getJsonIterator((String) null);
- assertNull(iterator0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- String string0 = JsonUtils.delJsonValue("java.io.StringWriter@0000000003", "java.io.StringWriter@0000000003");
- assertNotNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- String string0 = JsonUtils.delJsonValue("", (String) null);
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- Boolean boolean0 = new Boolean(true);
- String string0 = JsonUtils.xml2json("Y~N~%]", boolean0);
- assertNotNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- String string0 = JsonUtils.delJsonValue((String) null, "/Y");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- String string0 = JsonUtils.updJsonValue((String) null, (String) null, "/Y");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- String string0 = JsonUtils.addJsonValue("java.io.StringWriter@0000000006", "/Y", (String) null);
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- Boolean boolean0 = JsonUtils.jsonValueExists("getJsonValueForKey(): found value=", "/Y");
- String string0 = JsonUtils.xml2json("getJsonValueForKey(): found value=", boolean0);
- assertNotNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- String string0 = JsonUtils.json2xml(")?Fx+Bu:)1&$EZEmzoV");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- String string0 = JsonUtils.xml2json("java.io.StringWriter@0000000006");
- assertNotNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- Iterator<String> iterator0 = JsonUtils.getJsonIterator("{+%2:*}4");
- assertNotNull(iterator0);
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- JsonUtils jsonUtils0 = new JsonUtils();
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java
deleted file mode 100644
index 6d05db0b80..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:28:11 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core.json;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class JsonUtilsESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.json.JsonUtils";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JsonUtilsESTestscaffolding.class.getClassLoader() ,
- "org.json.JSONObject$Null",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "com.att.eelf.configuration.EELFLogger",
- "org.json.JSONException",
- "org.openecomp.mso.bpmn.core.xml.XmlTool",
- "org.json.JSONObject",
- "org.json.XML",
- "com.att.eelf.configuration.SLF4jWrapper",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.openecomp.mso.logger.MsoLogger",
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.openecomp.mso.entity.MsoRequest",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.json.JSONTokener",
- "org.openecomp.mso.bpmn.core.json.JsonUtils",
- "com.att.eelf.configuration.EELFManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "org.json.JSONArray",
- "org.json.XMLTokener"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JsonUtilsESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.bpmn.core.xml.XmlTool",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.json.JSONObject",
- "org.json.XML",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.bpmn.core.json.JsonUtils",
- "org.json.JSONException",
- "org.json.XMLTokener"
- );
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java
deleted file mode 100644
index 9c17caeaf4..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:33:04 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core.mybatis;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class URNMappingESTest extends URNMappingESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- String string0 = URNMapping.createIdentifierFromURN("!`OYz|WztoeK|A&=&M");
- assertEquals("URN_OYz_WztoeK_A_M", string0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- uRNMapping0.setValue("=F'A%");
- String string0 = uRNMapping0.getValue();
- assertEquals("=F'A%", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- uRNMapping0.setValue("");
- String string0 = uRNMapping0.getValue();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- uRNMapping0.setRev("");
- String string0 = uRNMapping0.getRev();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- uRNMapping0.setName("");
- String string0 = uRNMapping0.getName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- // Undeclared exception!
- try {
- URNMapping.createIdentifierFromURN((String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.bpmn.core.mybatis.URNMapping", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- String string0 = URNMapping.createIdentifierFromURN("mfJ\"%euO;@S_Xm");
- assertEquals("URN_mfJ_euO_S_Xm", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- uRNMapping0.setRev(":pMWjfl,zq_IA");
- String string0 = uRNMapping0.getRev();
- assertEquals(":pMWjfl,zq_IA", string0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- String string0 = uRNMapping0.getName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- String string0 = uRNMapping0.getRev();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- String string0 = uRNMapping0.getValue();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- URNMapping uRNMapping0 = new URNMapping();
- uRNMapping0.setName("c<");
- String string0 = uRNMapping0.getName();
- assertEquals("c<", string0);
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java
deleted file mode 100644
index 183ea84b58..0000000000
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:33:04 GMT 2016
- */
-
-package org.openecomp.mso.bpmn.core.mybatis;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class URNMappingESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.mybatis.URNMapping";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMappingESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.bpmn.core.mybatis.URNMapping"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn b/bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn
index d94a0c5b21..bb15ce2e5e 100644
--- a/bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn
+++ b/bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_IS440DbGEeWouodEI7MXGQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+<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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_IS440DbGEeWouodEI7MXGQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
<bpmn2:process id="BaseTaskTest" name="BaseTaskTest" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml b/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
index 4858ea0c0e..3fa222988c 100644
--- a/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
+++ b/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
@@ -1,28 +1,8 @@
-<?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=========================================================
- -->
-
+<?xml version="1.0" encoding="UTF-8" ?>
-<beans xmlns="http://www.springframework.org/schema/beans"
+<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/request.json b/bpmn/MSOCoreBPMN/src/test/resources/request.json
index bdca336a0b..8fa195b839 100644
--- a/bpmn/MSOCoreBPMN/src/test/resources/request.json
+++ b/bpmn/MSOCoreBPMN/src/test/resources/request.json
@@ -1,26 +1,26 @@
{
"variables": {
"bpmnRequest": {
- "value": "<aetgt:service-request xmlns:aetgt=\"http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1\"\n xmlns=\"http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1\"\n xmlns:msoservtypes=\"http://ecomp.att.com/mso/request/types/v1\"\n xmlns:msolayer3=\"http://ecomp.att.com/mso/request/layer3/schema/v1\"\n xmlns:rest=\"http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd\">\n <msoservtypes:request-information>\n <msoservtypes:request-id>d00eb185-b1d7-429e-aca3-42a61b459535</msoservtypes:request-id>\n <msoservtypes:request-action>Layer3ServiceActivateRequest</msoservtypes:request-action>\n <msoservtypes:source>OMX</msoservtypes:source>\n <msoservtypes:notification-url>http://localhost:8080/simulada/CSI/SendManagedNetworkStatusNotification</msoservtypes:notification-url>\n <msoservtypes:order-number>19630501</msoservtypes:order-number>\n <msoservtypes:order-version>1</msoservtypes:order-version>\n </msoservtypes:request-information>\n <msoservtypes:service-information>\n <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>\n <msoservtypes:service-instance-id>AA01|VLXM|003717||SW_INTERNET</msoservtypes:service-instance-id>\n <msoservtypes:subscriber-name>TEST_4306301</msoservtypes:subscriber-name>\n </msoservtypes:service-information>\n <service-parameters>\n <msolayer3:internet-service-information>\n <msolayer3:internet-evc-access-information>\n <msolayer3:internet-evc-speed-value>10</msolayer3:internet-evc-speed-value>\n <msolayer3:internet-evc-speed-units>Mbps</msolayer3:internet-evc-speed-units>\n <msolayer3:ip-version>ds</msolayer3:ip-version>\n </msolayer3:internet-evc-access-information>\n <msolayer3:vr-lan>\n <msolayer3:routing-protocol>none</msolayer3:routing-protocol>\n <msolayer3:vr-lan-interface>\n <msolayer3:vr-designation>primary</msolayer3:vr-designation>\n <msolayer3:v4-public-lan-prefixes>\n <msolayer3:t-provided-v4-lan-public-prefixes>\n <msolayer3:request-index>1</msolayer3:request-index>\n <msolayer3:v4-next-hop-address>32.10.30.116</msolayer3:v4-next-hop-address>\n <msolayer3:v4-lan-public-prefix-length>32</msolayer3:v4-lan-public-prefix-length>\n </msolayer3:t-provided-v4-lan-public-prefixes>\n </msolayer3:v4-public-lan-prefixes>\n <msolayer3:v6-public-lan-prefixes>\n <msolayer3:t-provided-v6-lan-public-prefixes>\n <msolayer3:request-index>1</msolayer3:request-index>\n <msolayer3:v6-next-hop-address>2507:0CB4:85A5:0030:0000:0000:0000:0010</msolayer3:v6-next-hop-address>\n <msolayer3:v6-lan-public-prefix-length>48</msolayer3:v6-lan-public-prefix-length>\n </msolayer3:t-provided-v6-lan-public-prefixes>\n </msolayer3:v6-public-lan-prefixes>\n <msolayer3:dhcp>\n <msolayer3:v4-dhcp-server-enabled>Y</msolayer3:v4-dhcp-server-enabled>\n <msolayer3:v6-dhcp-server-enabled>Y</msolayer3:v6-dhcp-server-enabled>\n <msolayer3:use-v4-default-pool>Y</msolayer3:use-v4-default-pool>\n <msolayer3:use-v6-default-pool>Y</msolayer3:use-v6-default-pool>\n </msolayer3:dhcp>\n <msolayer3:pat>\n <msolayer3:v4-pat-enabled>Y</msolayer3:v4-pat-enabled>\n <msolayer3:use-v4-default-pool>N</msolayer3:use-v4-default-pool>\n </msolayer3:pat>\n <msolayer3:firewall-lite>\n <msolayer3:stateful-firewall-lite-v4-enabled>Y</msolayer3:stateful-firewall-lite-v4-enabled>\n <msolayer3:stateful-firewall-lite-v6-enabled>Y</msolayer3:stateful-firewall-lite-v6-enabled>\n </msolayer3:firewall-lite>\n </msolayer3:vr-lan-interface>\n </msolayer3:vr-lan>\n </msolayer3:internet-service-information>\n </service-parameters>\n</aetgt:service-request>\n",
+ "value": "<aetgt:service-request xmlns:aetgt=\"http://org.openecomp/mso/request/layer3serviceactivate/schema/v1\"\n xmlns=\"http://org.openecomp/mso/request/layer3serviceactivate/schema/v1\"\n xmlns:msoservtypes=\"http://org.openecomp/mso/request/types/v1\"\n xmlns:msolayer3=\"http://org.openecomp/mso/request/layer3/schema/v1\"\n xmlns:rest=\"http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd\">\n <msoservtypes:request-information>\n <msoservtypes:request-id>d00eb185-b1d7-429e-aca3-42a61b459535</msoservtypes:request-id>\n <msoservtypes:request-action>Layer3ServiceActivateRequest</msoservtypes:request-action>\n <msoservtypes:source>OMX</msoservtypes:source>\n <msoservtypes:notification-url>http://localhost:28080/simulada/CSI/SendManagedNetworkStatusNotification</msoservtypes:notification-url>\n <msoservtypes:order-number>19630501</msoservtypes:order-number>\n <msoservtypes:order-version>1</msoservtypes:order-version>\n </msoservtypes:request-information>\n <msoservtypes:service-information>\n <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>\n <msoservtypes:service-instance-id>AA01|VLXM|003717||SW_INTERNET</msoservtypes:service-instance-id>\n <msoservtypes:subscriber-name>TEST_4306301</msoservtypes:subscriber-name>\n </msoservtypes:service-information>\n <service-parameters>\n <msolayer3:l2-homing-information>\n <msolayer3:evc-name>01|VLXM|121601/PT</msolayer3:evc-name>\n <msolayer3:topology>PointToPoint</msolayer3:topology>\n <msolayer3:preferred-aic-clli>MTSNJA4LX01</msolayer3:preferred-aic-clli>\n </msolayer3:l2-homing-information>\n <msolayer3:internet-service-information>\n <msolayer3:internet-evc-access-information>\n <msolayer3:internet-evc-speed-value>10</msolayer3:internet-evc-speed-value>\n <msolayer3:internet-evc-speed-units>Mbps</msolayer3:internet-evc-speed-units>\n <msolayer3:ip-version>ds</msolayer3:ip-version>\n </msolayer3:internet-evc-access-information>\n <msolayer3:vr-lan>\n <msolayer3:routing-protocol>none</msolayer3:routing-protocol>\n <msolayer3:vr-lan-interface>\n <msolayer3:vr-designation>primary</msolayer3:vr-designation>\n <msolayer3:v4-public-lan-prefixes>\n <msolayer3:t-provided-v4-lan-public-prefixes>\n <msolayer3:request-index>1</msolayer3:request-index>\n <msolayer3:v4-next-hop-address>32.10.30.116</msolayer3:v4-next-hop-address>\n <msolayer3:v4-lan-public-prefix-length>32</msolayer3:v4-lan-public-prefix-length>\n </msolayer3:t-provided-v4-lan-public-prefixes>\n </msolayer3:v4-public-lan-prefixes>\n <msolayer3:v6-public-lan-prefixes>\n <msolayer3:t-provided-v6-lan-public-prefixes>\n <msolayer3:request-index>1</msolayer3:request-index>\n <msolayer3:v6-next-hop-address>2507:0CB4:85A5:0030:0000:0000:0000:0010</msolayer3:v6-next-hop-address>\n <msolayer3:v6-lan-public-prefix-length>48</msolayer3:v6-lan-public-prefix-length>\n </msolayer3:t-provided-v6-lan-public-prefixes>\n </msolayer3:v6-public-lan-prefixes>\n <msolayer3:dhcp>\n <msolayer3:v4-dhcp-server-enabled>Y</msolayer3:v4-dhcp-server-enabled>\n <msolayer3:v6-dhcp-server-enabled>Y</msolayer3:v6-dhcp-server-enabled>\n <msolayer3:use-v4-default-pool>Y</msolayer3:use-v4-default-pool>\n <msolayer3:use-v6-default-pool>Y</msolayer3:use-v6-default-pool>\n </msolayer3:dhcp>\n <msolayer3:pat>\n <msolayer3:v4-pat-enabled>Y</msolayer3:v4-pat-enabled>\n <msolayer3:use-v4-default-pool>N</msolayer3:use-v4-default-pool>\n </msolayer3:pat>\n <msolayer3:firewall-lite>\n <msolayer3:stateful-firewall-lite-v4-enabled>Y</msolayer3:stateful-firewall-lite-v4-enabled>\n <msolayer3:stateful-firewall-lite-v6-enabled>Y</msolayer3:stateful-firewall-lite-v6-enabled>\n </msolayer3:firewall-lite>\n </msolayer3:vr-lan-interface>\n </msolayer3:vr-lan>\n </msolayer3:internet-service-information>\n </service-parameters>\n</aetgt:service-request>\n",
"type": "String"
},
"host": {
"value": "localhost",
"type": "String"
},
- "att-mso-schema-version": {
+ "mso-schema-version": {
"value": "v1",
"type": "String"
},
- "att-mso-request-id": {
+ "mso-request-id": {
"value": "d00eb185-b1d7-429e-aca3-42a61b459535",
"type": "String"
},
- "att-mso-service-instance-id": {
+ "mso-service-instance-id": {
"value": "AA01|VLXM|003717||SW_INTERNET",
"type": "String"
},
- "att-mso-service-request-timeout": {
+ "mso-service-request-timeout": {
"value": "180",
"type": "String"
}
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/requestArray.json b/bpmn/MSOCoreBPMN/src/test/resources/requestArray.json
new file mode 100644
index 0000000000..238128865b
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/requestArray.json
@@ -0,0 +1,54 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "callbackUrl": "http://localhost:28080/simulada/CCD/AsyncRequestStatus",
+ "source": "CCD",
+ "instanceName": "USOSTCDALTX0101VFHN31"
+ },
+ "modelInfo": {
+ "modelType": "service",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "UCPE",
+ "modelVersion": 1
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "83031",
+ "subscriberName": "Fern Hill Real Estate LLC 31"
+ },
+ "requestParameters": {
+ "ucpeInfo": {
+ "ucpeHostName": "USOSTCDALTX0101UJZZ31",
+ "ucpeAliasHostName": "SHELLUCPE31",
+ "ucpeActivationCode": "ASD-987-M31",
+ "ucpePartNumber": "FG-VM00*",
+ "outOfBandManagementModem": "BROADBAND",
+ "internetTopology": "IVLAN",
+ "wanList": [
+ { "wanInfo": {
+ "wanPortNumber": "WAN1",
+ "wanType": "AVPN",
+ "circuitId": "BT/SLIR/70911",
+ "dualMode": "Active",
+ "transportManagementOption": "ATT",
+ "transportProviderName": "ATT",
+ "mediaType": "ELECTRICAL",
+ "interfaceType": "1000BASE-T",
+ "transportVendorTotalBandwidth": "100"
+ }},
+ { "wanInfo": {
+ "wanPortNumber": "WAN2",
+ "wanType": "AVPN",
+ "circuitId": "AS/KRFN/34611",
+ "dualMode": "Active",
+ "transportManagementOption": "ATT",
+ "transportProviderName": "ATT",
+ "mediaType": "MMF",
+ "interfaceType": "10/100/1000BASE-T",
+ "transportVendorTotalBandwidth": "10000"
+ }}
+ ]
+ }
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy
deleted file mode 100644
index 96431b6d1f..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy
+++ /dev/null
@@ -1,530 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.rest.APIResponse;
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-class AaiUtil {
-
- public MsoUtils utils = new MsoUtils()
- public static final String NETWORK_GENERIC_VNF = 'aai_network_generic_vnf_uri'
- public static final String NETWORK_VPN_BINDING = 'aai_network_vpn_binding_uri'
- public static final String NETWORK_POLICY = 'aai_network_policy_uri'
- public static final String NETWORK_VCE = 'aai_network_vce_uri'
- public static final String NETWORK_L3_NETWORK = 'aai_network_l3_network_uri'
- public static final String NETWORK_TABLE_REFERENCES = 'aai_network_table_reference_uri'
- public static final String BUSINESS_CUSTOMER = 'aai_business_customer_uri'
- public static final String BUSINESS_CUSTOMERV7 = 'aaiv7_business_customer_uri'
- public static final String CLOUD_INFRASTRUCTURE_VOLUME_GROUP = 'aai_cloud_infrastructure_volume_group_uri'
- public static final String CLOUD_INFRASTRUCTURE_CLOUD_REGION = 'aai_cloud_infrastructure_cloud_region_uri'
- public static final String CLOUD_INFRASTRUCTURE_TENANT = 'aai_cloud_infrastructure_tenant_uri'
- public static final String SEARCH_GENERIC_QUERY = 'aai_search_generic_query_uri'
- public static final String SEARCH_NODES_QUERY = 'aai_search_nodes_query_uri'
- public static final String AAI_NAMESPACE_STRING = 'http://org.openecomp.aai.inventory/'
-
- private AbstractServiceTaskProcessor taskProcessor
-
- public AaiUtil(AbstractServiceTaskProcessor taskProcessor) {
- this.taskProcessor = taskProcessor
- }
-
- public String getNetworkGenericVnfEndpoint(Execution execution) {
- def method = getClass().getSimpleName() + '.getNetworkGenericVnfUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- String endpoint = execution.getVariable("URN_aai_endpoint")
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, NETWORK_GENERIC_VNF)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return endpoint + uri
- }
-
- public String getNetworkGenericVnfUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getNetworkGenericVnfUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, NETWORK_GENERIC_VNF)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
-
-
- public String getNetworkVpnBindingUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getNetworkVpnBindingUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, NETWORK_VPN_BINDING)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getNetworkPolicyUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getNetworkPolicyUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, NETWORK_POLICY)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getNetworkTableReferencesUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getNetworkTableReferencesUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, NETWORK_TABLE_REFERENCES)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getNetworkVceUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getNetworkVceUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, NETWORK_VCE)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getNetworkL3NetworkUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getNetworkL3NetworkUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, NETWORK_L3_NETWORK)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getBusinessCustomerUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getBusinessCustomerUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, BUSINESS_CUSTOMER)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getBusinessCustomerUriv7(Execution execution) {
- def method = getClass().getSimpleName() + '.getBusinessCustomerUriv7(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, BUSINESS_CUSTOMERV7)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getCloudInfrastructureCloudRegionEndpoint(Execution execution) {
- def method = getClass().getSimpleName() + '.getCloudInfrastructureCloudRegionUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- String endpoint = execution.getVariable("URN_aai_endpoint")
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, CLOUD_INFRASTRUCTURE_CLOUD_REGION)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return endpoint + uri
- }
-
- /**
- * This method is depracated, use getCloudInfrastructureRegionEndpoint instead
- */
- //@Deprecated
- public String getCloudInfrastructureCloudRegionUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getCloudInfrastructureCloudRegionUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, CLOUD_INFRASTRUCTURE_CLOUD_REGION)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getCloudInfrastructureVolumeGroupEndpoint(Execution execution) {
- def method = getClass().getSimpleName() + '.getCloudInfrastructureVolumeGroupUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- String endpoint = execution.getVariable("URN_aai_endpoint")
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, CLOUD_INFRASTRUCTURE_VOLUME_GROUP)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return endpoint + uri
- }
-
- public String getCloudInfrastructureVolumeGroupUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getCloudInfrastructureVolumeGroupUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, CLOUD_INFRASTRUCTURE_VOLUME_GROUP)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getCloudInfrastructureTenantUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getCloudInfrastructureTenantUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, CLOUD_INFRASTRUCTURE_TENANT)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getSearchNodesQueryUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getSearchNodesQueryUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, SEARCH_NODES_QUERY)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getSearchNodesQueryEndpoint(Execution execution) {
- def method = getClass().getSimpleName() + '.getSearchNodesQueryUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- String endpoint = execution.getVariable("URN_aai_endpoint")
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, SEARCH_NODES_QUERY)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return endpoint + uri
- }
-
- public String getSearchGenericQueryUri(Execution execution) {
- def method = getClass().getSimpleName() + '.getSearchGenericQueryUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uri = getUri(execution, SEARCH_GENERIC_QUERY)
-
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getUri(Execution execution, String key) {
- def method = getClass().getSimpleName() + '.getUri(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
-
- def processKey = taskProcessor.getProcessKey(execution)
- def uriKey = "URN_mso_workflow_${processKey}_${key}"
- def defaultUriKey = "URN_mso_workflow_default_${key}"
-
- taskProcessor.logDebug('URI Key ' + uriKey, isDebugLogEnabled)
- taskProcessor.logDebug('Default URI Key ' + defaultUriKey, isDebugLogEnabled)
-
- def uri = execution.getVariable(uriKey)
- if (uri == null || uri == "") {
- taskProcessor.logDebug("Process specific key not defined, using default key $defaultUriKey", isDebugLogEnabled)
- uri = execution.getVariable(defaultUriKey)
- }
-
- taskProcessor.logDebug('AAI URI is ' + uri, isDebugLogEnabled)
- taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
- return uri
- }
-
- public String getNamespaceFromUri(String uri) {
- String namespace = AAI_NAMESPACE_STRING
- if(uri!=null){
- return namespace + uri.substring(uri.indexOf("v"), uri.indexOf("v")+2)
- }else{
- return namespace
- }
- }
-
-
-
- /**
- * This reusable method can be used for making AAI Get Calls. The url should
- * be passed as a parameter along with the execution. The method will
- * return an APIResponse.
- *
- * @param execution
- * @param url
- *
- * @return APIResponse
- */
- public APIResponse executeAAIGetCall(Execution execution, String url){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug(" ======== STARTED Execute AAI Get Process ======== ", isDebugEnabled)
- try{
- String uuid = UUID.randomUUID()
- taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
- taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(url);
- RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml");
-
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- APIResponse apiResponse = client.get()
- return apiResponse
-
- }catch(Exception e){
- taskProcessor.logDebug("Exception occured while executing AAI Get Call. Exception is: \n" + e, isDebugEnabled)
- return e
- }
- taskProcessor.logDebug( "======== COMPLETED Execute AAI Get Process ======== ", isDebugEnabled)
- }
-
- /**
- * This reusable method can be used for making AAI httpPut Calls. The url should
- * be passed as a parameter along with the execution and payload. The method will
- * return an APIResponse.
- *
- * @param execution
- * @param url
- * @param payload
- *
- * @return APIResponse
- */
- public APIResponse executeAAIPutCall(Execution execution, String url, String payload){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug( " ======== Started Execute AAI Put Process ======== ", isDebugEnabled)
- try{
- String uuid = UUID.randomUUID()
- taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
-
- taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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 apiResponse = client.httpPut(payload)
-
- return apiResponse
- }catch(Exception e){
- taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Put Call. Exception is: \n" + e, isDebugEnabled)
- return e
- }
- taskProcessor.logDebug( "======== Completed Execute AAI Put Process ======== ", isDebugEnabled)
- }
-
-
- /**
- * This reusable method can be used for making AAI Delete Calls. The url should
- * be passed as a parameter along with the execution. The method will
- * return an APIResponse.
- *
- * @param execution
- * @param url
- *
- * @return APIResponse
- */
- public APIResponse executeAAIDeleteCall(Execution execution, String url){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug( " ======== Started Execute AAI Delete Process ======== ", isDebugEnabled)
- try{
- String uuid = UUID.randomUUID()
- taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
-
- taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(url);
- RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse apiResponse = client.delete()
-
- return apiResponse
-
- }catch(Exception e){
- taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Delete Call. Exception is: \n" + e, isDebugEnabled)
- return e
- }
- taskProcessor.logDebug( "======== Completed Execute AAI Delete Process ======== ", isDebugEnabled)
- }
-
-
- /** Utilitty to get the Cloud Region from AAI
- * Returns String cloud region id, (ie, cloud-region-id)
- * @param execution
- * @param url - url for AAI get cloud region
- * @param backend - "PO" - real region, or "SDNC" - v2.5 (fake region).
- */
-
- //TODO: We should refactor this method to return WorkflowException instead of Error. Also to throw MSOWorkflowException which the calling flow will then catch.
-
- public String getAAICloudReqion(Execution execution, String url, String backend, inputCloudRegion){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
-
- try {
- APIResponse apiResponse = executeAAIGetCall(execution, url)
- String returnCode = apiResponse.getStatusCode()
- String aaiResponseAsString = apiResponse.getResponseBodyAsString()
- taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region Return code: " + returnCode, isDebugEnabled)
- execution.setVariable(execution.getVariable("prefix")+"queryCloudRegionReturnCode", returnCode)
- //taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region Response: " + aaiResponseAsString, isDebugEnabled)
- //execution.setVariable(execution.getVariable("prefix")+"queryCloudRegionResponse", aaiResponseAsString)
- String regionId = ""
- if (returnCode == "200") {
- taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region is Successful.", isDebugEnabled)
- try {
- String regionVersion = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-version")
- taskProcessor.utils.log("DEBUG", "Cloud Region Version from AAI for " + backend + " is: " + regionVersion, isDebugEnabled)
- if (backend == "PO") {
- regionId = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-id")
- } else { // backend not "PO"
- if (regionVersion == "2.5" ) {
- regionId = "AAIAIC25"
- } else {
- regionId = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-id")
- }
- }
-
- taskProcessor.utils.log("DEBUG", "Cloud Region Id from AAI " + backend + " is: " + regionId, isDebugEnabled)
- return regionId
-
- } catch (Exception e) {
- taskProcessor.utils.log("ERROR", "Exception occured while getting the Cloud Reqion. Exception is: \n" + e, isDebugEnabled)
- return "ERROR"
- }
- } else { // not 200
- if (returnCode == "404") {
- if (backend == "PO") {
- regionId = inputCloudRegion
- } else { // backend not "PO"
- regionId = "AAIAIC25"
- }
- taskProcessor.utils.log("DEBUG", "Cloud Region value for code='404' of " + backend + " is: " + regionId, isDebugEnabled)
- return regionId
- } else {
- taskProcessor.utils.log("ERROR", "Call AAI Cloud Region is NOT Successful.", isDebugEnabled)
- return "ERROR"
- }
- }
- }catch(Exception e) {
- taskProcessor.utils.log("ERROR", "Exception occured while getting the Cloud Reqion. Exception is: \n" + e, isDebugEnabled)
- return "ERROR"
- }
- }
-
- /* returns xml Node with service-type of searchValue */
- def searchServiceType(xmlInput, searchValue){
- def fxml= new XmlSlurper().parseText(xmlInput)
- def ret = fxml.'**'.find {it.'service-type' == searchValue}
- return ret
- }
-
- /* returns xml Node with service-instance-id of searchValue */
- def searchServiceInstanceId(xmlInput, searchValue){
- def ret = xmlInput.'**'.find {it.'service-instance-id' == searchValue}
- return ret
- }
-
-
-
-}
-
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy
deleted file mode 100644
index bfd86480ad..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy
+++ /dev/null
@@ -1,1780 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import groovy.xml.XmlUtil
-import groovy.json.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils;
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import java.util.UUID;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils
-
-/**
- * This groovy class supports the <class>CreateNetworkInstanceInfra.bpmn</class> process.
- *
- */
-public class CreateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
- String Prefix="CRENWKI_"
- 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>CreateNetworkInstanceInfra.bpmn</class> process.
- * @param execution
- */
- public InitializeProcessVariables(Execution execution){
- /* Initialize all the process variables in this block */
-
- execution.setVariable("CRENWKI_messageId", "")
- execution.setVariable("BasicAuthHeaderValuePO", "")
- execution.setVariable("BasicAuthHeaderValueSDNC", "")
- execution.setVariable("CRENWKI_CreateNetworkInstanceInfraJsonRequest", "")
- execution.setVariable("CRENWKI_networkRequest", "")
- execution.setVariable("CRENWKI_networkInputs", "")
- execution.setVariable("CRENWKI_networkOutputs", "")
- execution.setVariable("CRENWKI_requestId", "")
- execution.setVariable("CRENWKI_source", "")
-
- execution.setVariable("CRENWKI_CompleteMsoProcessRequest", "")
- execution.setVariable("CRENWKI_FalloutHandlerRequest", "")
- execution.setVariable("CRENWKI_isSilentSuccess", false)
- execution.setVariable("CRENWKI_isPONR", false) // Point-of-no-return, means, rollback is not needed
-
- // query Service Instance
- execution.setVariable("CRENWKI_serviceInstanceId","")
-
- // AAI query Name
- execution.setVariable("CRENWKI_queryNameAAIRequest","")
- execution.setVariable("CRENWKI_queryNameAAIResponse", "")
- execution.setVariable("CRENWKI_aaiNameReturnCode", "")
- execution.setVariable("CRENWKI_isAAIqueryNameGood", false)
-
- // AAI query Cloud Region
- execution.setVariable("CRENWKI_queryCloudRegionRequest","")
- execution.setVariable("CRENWKI_queryCloudRegionReturnCode","")
- execution.setVariable("CRENWKI_queryCloudRegionResponse","")
- execution.setVariable("CRENWKI_cloudRegionPo","")
- execution.setVariable("CRENWKI_cloudRegionSdnc","")
- execution.setVariable("CRENWKI_isCloudRegionGood", false)
-
- // AAI query Id
- execution.setVariable("CRENWKI_queryIdAAIRequest","")
- execution.setVariable("CRENWKI_queryIdAAIResponse", "")
- execution.setVariable("CRENWKI_aaiIdReturnCode", "")
-
- // AAI query vpn binding
- execution.setVariable("CRENWKI_queryVpnBindingAAIRequest","")
- execution.setVariable("CRENWKI_queryVpnBindingAAIResponse", "")
- execution.setVariable("CRENWKI_aaiQqueryVpnBindingReturnCode", "")
- execution.setVariable("CRENWKI_vpnBindings", null)
- execution.setVariable("CRENWKI_vpnCount", 0)
- execution.setVariable("CRENWKI_routeCollection", "")
-
- // AAI query network policy
- execution.setVariable("CRENWKI_queryNetworkPolicyAAIRequest","")
- execution.setVariable("CRENWKI_queryNetworkPolicyAAIResponse", "")
- execution.setVariable("CRENWKI_aaiQqueryNetworkPolicyReturnCode", "")
- execution.setVariable("CRENWKI_networkPolicyUriList", null)
- execution.setVariable("CRENWKI_networkPolicyCount", 0)
- execution.setVariable("CRENWKI_networkCollection", "")
-
- // AAI query route table reference
- execution.setVariable("CRENWKI_queryNetworkTableRefAAIRequest","")
- execution.setVariable("CRENWKI_queryNetworkTableRefAAIResponse", "")
- execution.setVariable("CRENWKI_aaiQqueryNetworkTableRefReturnCode", "")
- execution.setVariable("CRENWKI_networkTableRefUriList", null)
- execution.setVariable("CRENWKI_networkTableRefCount", 0)
- execution.setVariable("CRENWKI_tableRefCollection", "")
-
- // AAI requery Id
- execution.setVariable("CRENWKI_requeryIdAAIRequest","")
- execution.setVariable("CRENWKI_requeryIdAAIResponse", "")
- execution.setVariable("CRENWKI_aaiRequeryIdReturnCode", "")
-
- // AAI update contrail
- execution.setVariable("CRENWKI_updateContrailAAIUrlRequest","")
- execution.setVariable("CRENWKI_updateContrailAAIPayloadRequest","")
- execution.setVariable("CRENWKI_updateContrailAAIResponse", "")
- execution.setVariable("CRENWKI_aaiUpdateContrailReturnCode", "")
-
- execution.setVariable("CRENWKI_createNetworkRequest", "")
- execution.setVariable("CRENWKI_createNetworkResponse", "")
- execution.setVariable("CRENWKI_rollbackNetworkRequest", "")
- execution.setVariable("CRENWKI_rollbackNetworkResponse", "")
- execution.setVariable("CRENWKI_networkReturnCode", "")
- execution.setVariable("CRENWKI_rollbackNetworkReturnCode", "")
- execution.setVariable("CRENWKI_isNetworkRollbackNeeded", false)
-
- execution.setVariable("CRENWKI_assignSDNCRequest", "")
- execution.setVariable("CRENWKI_assignSDNCResponse", "")
- execution.setVariable("CRENWKI_rollbackSDNCRequest", "")
- execution.setVariable("CRENWKI_rollbackSDNCResponse", "")
- execution.setVariable("CRENWKI_sdncReturnCode", "")
- execution.setVariable("CRENWKI_rollbackSDNCReturnCode", "")
- execution.setVariable("CRENWKI_isSdncRollbackNeeded", false)
- execution.setVariable("CRENWKI_sdncResponseSuccess", false)
-
- execution.setVariable("CRENWKI_createDBRequest", "")
- execution.setVariable("CRENWKI_createDBResponse", "")
- execution.setVariable("CRENWKI_dbReturnCode", "")
-
- execution.setVariable("CRENWKI_orchestrationStatus", "")
- execution.setVariable("CRENWKI_isVnfBindingPresent", false)
- execution.setVariable("CRENWKI_Success", false)
- execution.setVariable("GENGS_type", "service-instance") // Setting for Generic Sub Flow use
-
-
- }
-
- // **************************************************
- // Pre or Prepare Request Section
- // **************************************************
- /**
- * This method is executed during the preProcessRequest task of the <class>CreateNetworkInstanceInfra.bpmn</class> process.
- * @param execution
- */
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside preProcessRequest CreateNetworkInstanceInfra Request ***** ", isDebugEnabled)
-
- // initialize flow variables
- InitializeProcessVariables(execution)
-
- // get Incoming request & validate json format
- String createNetworkJsonIncoming = execution.getVariable("bpmnRequest")
- utils.logAudit(createNetworkJsonIncoming)
- try {
- def prettyJson = JsonOutput.prettyPrint(createNetworkJsonIncoming.toString())
- utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
-
- } catch (Exception ex) {
- String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
- // PO Authorization Info / headers Authorization=
- String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
- utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
- try {
- def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
- execution.setVariable("BasicAuthHeaderValuePO",encodedString)
- execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
-
- } catch (IOException ex) {
- String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
- try {
-
- execution.setVariable("CRENWKI_CreateNetworkInstanceInfraJsonRequest", createNetworkJsonIncoming)
-
- // input should be empty, use generated 'network-id' from SDNC/AAI
- execution.setVariable("networkId", "")
-
- // recreate the xml network-request
- String networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, createNetworkJsonIncoming)
- execution.setVariable("CRENWKI_networkRequest", networkRequest)
- utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled)
-
- String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
- execution.setVariable("CRENWKI_networkInputs", networkInputs)
- utils.log("DEBUG", " networkInputs - " + '\n' + networkInputs, isDebugEnabled)
-
- String netId = utils.getNodeText1(networkRequest, "network-id")
- String netName = utils.getNodeText1(networkRequest, "network-name")
- String networkOutputs =
- """<network-outputs>
- <network-id>${netId}</network-id>
- <network-name>${netName}</network-name>
- </network-outputs>"""
- execution.setVariable("CRENWKI_networkOutputs", networkOutputs)
- utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
-
- String requestId = execution.getVariable("att-mso-request-id")
- if (requestId == null || requestId == "") {
- requestId = execution.getVariable("requestId")
- }
- execution.setVariable("CRENWKI_requestId", requestId)
- execution.setVariable("CRENWKI_source", utils.getNodeText1(networkRequest, "source"))
-
- // prepare messageId
- String messageId = execution.getVariable("CRENWKI_messageId") // for testing
- if (messageId == null || messageId == "") {
- messageId = UUID.randomUUID()
- utils.log("DEBUG", " CRENWKI_messageId, random generated: " + messageId, isDebugEnabled)
- } else {
- utils.log("DEBUG", " CRENWKI_messageId, pre-assigned: " + messageId, isDebugEnabled)
- }
- execution.setVariable("CRENWKI_messageId", messageId)
-
- // validate 'backout-on-failure' to override 'URN_mso_rollback'
- boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
- execution.setVariable("CRENWKI_rollbackEnabled", rollbackEnabled)
-
- String instanceName = ""
- if (utils.nodeExists(networkRequest, "network-name")) {
- instanceName = utils.getNodeText1(networkRequest, "network-name")
- if (instanceName == 'null' || instanceName == "") {
- sendSyncError(execution)
- // missing value of network-name
- String dataErrorMessage = "requestDetails has missing 'network-name' value/element."
- utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
- }
-
- String lcpCloudRegion = ""
- if (utils.nodeExists(networkRequest, "aic-cloud-region")) {
- lcpCloudRegion = utils.getNodeText1(networkRequest, "aic-cloud-region")
- if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) {
- sendSyncError(execution)
- String dataErrorMessage = "requestDetails has missing 'aic-cloud-region' value/element."
- utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
- }
-
- String serviceInstanceId = ""
- if (utils.nodeExists(networkRequest, "service-instance-id")) {
- serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id")
- if ((serviceInstanceId == 'null') || (lcpCloudRegion == "")) {
- sendSyncError(execution)
- String dataErrorMessage = "Variable 'serviceInstanceId' value/element is missing."
- utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
- }
-
- execution.setVariable("CRENWKI_serviceInstanceId", serviceInstanceId)
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex){
- sendSyncError(execution)
- // caught exception
- String exceptionMessage = "Exception Encountered in CreateNetworkInstanceInfra, PreProcessRequest() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
- }
-
- public void sendSyncResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- try {
- String requestId = execution.getVariable("att-mso-request-id")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String createNetworkRestRequest = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + createNetworkRestRequest, isDebugEnabled)
- sendWorkflowResponse(execution, 202, createNetworkRestRequest)
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. sendSyncResponse() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- }
-
-
- public void callRESTQueryAAINetworkName (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkName of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- // get variables
- String networkInputs = execution.getVariable("CRENWKI_networkInputs")
- String networkName = utils.getNodeText1(networkInputs, "network-name")
- networkName = UriUtils.encode(networkName,"UTF-8")
- String messageId = execution.getVariable("CRENWKI_messageId")
-
- // Prepare AA&I url with network-name
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String queryAAINameRequest = "${aai_endpoint}${aai_uri}" + "?network-name=" + networkName
- utils.logAudit(queryAAINameRequest)
- execution.setVariable("CRENWKI_queryNameAAIRequest", queryAAINameRequest)
- utils.log("DEBUG", " CRENWKI_queryNameAAIRequest - " + "\n" + queryAAINameRequest, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
- RESTConfig config = new RESTConfig(queryAAINameRequest);
-
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRENWKI_aaiNameReturnCode", returnCode)
- utils.log("DEBUG", " ***** AAI Query Name Response Code : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
- utils.log("DEBUG", " ***** AAI Query Name Response : " +'\n'+ aaiResponseAsString, isDebugEnabled)
-
- if (returnCode=='200') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("CRENWKI_queryNameAAIResponse", aaiResponseAsString)
- execution.setVariable("CRENWKI_isAAIqueryNameGood", true)
- String orchestrationStatus = ""
- try {
- // response is NOT empty
- orchestrationStatus = utils.getNodeText1(aaiResponseAsString, "orchestration-status")
- execution.setVariable("CRENWKI_orchestrationStatus", orchestrationStatus.toUpperCase())
- utils.log("DEBUG", " CRENWKI_orchestrationStatus - " + orchestrationStatus.toUpperCase(), isDebugEnabled)
- } catch (Exception ex) {
- // response is empty
- execution.setVariable("CRENWKI_orchestrationStatus", orchestrationStatus)
- utils.log("DEBUG", " CRENWKI_orchestrationStatus - " + orchestrationStatus, isDebugEnabled)
- }
-
- } else {
- if (returnCode=='404') {
- utils.log("DEBUG", " QueryAAINetworkName return code = '404' (Not Found). Proceed with the Create !!! ", isDebugEnabled)
-
- } else {
- // aai all errors
- String dataErrorMessage = "Unexpected Error Response from QueryAAINetworkName - " + returnCode
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
-
- }
-
- }
-
- utils.log("DEBUG", " AAI call, CRENWKI_isAAIqueryNameGood? : " + execution.getVariable("CRENWKI_isAAIqueryNameGood"), isDebugEnabled)
-
-
- } catch (Exception ex) {
- // try error
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow - callRESTQueryAAINetworkName() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTQueryAAICloudRegion (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- try {
- String networkInputs = execution.getVariable("CRENWKI_networkInputs")
- String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
- cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
-
- // Prepare AA&I url
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUtil = new AaiUtil(this)
- String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
- String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
- utils.logAudit(queryCloudRegionRequest)
- execution.setVariable("CRENWKI_queryCloudRegionRequest", queryCloudRegionRequest)
- utils.log("DEBUG", " CRENWKI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
-
- String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
- String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion)
-
- if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
- execution.setVariable("CRENWKI_cloudRegionPo", cloudRegionPo)
- execution.setVariable("CRENWKI_cloudRegionSdnc", cloudRegionSdnc)
- execution.setVariable("CRENWKI_isCloudRegionGood", true)
-
- } else {
- String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable("CRENWKI_queryCloudRegionReturnCode")
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
-
- utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("CRENWKI_isCloudRegionGood"), isDebugEnabled)
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- // try error
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTQueryAAINetworkId(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- try {
- // get variables
- String assignSDNCResponse = execution.getVariable("CRENWKI_assignSDNCResponse")
- String networkId = utils.getNodeText1(assignSDNCResponse, "network-id")
- networkId = UriUtils.encode(networkId,"UTF-8")
- String messageId = execution.getVariable("CRENWKI_messageId")
-
- // Prepare AA&I url
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
- utils.logAudit(queryIdAAIRequest)
- execution.setVariable("CRENWKI_queryIdAAIRequest", queryIdAAIRequest)
- utils.log("DEBUG", " CRENWKI_queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryIdAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRENWKI_aaiIdReturnCode", returnCode)
-
- utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
-
- if (returnCode=='200') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("CRENWKI_queryIdAAIResponse", aaiResponseAsString)
- utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
-
- } else {
- if (returnCode=='404') {
- String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
- utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled)
- 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
- utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
- }
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTReQueryAAINetworkId(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- try {
- // get variables
- String networkId = utils.getNodeText1(execution.getVariable("CRENWKI_assignSDNCResponse"), "network-id")
- networkId = UriUtils.encode(networkId,"UTF-8")
- String messageId = execution.getVariable("CRENWKI_messageId")
-
- // Prepare AA&I url
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
- utils.logAudit(requeryIdAAIRequest)
- execution.setVariable("CRENWKI_requeryIdAAIRequest", requeryIdAAIRequest)
- utils.log("DEBUG", " CRENWKI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(requeryIdAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRENWKI_aaiRequeryIdReturnCode", returnCode)
- utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
-
- if (returnCode=='200') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("CRENWKI_requeryIdAAIResponse", aaiResponseAsString)
- utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
-
- String netId = utils.getNodeText1(aaiResponseAsString, "network-id")
- String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
- String networkOutputs =
- """<network-outputs>
- <network-id>${netId}</network-id>
- <network-name>${netName}</network-name>
- </network-outputs>"""
- execution.setVariable("CRENWKI_networkOutputs", networkOutputs)
- utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
-
- } else {
- if (returnCode=='404') {
- String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
- utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled)
- 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
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
- }
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTQueryAAINetworkVpnBinding(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- try {
-
- // get variables
- String messageId = execution.getVariable("CRENWKI_messageId")
- String queryIdAAIResponse = execution.getVariable("CRENWKI_queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
- String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
- utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
-
- // Check if Vnf Binding is present, then build a List of vnfBinding
- List vpnBindingUri = networkUtils.getVnfBindingObject(relationship)
- int vpnCount = vpnBindingUri.size()
- execution.setVariable("CRENWKI_vpnCount", vpnCount)
- utils.log("DEBUG", " CRENWKI_vpnCount - " + vpnCount, isDebugEnabled)
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
-
- if (vpnCount > 0) {
- execution.setVariable("CRENWKI_vpnBindings", vpnBindingUri)
- utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled)
-
- 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)
- } else {
- queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i]
- }
-
- } 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
- }
-
- utils.logAudit(queryVpnBindingAAIRequest)
- execution.setVariable("CRENWKI_queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
- utils.log("DEBUG", " CRENWKI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryVpnBindingAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRENWKI_aaiQqueryVpnBindingReturnCode", returnCode)
- utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
-
- if (returnCode=='200') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("CRENWKI_queryVpnBindingAAIResponse", aaiResponseAsString)
- utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
-
- String routeTarget = ""
- if (utils.nodeExists(aaiResponseAsString, "global-route-target")) {
- routeTarget = utils.getNodeText1(aaiResponseAsString, "global-route-target")
- routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n'
- }
-
- } else {
- if (returnCode=='404') {
- String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)."
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- 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
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
- }
- }
-
- } // end loop
-
- execution.setVariable("CRENWKI_routeCollection", routeTargets)
- utils.log("DEBUG", " CRENWKI_routeCollection - " + '\n' + routeTargets, isDebugEnabled)
-
- } else {
- // reset return code to success
- execution.setVariable("CRENWKI_aaiQqueryVpnBindingReturnCode", "200")
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String schemaVersion = aaiUriUtil.getNamespaceFromUri(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("CRENWKI_queryVpnBindingAAIResponse", aaiStubResponseAsXml)
- execution.setVariable("CRENWKI_routeCollection", "<routeTargets/>")
- utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTQueryAAINetworkPolicy(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- try {
- // get variables
- String messageId = execution.getVariable("CRENWKI_messageId")
- String queryIdAAIResponse = execution.getVariable("CRENWKI_queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
- String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
- utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
-
- // Check if Network Policy is present, then build a List of network policy
- List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship)
- int networkPolicyCount = networkPolicyUriList.size()
- execution.setVariable("CRENWKI_networkPolicyCount", networkPolicyCount)
- utils.log("DEBUG", " CRENWKI_networkPolicyCount - " + networkPolicyCount, isDebugEnabled)
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
-
- if (networkPolicyCount > 0) {
- execution.setVariable("CRENWKI_networkPolicyUriList", networkPolicyUriList)
- utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled)
-
- 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)
- } else {
- queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i]
- }
- } 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
-
- }
-
-
- utils.logAudit(queryNetworkPolicyAAIRequest)
- execution.setVariable("CRENWKI_queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
- utils.log("DEBUG", " CRENWKI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryNetworkPolicyAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRENWKI_aaiQqueryNetworkPolicyReturnCode", returnCode)
- utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
-
- if (returnCode=='200') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("CRENWKI_queryNetworkPolicyAAIResponse", aaiResponseAsString)
- utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
-
- String networkPolicy = ""
- if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
- networkPolicy = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn")
- networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
- }
-
- } else {
- if (returnCode=='404') {
- String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)."
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- 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
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
- }
- }
-
- } // end loop
-
- execution.setVariable("CRENWKI_networkCollection", networkPolicies)
- utils.log("DEBUG", " CRENWKI_networkCollection - " + '\n' + networkPolicies, isDebugEnabled)
-
- } else {
- // reset return code to success
- execution.setVariable("CRENWKI_aaiQqueryNetworkPolicyReturnCode", "200")
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String schemaVersion = aaiUriUtil.getNamespaceFromUri(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("CRENWKI_queryNetworkPolicyAAIResponse", aaiStubResponseAsXml)
- execution.setVariable("CRENWKI_networkCollection", "<policyFqdns/>")
- utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTQueryAAINetworkTableRef(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- try {
- // get variables
- String messageId = execution.getVariable("CRENWKI_messageId")
- String queryIdAAIResponse = execution.getVariable("CRENWKI_queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
- String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
- utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
-
- // Check if Network TableREf is present, then build a List of network policy
- List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship)
- int networkTableRefCount = networkTableRefUriList.size()
- execution.setVariable("CRENWKI_networkTableRefCount", networkTableRefCount)
- utils.log("DEBUG", " CRENWKI_networkTableRefCount - " + networkTableRefCount, isDebugEnabled)
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
-
- if (networkTableRefCount > 0) {
- execution.setVariable("CRENWKI_networkTableRefUriList", networkTableRefUriList)
- utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled)
-
- // 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)
- } else {
- queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i]
- }
- } 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
-
- }
-
-
- utils.logAudit(queryNetworkTableRefAAIRequest)
- execution.setVariable("CRENWKI_queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
- utils.log("DEBUG", " CRENWKI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryNetworkTableRefAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRENWKI_aaiQqueryNetworkTableRefReturnCode", returnCode)
- utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
-
- if (returnCode=='200') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("CRENWKI_queryNetworkTableRefAAIResponse", aaiResponseAsString)
- utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
-
- String networkTableRef = ""
- if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
- networkTableRef = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn")
- networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
- }
-
- } else {
- if (returnCode=='404') {
- String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- 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
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
- }
- }
-
- } // end loop
-
- execution.setVariable("CRENWKI_tableRefCollection", networkTableRefs)
- utils.log("DEBUG", " CRENWKI_tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled)
-
- } else {
- // reset return code to success
- execution.setVariable("CRENWKI_aaiQqueryNetworkTableRefReturnCode", "200")
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String schemaVersion = aaiUriUtil.getNamespaceFromUri(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("CRENWKI_queryNetworkTableRefAAIResponse", aaiStubResponseAsXml)
- execution.setVariable("CRENWKI_tableRefCollection", "<routeTableFqdns/>")
- utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
-
- public void callRESTUpdateContrailAAINetwork(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
-
- try {
- // get variables
- String networkId = utils.getNodeText1(execution.getVariable("CRENWKI_assignSDNCResponse"), "network-id")
- networkId = UriUtils.encode(networkId,"UTF-8")
- String requeryIdAAIResponse = execution.getVariable("CRENWKI_requeryIdAAIResponse")
- String createNetworkResponse = execution.getVariable("CRENWKI_createNetworkResponse")
- String messageId = execution.getVariable("CRENWKI_messageId")
-
- // Prepare url
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId
-
- utils.logAudit(updateContrailAAIUrlRequest)
- execution.setVariable("CRENWKI_updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
- utils.log("DEBUG", " CRENWKI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled)
-
- //Prepare payload (PUT)
- String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
- String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion)
- String payloadXml = utils.formatXml(payload)
- utils.logAudit(payloadXml)
- execution.setVariable("CRENWKI_updateContrailAAIPayloadRequest", payloadXml)
- utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(updateContrailAAIUrlRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.httpPut(payload)
- String returnCode = response.getStatusCode()
- execution.setVariable("CRENWKI_aaiUpdateContrailReturnCode", returnCode)
-
- utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled)
-
- String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
-
- if (returnCode=='200') {
- utils.logAudit(aaiUpdateContrailResponseAsString)
- execution.setVariable("CRENWKI_updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
- utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled)
- // Point-of-no-return is set to false, rollback not needed.
- execution.setVariable("CRENWKI_isPONR", true)
-
- } else {
- if (returnCode=='404') {
- String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)."
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- 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
- utils.log("DEBUG", errorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage)
- }
- }
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void prepareCreateNetworkRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside prepareCreateNetworkRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- try {
-
- // get variables
- String requestId = execution.getVariable("CRENWKI_requestId")
- String messageId = execution.getVariable("CRENWKI_messageId")
- String source = execution.getVariable("CRENWKI_source")
-
- String requestInput = execution.getVariable("CRENWKI_networkRequest")
- String queryIdResponse = execution.getVariable("CRENWKI_queryIdAAIResponse")
- String cloudRegionId = execution.getVariable("CRENWKI_cloudRegionPo")
- String backoutOnFailure = execution.getVariable("CRENWKI_rollbackEnabled")
-
- // Prepare Network request
- String routeCollection = execution.getVariable("CRENWKI_routeCollection")
- String policyCollection = execution.getVariable("CRENWKI_networkCollection")
- String tableCollection = execution.getVariable("CRENWKI_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:", "")
- utils.logAudit(buildDeleteNetworkRequestAsString)
-
- execution.setVariable("CRENWKI_createNetworkRequest", buildDeleteNetworkRequestAsString)
- utils.log("DEBUG", " CRENWKI_createNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
-
- } catch (Exception ex) {
- String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareCreateNetworkRequest() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void prepareSDNCRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside prepareSDNCRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- try {
- // get variables
- String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
- String createNetworkInput = execution.getVariable("CRENWKI_networkRequest")
- String cloudRegionId = execution.getVariable("CRENWKI_cloudRegionSdnc")
-
- String networkId = ""
- if (utils.nodeExists(createNetworkInput, "network-id")) {
- networkId = utils.getNodeText1(createNetworkInput, "network-id")
- }
- if (networkId == null) {networkId = ""}
-
- String serviceInstanceId = utils.getNodeText1(createNetworkInput, "service-instance-id")
-
- // 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "NetworkActivateRequest", cloudRegionId, networkId, null)
-
- String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
- utils.logAudit(sndcTopologyCreateRequesAsString)
- execution.setVariable("CRENWKI_assignSDNCRequest", sndcTopologyCreateRequesAsString)
- utils.log("DEBUG", " CRENWKI_assignSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
-
-
- } catch (Exception ex) {
- String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareSDNCRequest() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void prepareDBRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareDBRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- String networkOutputs = execution.getVariable("CRENWKI_networkOutputs")
- String networkName = ""
- try {
- networkName = utils.getNodeText1(networkOutputs, "network-name")
- if (networkName == null) {networkName = ""}
- } catch (Exception ex) {
- networkName = ""
- utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled)
- }
- String networkId = ""
- try {
- networkId = utils.getNodeText1(networkOutputs, "network-id")
- if (networkId == null) {networkId = ""}
- } catch (Exception) {
- networkId = ""
- utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled)
- }
- String requestId = execution.getVariable("CRENWKI_requestId")
-
- String statusMessage = ""
- if (execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE") {
- // SILENT SUCCESS
- statusMessage = "Network " + networkName + " already exists. Silent success."
- } else {
- statusMessage = "Network successfully created."
- }
-
- String dbRequest =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>COMPLETED</requestStatus>
- <progress>100</progress>
- <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
- <networkId>${networkId}</networkId>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
- execution.setVariable("CRENWKI_createDBRequest", buildDeleteDBRequestAsString)
- utils.log("DEBUG", " DB Adapter Request - " + "\n" + buildDeleteDBRequestAsString, isDebugEnabled)
- utils.logAudit(buildDeleteDBRequestAsString)
-
- } catch (Exception ex) {
- String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareDBRequest() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void prepareDBRequestError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareDBRequestError of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- String statusMessage = ""
- WorkflowException wfe = null
- if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
- wfe = execution.getVariable("WorkflowException")
- statusMessage = wfe.getErrorMessage()
- } else {
- String workflowException = execution.getVariable("WorkflowException")
- try {
- statusMessage = utils.getNodeText1(workflowException, "ErrorMessage")
- } catch (Exception ex) {
- statusMessage = "Encountered Error during DB Update. " + ex.getMessage()
- }
- }
- String networkOutputs = execution.getVariable("CRENWKI_networkOutputs")
- String requestId = execution.getVariable("CRENWKI_requestId")
- String networkId = ""
- try {
- networkId = utils.getNodeText1(networkOutputs, "network-id")
- if (networkId == null) {networkId = ""}
- } catch (Exception) {
- networkId = ""
- utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled)
- }
- String networkName = ""
- try {
- networkName = utils.getNodeText1(networkOutputs, "network-name")
- if (networkName == null) {networkName = ""}
- } catch (Exception ex) {
- networkName = ""
- utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled)
- }
- String dbRequest =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>FAILED</requestStatus>
- <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- execution.setVariable("CRENWKI_createDBRequest", dbRequest)
- utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
- utils.logAudit(dbRequest)
-
- } catch (Exception ex) {
- String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareDBRequestError() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
-
- // **************************************************
- // Post or Validate Response Section
- // **************************************************
-
- public void validateCreateNetworkResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside validateNetworkResponse of CreateNetworkInstanceInfra *****", isDebugEnabled)
-
- try {
- String returnCode = execution.getVariable("CRENWKI_networkReturnCode")
- String networkResponse = execution.getVariable("CRENWKI_createNetworkResponse")
- if (networkResponse==null) {
- networkResponse="" // reset
- }
-
- utils.log("DEBUG", " Network Adapter create responseCode: " + returnCode, isDebugEnabled)
-
- String errorMessage = ""
- if (returnCode == "200") {
- execution.setVariable("CRENWKI_isNetworkRollbackNeeded", true)
- utils.logAudit(networkResponse)
- execution.setVariable("CRENWKI_createNetworkResponse", networkResponse)
- utils.log("DEBUG", " Network Adapter create Success Response - " + "\n" + networkResponse, isDebugEnabled)
-
- // prepare rollback data
- String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
- String rollbackNetwork =
- """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://com.att.mso/network">
- ${rollbackData}
- </NetworkAdapter:rollbackNetwork>"""
- String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
- execution.setVariable("CRENWKI_rollbackNetworkRequest", rollbackNetworkXml)
- utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
-
- } 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.getNodeText1(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 CreateNetworkInstanceInfra flow. validateCreateNetworkResponse() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
-
- }
-
- public void validateSDNCResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside validateSDNCResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- String response = execution.getVariable("CRENWKI_assignSDNCResponse")
- WorkflowException workflowException = null
- try {
- workflowException = execution.getVariable("CRENWKI_WorkflowException")
- //execution.setVariable("WorkflowException", workflowException)
- } catch (Exception ex) {
- utils.log("DEBUG", " Sdnc 'WorkflowException' object is empty or null. ", isDebugEnabled)
- }
-
- boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
-
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
- sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
- // reset variable
- String assignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable("CRENWKI_assignSDNCResponse"))
- assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
- execution.setVariable("CRENWKI_assignSDNCResponse", assignSDNCResponseDecodeXml)
-
- if (execution.getVariable("CRENWKI_sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess'
- execution.setVariable("CRENWKI_isSdncRollbackNeeded", true)
- utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
-
- } else {
- utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
-
- }
-
-
- public void postProcessResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside postProcessResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- try {
- // Display DB response: CRENWKI_createDBResponse / CRENWKI_dbReturnCode
- String dbReturnCode = execution.getVariable("CRENWKI_dbReturnCode")
- utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- String createDBResponse = execution.getVariable("CRENWKI_createDBResponse")
- utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + createDBResponse, isDebugEnabled)
- utils.logAudit(createDBResponse)
-
- String source = execution.getVariable("CRENWKI_source")
- String requestId = execution.getVariable("CRENWKI_requestId")
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</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)
-
- if (execution.getVariable("CRENWKI_orchestrationStatus") != "ACTIVE") {
- // normal path
- if (dbReturnCode == "200") {
- utils.logAudit(createDBResponse)
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable("CRENWKI_Success", true)
- execution.setVariable("CRENWKI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
- utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
- } else {
- String errorMessage = " DB Update failed, code: " + dbReturnCode
- utils.log("DEBUG", errorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
-
- }
-
- } else {
- // silent Success path
- utils.logAudit(createDBResponse)
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable("CRENWKI_Success", true)
- execution.setVariable("CRENWKI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
- utils.log("DEBUG", " Silent SUCCESS going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. postProcessResponse() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
-
- }
-
- public void prepareSDNCRollbackRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- try {
- // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException.
- execution.setVariable("CRENWKI_WorkflowException", execution.getVariable("WorkflowException"))
- // get variables
- String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
- String createNetworkInput = execution.getVariable("CRENWKI_networkRequest")
- String cloudRegionId = execution.getVariable("CRENWKI_cloudRegionSdnc")
- String assignSDNCResponse = execution.getVariable("CRENWKI_assignSDNCResponse")
- String networkId = utils.getNodeText1(assignSDNCResponse, "network-id")
-
- String serviceInstanceId = utils.getNodeText1(createNetworkInput, "service-instance-id")
-
- // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
- String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null)
- String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
- execution.setVariable("CRENWKI_rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
- utils.log("DEBUG", " Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled)
-
-
- } catch (Exception ex) {
- String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void validateRollbackResponses (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- // validate PO network rollback response
- String rollbackNetworkErrorMessages = ""
- Boolean isNetworkRollbackNeeded = execution.getVariable("CRENWKI_isNetworkRollbackNeeded")
- if (isNetworkRollbackNeeded == true) {
- utils.log("DEBUG", " NetworkRollback Code - " + execution.getVariable("CRENWKI_rollbackNetworkReturnCode"), isDebugEnabled)
- utils.log("DEBUG", " NetworkRollback Response - " + execution.getVariable("CRENWKI_rollbackNetworkResponse"), isDebugEnabled)
-
- String rollbackNetworkReturnCode = execution.getVariable("CRENWKI_rollbackNetworkReturnCode")
- String rollbackNetworkResponse = execution.getVariable("CRENWKI_rollbackNetworkResponse")
- if (rollbackNetworkReturnCode != "200") {
- rollbackNetworkErrorMessages = " + PO Network rollback failed. "
- } else {
- rollbackNetworkErrorMessages = " + PO Network rollback completed."
- }
-
- }
-
- // validate SDNC rollback response
- String rollbackSdncErrorMessages = ""
- Boolean isSdncRollbackNeeded = execution.getVariable("CRENWKI_isSdncRollbackNeeded")
- if (isSdncRollbackNeeded == true) {
- String rollbackSDNCReturnCode = execution.getVariable("CRENWKI_rollbackSDNCReturnCode")
- String rollbackSDNCReturnInnerCode = ""
- String rollbackSDNCResponse = execution.getVariable("CRENWKI_rollbackSDNCResponse")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
- rollbackSDNCResponse = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
- rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
-
- if (rollbackSDNCReturnCode == "200") {
- if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
- rollbackSDNCReturnInnerCode = utils.getNodeText1(rollbackSDNCResponse, "response-code")
- if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
- rollbackSdncErrorMessages = " + SNDC rollback completed."
- } else {
- rollbackSdncErrorMessages = " + SDNC rollback failed. "
- }
- } else {
- rollbackSdncErrorMessages = " + SNDC rollback completed."
- }
- } else {
- rollbackSdncErrorMessages = " + SDNC rollback failed. "
- }
-
- utils.log("DEBUG", " SDNC rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
- utils.log("DEBUG", " SDNC rollback Response - " + rollbackSDNCResponse, isDebugEnabled)
-
- }
-
- //WorkflowException wfe = execution.getVariable("WorkflowException")
- //String statusMessage = wfe.getErrorMessage()
- //int errorCode = wfe.getErrorCode()
-
- String statusMessage = ""
- int errorCode = 0
- WorkflowException wfe = execution.getVariable("WorkflowException")
- if (wfe instanceof WorkflowException) {
- statusMessage = wfe.getErrorMessage()
- errorCode = wfe.getErrorCode()
- } else {
- if (execution.getVariable("CRENWKI_WorkflowException") instanceof WorkflowException) {
- // get saved WorkflowException
- WorkflowException swfe = execution.getVariable("CRENWKI_WorkflowException")
- statusMessage = swfe.getErrorMessage()
- errorCode = swfe.getErrorCode()
- } else {
- statusMessage = "Encountered Error, please see previous tasks/activities/steps for error messages."
- errorCode = 7000
- }
- }
-
- // recreate WorkflowException to include the rollback Message
- statusMessage = statusMessage + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
- exceptionUtil.buildWorkflowException(execution, errorCode, statusMessage)
-
- } catch (Exception ex) {
- execution.setVariable("WorkflowException", null)
- String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. validateRollbackResponses() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
-
-
- }
-
- // *******************************
- // Build Error Section
- // *******************************
-
- // Prepare for FalloutHandler
- public void buildErrorResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
-
- String dbReturnCode = execution.getVariable("CRENWKI_dbReturnCode")
- utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- String createDBResponse = execution.getVariable("CRENWKI_createDBResponse")
- utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + createDBResponse, isDebugEnabled)
- utils.logAudit(createDBResponse)
-
- String falloutHandlerRequest = ""
- String requestId = execution.getVariable("CRENWKI_requestId")
- String source = execution.getVariable("CRENWKI_source")
- try {
- execution.setVariable("CRENWKI_Success", false)
- WorkflowException wfe = execution.getVariable("WorkflowException")
- String errorCode = String.valueOf(wfe.getErrorCode())
- String errorMessage = wfe.getErrorMessage()
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.logAudit(falloutHandlerRequest)
- execution.setVariable("CRENWKI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
-
- } catch (Exception ex) {
- String errorException = " Bpmn error encountered in CreateNetworkInstanceInfra flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
- utils.log("DEBUG", errorException, isDebugEnabled)
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- execution.setVariable("CRENWKI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
-
- }
-
- }
-
-
- public void sendSyncError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
-
- String requestId = execution.getVariable("att-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) {
- utils.log("DEBUG", " Bpmn error encountered in CreateNetworkInstanceInfra flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled)
- }
-
- }
-
-
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- try{
- utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
- execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
- }catch(BpmnError b){
- utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy
deleted file mode 100644
index 3c3bb81e51..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy
+++ /dev/null
@@ -1,776 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import groovy.xml.XmlUtil
-import groovy.json.*
-
-import org.openecomp.mso.bpmn.core.json.JsonUtils
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import java.util.UUID;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-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;
-
-/**
- * This groovy class supports the <class>CreateServiceInstance.bpmn</class> process.
- *
- */
-public class CreateServiceInstanceInfra extends AbstractServiceTaskProcessor {
-
- String Prefix="CRESI_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- JsonUtils jsonUtil = new JsonUtils()
- VidUtils vidUtils = new VidUtils()
-
- /**
- * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
- * @param execution
- */
- public InitializeProcessVariables(Execution execution){
- /* Initialize all the process variables in this block */
-
- execution.setVariable("CRESI_CreateServiceInstanceJasonRequest", "")
- execution.setVariable("CRESI_globalSubscriberId", "")
- execution.setVariable("CRESI_serviceInstanceName", "")
- execution.setVariable("CRESI_newServiceInstanceId", "")
- execution.setVariable("CRESI_messageId", "")
- execution.setVariable("CRESI_requestId", "")
-
- execution.setVariable("CRESI_queryAAIGlobalCustomerIdUrlRequest", "")
- execution.setVariable("CRESI_queryAAIGlobalCustomerIdResponse", "")
- execution.setVariable("CRESI_queryAAIGlobalCustomerIdCode", "")
-
- execution.setVariable("CRESI_queryAAISINameUrlRequest", "")
- execution.setVariable("CRESI_queryAAISINamePayloadRequest", "")
- execution.setVariable("CRESI_queryAAISINameResponse", "")
- execution.setVariable("CRESI_queryAAISINameCode", "")
-
- execution.setVariable("CRESI_createSIinAAIUrlRequest", "")
- execution.setVariable("CRESI_createSIinAAIPayloadRequest", "")
- execution.setVariable("CRESI_createSIinAAIResponse", "")
- execution.setVariable("CRESI_createSIinAAICode", "")
-
- execution.setVariable("CRESI_createDBRequest", "")
- execution.setVariable("CRESI_createDBResponse", "")
- execution.setVariable("CRESI_createDBCode", "")
-
- execution.setVariable("CRESI_createDBInfraErrorRequest", "")
- execution.setVariable("CRESI_errorDBInfraErrorResponse", "")
- execution.setVariable("CRESI_errorDBInfraErrorErrorCode", "")
-
- execution.setVariable("CRESI_CompleteMsoProcessRequest", "")
- execution.setVariable("CRESI_FalloutHandlerRequest", "")
- execution.setVariable("CRESI_Success", false)
- execution.setVariable("CRESI_unexpectedError", "")
-
- }
-
- // **************************************************
- // Pre or Prepare Request Section
- // **************************************************
- /**
- * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
- * @param execution
- */
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside preProcessRequest CreateServiceInstanceInfra Request ***** ", isDebugEnabled)
-
- try {
- // initialize flow variables
- InitializeProcessVariables(execution)
-
- // check for incoming json message/input
- String createServiceInstanceIncoming = execution.getVariable("bpmnRequest")
- utils.logAudit(createServiceInstanceIncoming)
- execution.setVariable("CRESI_CreateServiceInstanceJasonRequest", createServiceInstanceIncoming);
- println 'createServiceInstanceIncoming - ' + createServiceInstanceIncoming
-
- // extract requestId
- String requestId = execution.getVariable("att-mso-request-id")
- execution.setVariable("CRESI_requestId", requestId)
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- execution.setVariable("serviceInstanceId", serviceInstanceId)
-
- String requestAction = execution.getVariable("requestAction")
- execution.setVariable("requestAction", requestAction)
-
- String source = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestInfo.source")
- execution.setVariable("CRESI_source", source)
-
- // extract globalSubscriberId
- String globalSubscriberId = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.subscriberInfo.globalSubscriberId")
-
- // prepare messageId
- String messageId = execution.getVariable("CRESI_messageId") // for testing
- if (messageId == null || messageId == "") {
- messageId = UUID.randomUUID()
- utils.log("DEBUG", " CRESI_messageId, random generated: " + messageId, isDebugEnabled)
- } else {
- utils.log("DEBUG", " CRESI_messageId, pre-assigned: " + messageId, isDebugEnabled)
- }
- execution.setVariable("CRESI_messageId", messageId)
-
- // 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("CRESI_globalSubscriberId", globalSubscriberId)
-
- }
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
- logDebug('AAI namespace is: ' + aaiNamespace, isDebugEnabled)
- execution.setVariable("CRESI_aaiNamespace","${aaiNamespace}")
-
- String newServiceInstanceId = execution.getVariable("CRESI_testServiceInstanceId") // for testing variable
- if ((newServiceInstanceId) == null || (newServiceInstanceId.isEmpty())) {
- newServiceInstanceId = UUID.randomUUID().toString()
- utils.log("DEBUG", " Generated new Service Instance: " + newServiceInstanceId , isDebugEnabled) // generated
- } else {
- utils.log("DEBUG", " Assigned new Service Instance: " + newServiceInstanceId , isDebugEnabled)
- }
- newServiceInstanceId = UriUtils.encode(newServiceInstanceId,"UTF-8")
- execution.setVariable("CRESI_newServiceInstanceId", newServiceInstanceId)
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex){
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- }
-
- public void sendSyncResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateServiceInstanceInfra ***** ", isDebugEnabled)
-
- try {
- String newServiceInstanceId = execution.getVariable("CRESI_newServiceInstanceId")
- String requestId = execution.getVariable("att-mso-request-id")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String syncResponse ="""{"requestReferences":{"instanceId":"${newServiceInstanceId}","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
- sendWorkflowResponse(execution, 202, syncResponse)
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- }
-
- public void callRESTQueryAAIGlobalSubscriberId (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAICustomer of CreateServiceInstanceInfra ***** " , isDebugEnabled)
-
- try {
- // get variables
- String messageId = execution.getVariable("CRESI_requestId")
- String globalSubscriberId = execution.getVariable("CRESI_globalSubscriberId")
- globalSubscriberId = UriUtils.encode(globalSubscriberId,"UTF-8")
-
- // Prepare AA&I url with globalCustomerId
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String queryAAISubscriberIdUrlRequest = "${aai_endpoint}${aai_uri}/${globalSubscriberId}"
- utils.logAudit(queryAAISubscriberIdUrlRequest)
- utils.log("DEBUG", " ***** AAI Query Subscriber Id Url: " + queryAAISubscriberIdUrlRequest, isDebugEnabled)
- execution.setVariable("CRESI_queryAAIGlobalCustomerIdUrlRequest", queryAAISubscriberIdUrlRequest)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryAAISubscriberIdUrlRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRESI_queryAAIGlobalCustomerIdCode", returnCode)
- utils.log("DEBUG", " ***** AAI Query Customer Subscriber Id Response Code : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
- execution.setVariable("CRESI_queryAAIGlobalCustomerIdResponse", aaiResponseAsString)
- utils.logAudit(aaiResponseAsString)
-
- if (returnCode=='200') {
- // Customer found by ID. FLow to proceed.
- utils.log("DEBUG", " CRESI_queryAAIGlobalCustomerIdResponse : " + aaiResponseAsString, isDebugEnabled)
-
- //TODO
- //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') {
- String errorMessage = " Customer Global Id not found (404) in AAI, Global Subscriber id: " + globalSubscriberId
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
-
- } else {
- if (aaiResponseAsString.contains("RESTFault")) {
- // build WorkflowException & throw new BpmnError("MSOWorkflowException")
- WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
- execution.setVariable("WorkflowException", workflowException)
- throw new BpmnError("MSOWorkflowException")
-
- } else {
- // aai all errors
- String errorMessage = " Unexpected Error Response from AAI during callRESTQueryAAICustomerSubcriberId() - " + returnCode
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
- }
-
- }
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error during method callRESTQueryAAICustomerSubcriberId() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- }
-
-
- public void callRESTQueryAAISIName (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAISIName of CreateServiceInstanceInfra ***** " , isDebugEnabled)
-
- try {
- // get variables
- String messageId = execution.getVariable("CRESI_requestId")
- String globalSubscriberId = execution.getVariable("CRESI_globalSubscriberId")
- globalSubscriberId = UriUtils.encode(globalSubscriberId,"UTF-8")
-
- // extract serviceType
- String createServiceInstanceIncoming = execution.getVariable("CRESI_CreateServiceInstanceJasonRequest");
- String serviceInstanceName = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestInfo.instanceName")
- serviceInstanceName = UriUtils.encode(serviceInstanceName,'UTF-8')
- String serviceType = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.modelName")
- serviceType = UriUtils.encode(serviceType,'UTF-8')
-
- // Prepare AA&I url
- //String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
-
- // seach by service instance name
-
- // Currently not designed, but this would search for service-instance-name within realm of customer:
- // https://{serverURL}/aai/{version}/business/customers/customer/{globalCustID}/service-subscriptions/service-subscription/{serviceType}/service-instances?service-instance-name={serviceInstanceName}
- //search for service-instance-name globally:
- String queryAAISINameUrlRequest = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
- utils.log("DEBUG", " ***** AAI Query Service Name Url: " + queryAAISINameUrlRequest, isDebugEnabled)
-
- utils.logAudit(queryAAISINameUrlRequest)
- execution.setVariable("CRESI_queryAAISINameUrlRequest", queryAAISINameUrlRequest)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryAAISINameUrlRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("CRESI_queryAAISINameCode", returnCode)
- utils.log("DEBUG", " ***** AAI Query Service Instance Name Response Code : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
- utils.log("DEBUG", " ***** AAI Query Service Instance Name Response : " +'\n'+ aaiResponseAsString, isDebugEnabled)
-
- if (returnCode=='200') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("CRESI_queryAAISINameResponse", aaiResponseAsString)
-
- if ( (aaiResponseAsString != null) && (aaiResponseAsString.contains("service-instance")) ) {
- // SI with same name was found
- serviceInstanceName = UriUtils.decode(serviceInstanceName,'UTF-8')
- String errorMessage = " Stopped creating Service Instance, already exists in AAI. Service instance name: " + serviceInstanceName
- utils.log("DEBUG", errorMessage, isDebugEnabled)
- exceptionUtil.buildWorkflowException(execution, 2500, errorMessage)
- } else {
- utils.log("DEBUG", "AAI return code 200, but no content found matching ServiceInstance name", isDebugEnabled)
- //Actual meaning is 404 Not Found
- execution.setVariable("CRESI_queryAAISINameCode", '404')
- }
-
- } else {
- if (returnCode=='404') {
- utils.log("DEBUG", " AAI Query return code = '404'. Proceed with the Create Service Instance !!! ", isDebugEnabled)
-
- } else {
- if (aaiResponseAsString.contains("RESTFault")) {
- // build WorkflowException
- WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
- execution.setVariable("WorkflowException", workflowException)
-
- } else {
- // aai all errors
- String errorMessage = " Unexpected Error Response from AAI during callRESTQueryAAISIName() - " + returnCode
- exceptionUtil.buildWorkflowException(execution, 2500, errorMessage)
- }
- }
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception excp) {
- // try error for method block
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow in method callRESTQueryAAISIName(). Error was - " + excp.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTCreateServiceInstanceInAAI(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTCreateServiceInstanceInAAI of CreateServiceInstanceInfra ***** " , isDebugEnabled)
-
- try {
-
- // get variables
- String messageId = execution.getVariable("CRESI_messageId")
- String newServiceInstanceId = execution.getVariable("CRESI_newServiceInstanceId")
-
- String globalSubcriberId = execution.getVariable("CRESI_globalSubscriberId")
- globalSubcriberId = UriUtils.encode(globalSubcriberId,"UTF-8")
-
- // get variable within incoming json
- String createServiceInstanceIncoming = execution.getVariable("CRESI_CreateServiceInstanceJasonRequest");
- String serviceType = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestParameters.subscriptionServiceType")
- if (serviceType != null || serviceType != "") {
- serviceType = UriUtils.encode(serviceType,"UTF-8")
- }
-
- String personaModelId = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.modelInvariantId")
- String personaModelVersion = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.modelVersion")
- String workloadContext = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.workload-context")
-
- String serviceInstanceName = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestInfo.instanceName")
-
- // Prepare url
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String createServiceInstanceAAIUrlRequest = "${aai_endpoint}${aai_uri}/${globalSubcriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${newServiceInstanceId}"
- utils.log("DEBUG", " ***** AAI Create Service Instance Url: " + createServiceInstanceAAIUrlRequest, isDebugEnabled)
-
- utils.logAudit(createServiceInstanceAAIUrlRequest)
- execution.setVariable("CRESI_createSIinAAIUrlRequest", createServiceInstanceAAIUrlRequest)
-
- //Prepare payload (PUT)
- String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
-
- String createServiceInstancePayload =
- """<service-instance xmlns="${execution.getVariable("CRESI_aaiNamespace")}">
- <service-instance-name>${serviceInstanceName}</service-instance-name>
- <persona-model-id>${personaModelId}</persona-model-id>
- <persona-model-version>${personaModelVersion}</persona-model-version>
- </service-instance>
- """.trim()
-
- utils.logAudit(createServiceInstancePayload)
- execution.setVariable("CRESI_createSIinAAIPayloadRequest", createServiceInstancePayload)
- utils.log("DEBUG", " 'payload' to create Service Instance in AAI - " + "\n" + createServiceInstancePayload, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(createServiceInstanceAAIUrlRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.httpPut(createServiceInstancePayload)
- String returnCode = response.getStatusCode()
- execution.setVariable("CRESI_createSIinAAICode", returnCode)
- utils.log("DEBUG", " ***** AAI Create Service Instance Response Code : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
- utils.logAudit(aaiResponseAsString)
-
- if (returnCode.toInteger() > 199 && returnCode.toInteger() < 203) {
- //200 OK 201 CREATED 202 ACCEPTED
- utils.log("DEBUG", " AAI Create Service Instance Success REST Response.", isDebugEnabled)
-
- } else {
- if (returnCode=='404') {
- String dataErrorMessage = " AAI Create Service Instance Failed, Error 404. Proposed new Create Instance Id was: " + newServiceInstanceId
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- } else {
- if (aaiResponseAsString.contains("RESTFault")) {
- // build WorkflowException & throw new BpmnError("MSOWorkflowException")
- WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
- execution.setVariable("WorkflowException", workflowException)
- throw new BpmnError("MSOWorkflowException")
-
- } else {
- // aai all errors
- String dataErrorMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error during create call in AAI - " + returnCode
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
- }
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception excep) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from method callRESTCreateServiceInstanceInAAI() - " + excep.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- // *******************************
- // Build DB request Section
- // *******************************
- public void prepareDBRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareDBRequest of CreateServiceInstanceInfra ***** ", isDebugEnabled)
-
- String requestId = execution.getVariable("CRESI_requestId")
- String statusMessage = "Service Instance successfully created."
- String serviceInstanceId = execution.getVariable("CRESI_newServiceInstanceId")
-
- //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://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>COMPLETED</requestStatus>
- <progress>100</progress>
- <vnfOutputs/>
- <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
- execution.setVariable("CRESI_createDBRequest", buildDeleteDBRequestAsString)
- utils.logAudit(buildDeleteDBRequestAsString)
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
-
- // *****************************************
- // Prepare Completion request Section
- // *****************************************
- public void postProcessResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside postProcessResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
-
- try {
- // Display Success scenario for DB update Response:
- String dbReturnCode = execution.getVariable("CRESI_createDBCode")
- utils.log("DEBUG", " ***** Success DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- utils.log("DEBUG", " ***** Success DB Update Response String: " + '\n' + execution.getVariable("CRESI_createDBResponse"), isDebugEnabled)
-
- if (dbReturnCode == "200") {
- String source = execution.getVariable("CRESI_source")
- String requestId = execution.getVariable("CRESI_requestId")
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:status-message>Service Instance has been created successfully.</aetgt:status-message>
- <aetgt:mso-bpel-name>BPMN Service Instance action: CREATE</aetgt:mso-bpel-name>
- </aetgt:MsoCompletionRequest>"""
-
- // Format Response
- String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
-
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable("CRESI_Success", true)
- execution.setVariable("CRESI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
- utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
-
- } else {
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from DB adapter, return code: " + dbReturnCode
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, exceptionMessage)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
-
- // *******************************
- // Build Error Section
- // *******************************
- public void prepareDBRequestError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside prepareDBRequestError of CreateServiceInstanceInfra ***** ", isDebugEnabled)
-
- try {
- String requestId = execution.getVariable("CRESI_requestId")
- String statusMessage = ""
- if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
- WorkflowException wfe = execution.getVariable("WorkflowException")
- statusMessage = wfe.getErrorMessage()
-
- } else {
- statusMessage = "Encountered Error during CreateServiceInstance 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://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>FAILED</requestStatus>
- <vnfOutputs/>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String buildDBRequestAsString = utils.formatXml(dbRequest)
- execution.setVariable("CRESI_createDBInfraErrorRequest", buildDBRequestAsString)
- utils.logAudit(buildDBRequestAsString)
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
- exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- // Prepare for FalloutHandler
- public void buildErrorResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("ERROR", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
-
- String falloutHandlerRequest = ""
- try {
- // Display Success scenario for DB update Response:
- String dbReturnCode = execution.getVariable("CRESI_errorDBInfraErrorErrorCode")
- utils.log("DEBUG", " ***** Error DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- utils.log("DEBUG", " ***** Error DB Update Response String: " + '\n' + execution.getVariable("CRESI_errorDBInfraErrorResponse"), isDebugEnabled)
-
- String requestId = execution.getVariable("CRESI_requestId")
- String source = execution.getVariable("CRESI_source")
-
- execution.setVariable("CRESI_Success", false)
- String errorMessage = ""
- String errorCode = ""
-
- if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
- WorkflowException wfe = execution.getVariable("WorkflowException")
- errorMessage = wfe.getErrorMessage()
- errorCode = wfe.getErrorCode().toString()
-
- } else {
- errorMessage = "Bpmn error encountered in CreateServiceInstance flow."
- errorCode = "2500"
-
- }
-
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.logAudit(falloutHandlerRequest)
- execution.setVariable("CRESI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
-
- } catch (Exception ex) {
- // rebuild workflow exception
- String requestId = execution.getVariable("CRESI_requestId")
- String source = execution.getVariable("CRESI_source")
- String errorException = " Build Error Response exception encountered during method buildErrorResponse(), preparing request for FalloutHandler: - " + ex.getMessage()
- utils.log("DEBUG", errorException, isDebugEnabled)
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
- execution.setVariable("CRESI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
-
- }
-
- }
-
- public void sendSyncError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside sendSyncError() of CreateServiceInstanceInfra ***** ", isDebugEnabled)
-
- 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://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- utils.logAudit(buildworkflowException)
- sendWorkflowResponse(execution, 500, buildworkflowException)
-
-
- } catch (Exception ex) {
- utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
- }
-
- }
-
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- try{
- utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
- execution.setVariable("CRESI_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
- }catch(BpmnError b){
- utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- execution.setVariable("CRESI_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-
-}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy
deleted file mode 100644
index 9cc756294c..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy
+++ /dev/null
@@ -1,873 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils;
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import java.util.UUID;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils
-
-import groovy.xml.XmlUtil
-import groovy.json.*
-
-public class DeleteNetworkInstanceInfra extends AbstractServiceTaskProcessor {
- String Prefix="DELNWKI_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- JsonUtils jsonUtil = new JsonUtils()
- VidUtils vidUtils = new VidUtils(this)
-
- public InitializeProcessVariables(Execution execution){
- /* Initialize all the process variables in this block */
-
- execution.setVariable("DELNWKI_DeleteNetworkInstanceInfraJsonRequest", "")
- execution.setVariable("DELNWKI_networkRequest", "")
- execution.setVariable("DELNWKI_networkRESTRequest", "")
- execution.setVariable("DELNWKI_CompleteMsoProcessRequest", "")
- execution.setVariable("DELNWKI_FalloutHandlerRequest", "")
- execution.setVariable("DELNWKI_isSilentSuccess", false)
- execution.setVariable("DELNWKI_Success", false)
- execution.setVariable("DELNWKI_isPONR", false) // Point-of-no-return, means, rollback is not needed
-
- execution.setVariable("DELNWKI_requestId", "")
- execution.setVariable("DELNWKI_source", "")
- execution.setVariable("DELNWKI_networkInputs", "")
-
- execution.setVariable("DELNWKI_queryAAIRequest","")
- execution.setVariable("DELNWKI_queryAAIResponse", "")
- execution.setVariable("DELNWKI_aaiReturnCode", "")
- execution.setVariable("DELNWKI_isAAIGood", false)
- execution.setVariable("DELNWKI_isVfRelationshipExist", false)
-
- // AAI query Cloud Region
- execution.setVariable("DELNWKI_queryCloudRegionRequest","")
- execution.setVariable("DELNWKI_queryCloudRegionReturnCode","")
- execution.setVariable("DELNWKI_queryCloudRegionResponse","")
- execution.setVariable("DELNWKI_cloudRegionPo","")
- execution.setVariable("DELNWKI_cloudRegionSdnc","")
-
- execution.setVariable("DELNWKI_deleteNetworkRequest", "")
- execution.setVariable("DELNWKI_deleteNetworkResponse", "")
- execution.setVariable("DELNWKI_networkReturnCode", "")
-
- execution.setVariable("DELNWKI_deleteSDNCRequest", "")
- execution.setVariable("DELNWKI_deleteSDNCResponse", "")
- execution.setVariable("DELNWKI_rollbackSDNCRequest", "")
- execution.setVariable("DELNWKI_rollbackSDNCResponse", "")
- execution.setVariable("DELNWKI_sdncReturnCode", "")
- execution.setVariable("DELNWKI_rollbackSDNCReturnCode", "")
- execution.setVariable("DELNWKI_isSdncRollbackNeeded", false)
- execution.setVariable("DELNWKI_sdncResponseSuccess", false)
-
- }
-
- // **************************************************
- // Pre or Prepare Request Section
- // **************************************************
-
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside preProcessRequest() DeleteNetworkV2 Request ***** ", isDebugEnabled)
-
- // initialize flow variables
- InitializeProcessVariables(execution)
-
- // get incoming message/input
- String deleteNetworkJsonIncoming = execution.getVariable("bpmnRequest")
- utils.logAudit(deleteNetworkJsonIncoming)
-
- try {
- def prettyJson = JsonOutput.prettyPrint(deleteNetworkJsonIncoming.toString())
- utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
-
- } catch (Exception ex) {
- String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
- // prepare messageId
- String messageId = execution.getVariable("DELNWKI_messageId") // test scenario
- if (messageId == null || messageId == "") {
- messageId = UUID.randomUUID()
- utils.log("DEBUG", " DELNWKI_messageId, random generated: " + messageId, isDebugEnabled)
- } else {
- utils.log("DEBUG", " DELNWKI_messageId, pre-assigned: " + messageId, isDebugEnabled)
- }
- execution.setVariable("DELNWKI_messageId", messageId)
-
- // PO Authorization Info / headers Authorization=
- String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
- utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
- try {
- def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
- execution.setVariable("BasicAuthHeaderValuePO",encodedString)
- execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
-
- } catch (IOException ex) {
- String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
- try {
-
- execution.setVariable("DELNWKI_DeleteNetworkInstanceInfraJsonRequest", deleteNetworkJsonIncoming)
-
- // recreate the xml network-request
- String networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, deleteNetworkJsonIncoming)
- execution.setVariable("DELNWKI_networkRequest", networkRequest)
- utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled)
-
- String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
- execution.setVariable("DELNWKI_networkInputs", networkInputs)
-
- String requestId = execution.getVariable("att-mso-request-id")
- if (requestId == null || requestId == "") {
- requestId = utils.getNodeText(networkRequest, "request-id")
- }
- execution.setVariable("DELNWKI_requestId", requestId)
- execution.setVariable("DELNWKI_source", utils.getNodeText(networkRequest, "source"))
-
- String networkId = ""
- if (utils.nodeExists(networkInputs, "network-id")) {
- networkId = utils.getNodeText1(networkInputs, "network-id")
- if (networkId == 'null' || networkId == "") {
- sendSyncError(execution)
- // missing value of network-name
- String dataErrorMessage = "network-request has missing 'network-id' element/value."
- utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
- }
-
- String lcpCloudRegion = ""
- if (utils.nodeExists(networkInputs, "aic-cloud-region")) {
- lcpCloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
- if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) {
- sendSyncError(execution)
- String dataErrorMessage = "network-request has missing 'aic-cloud-region' element/value."
- utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
- }
-
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex){
- // caught exception
- String exceptionMessage = "Exception Encountered in DeleteNetworkInstanceInfra, PreProcessRequest() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void sendSyncResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside sendSyncResponse() of DeleteNetworkV2 ***** ", isDebugEnabled)
-
- try {
- String requestId = execution.getVariable("att-mso-request-id")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String deleteNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestRequest, isDebugEnabled)
-
- sendWorkflowResponse(execution, 202, deleteNetworkRestRequest)
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Exception Encountered in DeleteNetworkInstanceInfra, sendSyncResponse() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTQueryAAI (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAI() of DeleteNetworkV2 ***** " , isDebugEnabled)
-
- // get variables
- String networkInputs = execution.getVariable("DELNWKI_networkInputs")
- String networkId = utils.getNodeText(networkInputs, "network-id")
- networkId = UriUtils.encode(networkId,"UTF-8")
- String messageId = execution.getVariable("DELNWKI_messageId")
-
- // Prepare AA&I url
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
- String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
- utils.logAudit(queryAAIRequest)
- execution.setVariable("DELNWKI_queryAAIRequest", queryAAIRequest)
- utils.log("DEBUG", " DELNWKI_AAIRequest - " + "\n" + queryAAIRequest, isDebugEnabled)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryAAIRequest);
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- Boolean isVfRelationshipExist = false
- try {
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- APIResponse response = client.get()
- String returnCode = response.getStatusCode()
- execution.setVariable("DELNWKI_aaiReturnCode", returnCode)
-
- utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
-
- String aaiResponseAsString = response.getResponseBodyAsString()
- aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
- execution.setVariable("DELNWKI_queryAAIResponse", aaiResponseAsString)
-
- if (returnCode=='200' || returnCode=='204') {
- utils.logAudit(aaiResponseAsString)
- execution.setVariable("DELNWKI_isAAIGood", true)
- utils.log("DEBUG", " AAI Query Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
- // verify if vf or vnf relationship exist
- if (utils.nodeExists(aaiResponseAsString, "relationship")) {
- NetworkUtils networkUtils = new NetworkUtils()
- isVfRelationshipExist = networkUtils.isVfRelationshipExist(aaiResponseAsString)
- execution.setVariable("DELNWKI_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)
-
- }
- }
- utils.log("DEBUG", " DELNWKI_isVfRelationshipExist - " + isVfRelationshipExist, isDebugEnabled)
-
- } else {
- execution.setVariable("DELNWKI_isAAIGood", false)
- if (returnCode=='404' || aaiResponseAsString == "" || aaiResponseAsString == null) {
- // not found // empty aai response
- execution.setVariable("DELNWKI_isSilentSuccess", true)
- utils.log("DEBUG", " AAI Query is Silent Success", isDebugEnabled)
-
- } 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
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
-
- }
- }
- }
-
- utils.log("DEBUG", " AAI Query call, isAAIGood? : " + execution.getVariable("DELNWKI_isAAIGood"), isDebugEnabled)
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Exception Encountered in DeleteNetworkInstanceInfra, callRESTQueryAAI() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void callRESTQueryAAICloudRegion (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of DeleteNetworkV2 ***** " , isDebugEnabled)
-
- try {
- String networkInputs = execution.getVariable("DELNWKI_networkInputs")
- String cloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
- cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
- // Prepare AA&I url
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUtil = new AaiUtil(this)
- String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
- String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
- utils.logAudit(queryCloudRegionRequest)
- execution.setVariable("DELNWKI_queryCloudRegionRequest", queryCloudRegionRequest)
- utils.log("DEBUG", " DELNWKI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
-
- String cloudRegionPo = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
- String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "SDNC", cloudRegion)
-
- if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
- execution.setVariable("DELNWKI_cloudRegionPo", cloudRegionPo)
- execution.setVariable("DELNWKI_cloudRegionSdnc", cloudRegionSdnc)
-
- } else {
- String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable("DELNWKI_queryCloudRegionReturnCode")
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, callRESTQueryAAICloudRegion(). Unexpected Response from AAI - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void prepareNetworkRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside prepareNetworkRequest of DeleteNetworkV2 ***** ", isDebugEnabled)
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- try {
- // get variables
- String cloudSiteId = execution.getVariable("DELNWKI_cloudRegionPo")
- String networkInputs = execution.getVariable("DELNWKI_networkInputs")
- String tenantId = utils.getNodeText(networkInputs, "tenant-id")
- String networkType = utils.getNodeText(networkInputs, "network-type")
- String networkId = utils.getNodeText(networkInputs, "network-id")
-
- String networkStackId = ""
- networkStackId = utils.getNodeText1(execution.getVariable("DELNWKI_queryAAIResponse"), "heat-stack-id")
- if (networkStackId == 'null' || networkStackId == "") {
- networkStackId = "force_delete"
- }
-
- String requestId = execution.getVariable("DELNWKI_requestId")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // Added new Elements
- String messageId = execution.getVariable("DELNWKI_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 deleteNetworkRequest = """
- <deleteNetworkRequest>
- <cloudSiteId>${cloudSiteId}</cloudSiteId>
- <tenantId>${tenantId}</tenantId>
- <networkId>${networkId}</networkId>
- <networkStackId>${networkStackId}</networkStackId>
- <networkType>${networkType}</networkType>
- <skipAAI>true</skipAAI>
- <msoRequest>
- <requestId>${requestId}</requestId>
- <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
- </msoRequest>
- <messageId>${messageId}</messageId>
- <notificationUrl>${notificationUrl}</notificationUrl>
- </deleteNetworkRequest>
- """.trim()
-
- utils.log("DEBUG", " DELNWKI_deleteNetworkRequest - " + "\n" + deleteNetworkRequest, isDebugEnabled)
- // Format Response
- String buildDeleteNetworkRequestAsString = utils.formatXml(deleteNetworkRequest)
- utils.logAudit(buildDeleteNetworkRequestAsString)
- utils.log("DEBUG", " DELNWKI_deleteNetworkRequestAsString - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
-
- String restURL = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
- execution.setVariable("URN_mso_adapters_network_rest_endpoint", restURL + "/" + networkId)
- utils.log("DEBUG", "URN_mso_adapters_network_rest_endpoint - " + "\n" + restURL + "/" + networkId, isDebugEnabled)
-
- execution.setVariable("DELNWKI_deleteNetworkRequest", buildDeleteNetworkRequestAsString)
- utils.log("DEBUG", " DELNWKI_deleteNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
- }
- catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareNetworkRequest(). Unexpected Response from AAI - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- 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(Execution execution) {
- def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugEnabled)
-
- try {
-
- String vnfAdapterUrl = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
- String vnfAdapterRequest = execution.getVariable("DELNWKI_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("DELNWKI_networkReturnCode", response.getStatusCode())
- execution.setVariable("DELNWKI_deleteNetworkResponse", response.getResponseBodyAsString())
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, sendRequestToVnfAdapter() - " + ex.getMessage()
- logError(exceptionMessage)
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
- }
-
-
- public void prepareSDNCRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside prepareSDNCRequest of DeleteNetworkV2 ***** ", isDebugEnabled)
-
- try {
- // get variables
- String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
- String deleteNetworkInput = execution.getVariable("DELNWKI_networkRequest")
-
- String networkId = ""
- if (utils.nodeExists(deleteNetworkInput, "network-id")) {
- networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
- }
- if (networkId == 'null') {networkId = ""}
-
- String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
-
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
- String cloudRegionId = execution.getVariable("DELNWKI_cloudRegionSdnc")
- // 1. prepare delete topology via SDNC Adapter SUBFLOW call
- String sndcTopologyDeleteRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "delete", "DisconnectNetworkRequest", cloudRegionId, networkId, null)
- String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
- utils.logAudit(sndcTopologyDeleteRequesAsString)
- execution.setVariable("DELNWKI_deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
- utils.log("DEBUG", " DELNWKI_deleteSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
-
- // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
- String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "rollback", "DisconnectNetworkRequest", cloudRegionId, networkId, null)
- String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
- execution.setVariable("DELNWKI_rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
- utils.log("DEBUG", " DELNWKI_rollbackSDNCRequest (prepared if NEEDED later for SDNC Topology delete's rollback/compensation . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled)
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareSDNCRequest() - " + ex.getMessage()
- logError(exceptionMessage)
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void prepareDBRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteNetworkV2 ***** ", isDebugEnabled)
-
- String aaiReturnCode = execution.getVariable("DELNWKI_aaiReturnCode")
- String requestId = execution.getVariable("DELNWKI_requestId")
-
- String statusMessage = ""
- if (aaiReturnCode == '404' || execution.getVariable("DELNWKI_isSilentSuccess") == true) {
- // SILENT SUCCESS
- statusMessage = "Network Id to be deleted NOT found. Silent success."
- } else {
- statusMessage = "Network successfully deleted."
- }
-
- String dbRequest =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>COMPLETED</requestStatus>
- <progress>100</progress>
- <vnfOutputs>&lt;network-outputs xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:aetgt="http://ecomp.att.com/mso/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 buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
- utils.logAudit(buildDeleteDBRequestAsString)
- execution.setVariable("DELNWKI_deleteDBRequest", buildDeleteDBRequestAsString)
- utils.log("DEBUG", " DB Adapter Request - " + "\n" + buildDeleteDBRequestAsString, isDebugEnabled)
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareDBRequest() - " + ex.getMessage()
- logError(exceptionMessage)
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void prepareDBRequestError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteNetworkV2 ***** ", isDebugEnabled)
-
- WorkflowException wfe = execution.getVariable("WorkflowException")
- String statusMessage = wfe.getErrorMessage()
- String requestId = execution.getVariable("DELNWKI_requestId")
-
- String dbRequest =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>FAILED</requestStatus>
- <progress></progress>
- <vnfOutputs>&lt;network-outputs xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:aetgt="http://ecomp.att.com/mso/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("DELNWKI_deleteDBRequest", dbRequest)
- utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareDBRequestError() - " + ex.getMessage()
- logError(exceptionMessage)
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- // **************************************************
- // Post or Validate Response Section
- // **************************************************
-
- public void validateNetworkResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside validateNetworkResponse of DeleteNetworkV2 *****", isDebugEnabled)
-
- try {
- String returnCode = execution.getVariable("DELNWKI_networkReturnCode")
- String networkResponse = execution.getVariable("DELNWKI_deleteNetworkResponse")
-
- utils.log("DEBUG", " Network Adapter responseCode: " + returnCode, isDebugEnabled)
- utils.log("DEBUG", "Network Adapter Error Response - " + "\n" + networkResponse, isDebugEnabled)
-
- String errorMessage = ""
- if (returnCode == "200") {
- utils.logAudit(networkResponse)
- execution.setVariable("DELNWKI_deleteNetworkResponse", networkResponse)
- utils.log("DEBUG", " Network Adapter Success Response - " + "\n" + networkResponse, isDebugEnabled)
-
- } 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.getNodeText1(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 DeleteNetworkInstanceInfra, validateNetworkResponse() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- public void validateSDNCResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside validateSDNCResponse of DeleteNetworkV2 ***** ", isDebugEnabled)
-
- String response = execution.getVariable("DELNWKI_deleteSDNCResponse")
- WorkflowException workflowException = execution.getVariable("WorkflowException")
-
- boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
-
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
- sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
- // reset variable
- String deleteSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable("DELNWKI_deleteSDNCResponse"))
- deleteSDNCResponseDecodeXml = deleteSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
- execution.setVariable("DELNWKI_deleteSDNCResponse", deleteSDNCResponseDecodeXml)
-
- if (execution.getVariable("DELNWKI_sdncResponseSuccess") == true) { // from sdnc util, prefix+'sdncResponseSuccess'
- execution.setVariable("DELNWKI_isSdncRollbackNeeded", true) //
- execution.setVariable("DELNWKI_isPONR", true)
- utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
- } else {
- utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
-
- }
-
-
- public void postProcessResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteNetworkV2 ***** ", isDebugEnabled)
-
- try {
- // Display DB response: DELNWKI_deleteDBResponse / DELNWKI_dbReturnCode
- String dbReturnCode = execution.getVariable("DELNWKI_dbReturnCode")
- utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + execution.getVariable("DELNWKI_deleteDBResponse"), isDebugEnabled)
-
- if (dbReturnCode == '200') {
-
- String source = execution.getVariable("DELNWKI_source")
- String requestId = execution.getVariable("DELNWKI_requestId")
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:ns8="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>
- <ns8:status-message>Network has been deleted successfully.</ns8:status-message>
- <ns8:mso-bpel-name>BPMN Network action: DELETE</ns8:mso-bpel-name>
- </aetgt:MsoCompletionRequest>"""
-
- // Format Response
- String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
-
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable("DELNWKI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
- execution.setVariable("DELNWKI_Success", true)
- if (execution.getVariable("DELNWKI_isSilentSuccess") == false) {
- utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
- } else {
- utils.log("DEBUG", " Silent SUCCESS going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
- }
-
- } else {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, DB Update Failed: " + dbReturnCode
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, exceptionMessage)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, postProcessResponse() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
-
- // *******************************
- // Build Error Section
- // *******************************
-
- // Prepare for FalloutHandler
- public void buildErrorResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
-
- String dbReturnCode = execution.getVariable("DELNWKI_dbReturnCode")
- utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + execution.getVariable("DELNWKI_deleteDBResponse"), isDebugEnabled)
-
- String falloutHandlerRequest = ""
- String workflowException = ""
- String requestId = execution.getVariable("DELNWKI_requestId")
- String source = execution.getVariable("DELNWKI_source")
- execution.setVariable("DELNWKI_Success", false)
- try {
- WorkflowException wfe = execution.getVariable("WorkflowException")
- String errorCode = String.valueOf(wfe.getErrorCode())
- String errorMessage = wfe.getErrorMessage()
-
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.logAudit(falloutHandlerRequest)
- execution.setVariable("DELNWKI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
-
- } catch (Exception ex) {
- // caught exception
- String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, buildErrorResponse() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${exceptionMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>9999</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
- execution.setVariable("DELNWKI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
- }
- }
-
-
- public void sendSyncError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- String requestId = execution.getVariable("att-mso-request-id")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String deleteNetworkRestError = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestError, isDebugEnabled)
-
- sendWorkflowResponse(execution, 500, deleteNetworkRestError)
-
- } catch (Exception ex) {
- utils.log("DEBUG", " Sending Sync Error Activity Failed - DeleteNetworkInstanceInfra, sendSyncError(): " + "\n" + ex.getMessage(), isDebugEnabled)
- }
- }
-
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- try{
- utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
- execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
- }catch(BpmnError b){
- utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.groovy
deleted file mode 100644
index 7004004c25..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.groovy
+++ /dev/null
@@ -1,549 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import groovy.xml.XmlUtil
-import groovy.json.*
-
-import org.openecomp.mso.bpmn.core.json.JsonUtils
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-import java.util.UUID;
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-
-import org.camunda.bpm.engine.delegate.BpmnError
-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.w3c.dom.Document
-import org.w3c.dom.Element
-import org.w3c.dom.Node
-import org.w3c.dom.NodeList
-import org.xml.sax.InputSource
-import static org.apache.commons.lang3.StringUtils.*;
-
-import org.springframework.web.util.UriUtils;
-
-/**
- * This groovy class supports the <class>CreateServiceInstance.bpmn</class> process.
- */
-public class DeleteServiceInstanceInfra extends AbstractServiceTaskProcessor {
-
- String Prefix="DELSI_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- JsonUtils jsonUtil = new JsonUtils()
- VidUtils vidUtils = new VidUtils()
-
- /**
- * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
- * @param execution
- */
- public InitializeProcessVariables(Execution execution){
- /* Initialize all the process variables in this block */
-
- execution.setVariable("DELSI_DeleteServiceInstanceJasonRequest", "")
- execution.setVariable("DELSI_requestDetails", "")
- execution.setVariable("DELSI_globalSubscriberId", "")
- execution.setVariable("DELSI_serviceInstanceName", "")
- execution.setVariable("DELSI_serviceInstanceId", "")
- execution.setVariable("DELSI_serviceInstance", "")
- execution.setVariable("DELSI_messageId", "")
- execution.setVariable("DELSI_serviceType", "")
-
- execution.setVariable("DELSI_queryAAISINameResponse", "")
- execution.setVariable("DELSI_queryAAISINameCode", "")
-
- execution.setVariable("DELSI_createDBRequest", "")
- execution.setVariable("DELSI_dbResponse", "")
- execution.setVariable("DELSI_dbReturnCode", "")
-
- execution.setVariable("DELSI_createDBInfraErrorRequest", "")
- execution.setVariable("DELSI_errorDBInfraErrorResponse", "")
- execution.setVariable("DELSI_errorDBInfraErrorErrorCode", "")
-
- execution.setVariable("DELSI_CompleteMsoProcessRequest", "")
- execution.setVariable("DELSI_FalloutHandlerRequest", "")
- execution.setVariable("DELSI_Success", false)
- execution.setVariable("DELSI_unexpectedError", "")
- execution.setVariable("DELSI_siInUse", false)
-
- }
-
- // **************************************************
- // Pre or Prepare Request Section
- // **************************************************
- /**
- * This method is executed during the preProcessRequest task of the <class>DeleteServiceInstance.bpmn</class> process.
- * @param execution
- */
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside preProcessRequest DeleteServiceInstance Request ***** ", isDebugEnabled)
-
- try {
- // initialize flow variables
- InitializeProcessVariables(execution)
-
- // check for incoming json message/input
- String deleteServiceInstanceIncoming = execution.getVariable("bpmnRequest")
- utils.logAudit(deleteServiceInstanceIncoming)
- execution.setVariable("DELSI_DeleteServiceInstanceJasonRequest", deleteServiceInstanceIncoming);
-
- // extract requestId
- String requestId = execution.getVariable("att-mso-request-id")
- execution.setVariable("DELSI_requestId", requestId)
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- execution.setVariable("DELSI_serviceInstanceId", serviceInstanceId)
-
- String requestAction = execution.getVariable("requestAction")
- execution.setVariable("requestAction", requestAction)
-
- String source = jsonUtil.getJsonValue(deleteServiceInstanceIncoming, "requestDetails.requestInfo.source")
- execution.setVariable("DELSI_source", source)
-
- // get variables
- // extract requestDetails
- String xmlRequestDetails = vidUtils.getJsonRequestDetailstoXml(deleteServiceInstanceIncoming)
- execution.setVariable("DELSI_requestDetails", xmlRequestDetails)
-
- utils.log("DEBUG", "xmlRequestDetails: " + xmlRequestDetails , isDebugEnabled)
-
- String xmlParameters = utils.getNodeXml(xmlRequestDetails, "requestParameters", false)
- utils.log("DEBUG","xmlParameters: " + xmlParameters , isDebugEnabled)
-
- String serviceType = jsonUtil.getJsonValue(deleteServiceInstanceIncoming, "requestDetails.requestParameters.subscriptionServiceType")
- execution.setVariable("DELSI_serviceType", serviceType)
-
- // extract globalSubscriberId
- //String globalSubscriberId = jsonUtil.getJsonValue(deleteServiceInstanceIncoming, "requestDetails.subscriberInfo.globalSubscriberId")
-
- // prepare messageId
- String messageId = execution.getVariable("DELSI_messageId") // for testing
- if (messageId == null || messageId == "") {
- messageId = UUID.randomUUID()
- utils.log("DEBUG", " DELSI_messageId, random generated: " + messageId, isDebugEnabled)
- } else {
- utils.log("DEBUG", " DELSI_messageId, pre-assigned: " + messageId, isDebugEnabled)
- }
- execution.setVariable("DELSI_messageId", messageId)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
- logDebug('AAI namespace is: ' + aaiNamespace, isDebugEnabled)
- execution.setVariable("DELSI_aaiNamespace","${aaiNamespace}")
-
- //Setting for Generic Sub Flows
- execution.setVariable("GENGS_type", "service-instance")
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex){
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- }
-
- public void sendSyncResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside sendSyncResponse of DeleteServiceInstance ***** ", isDebugEnabled)
-
- try {
- String requestId = execution.getVariable("att-mso-request-id")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
- sendWorkflowResponse(execution, 202, syncResponse)
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
-
- public void processGetServiceInstanceResponse(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside processGetServiceInstanceResponse of DeleteServiceInstance ***** " , isDebugEnabled)
-
- try {
-
- //Extract Global Sub Id
- String messageId = execution.getVariable("DELSI_requestId")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- String siRelatedLink = execution.getVariable("GENGSI_siResourceLink")
-
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
-
- execution.setVariable("DELSI_globalSubscriberId",globalCustId)
-
- //Extract Service Type if not provided on request
- String serviceType = execution.getVariable("DELSI_serviceType")
- if(isBlank(serviceType)){
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd)
-
- serviceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
- }
- execution.setVariable("serviceType", serviceType)
-
- String serviceInstanceData = execution.getVariable("DELSI_serviceInstance");
- utils.log("DEBUG", " DELSI_serviceInstance: " + serviceInstanceData, isDebugEnabled)
-
- //Confirm there are no related service instances (vnf/network or volume)
- if (utils.nodeExists(serviceInstanceData, "relationship-list")) {
-
- InputSource source = new InputSource(new StringReader(serviceInstanceData));
- 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")){
- utils.log("DEBUG", "ServiceInstance still has relationship(s) to OpenStack.", isDebugEnabled)
- execution.setVariable("DELSI_siInUse", true)
- //there are relationship dependencies to this Service Instance
- String errorMessage = " Stopped deleting Service Instance, it has dependencies. Service instance id: " + serviceInstanceId
- utils.log("DEBUG", errorMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
- }else{
- utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
- }
- }
- }
- }
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception excp) {
- // try error for method block
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow in method processGetServiceInstanceResponse. Error was - " + excp.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- utils.log("DEBUG", " ***** Completed processGetServiceInstanceResponse of DeleteServiceInstance ***** " , isDebugEnabled)
- }
-
- // *******************************
- // Build DB request Section
- // *******************************
- public void prepareDBRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteServiceInstance ***** ", isDebugEnabled)
-
- 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://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>COMPLETED</requestStatus>
- <progress>100</progress>
- <vnfOutputs/>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
- execution.setVariable("DELSI_createDBRequest", buildDeleteDBRequestAsString)
- utils.logAudit(buildDeleteDBRequestAsString)
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
-
- // *****************************************
- // Prepare Completion request Section
- // *****************************************
- public void postProcessResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
-
- try {
- // Display Success scenario for DB update Response:
- String dbReturnCode = execution.getVariable("DELSI_dbReturnCode")
- utils.log("DEBUG", " ***** Success DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- utils.log("DEBUG", " ***** Success DB Update Response String: " + '\n' + execution.getVariable("DELSI_dbResponse"), isDebugEnabled)
-
- if (dbReturnCode == "200") {
- String source = execution.getVariable("DELSI_source")
- String requestId = execution.getVariable("DELSI_requestId")
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:status-message>Service Instance has been deleted successfully.</aetgt:status-message>
- <aetgt:mso-bpel-name>BPMN Service Instance action: DELETE</aetgt:mso-bpel-name>
- </aetgt:MsoCompletionRequest>"""
-
- // Format Response
- String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
-
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable("DELSI_Success", true)
- execution.setVariable("DELSI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
- utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
-
- } else {
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from DB adapter, return code: " + dbReturnCode
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, exceptionMessage)
-
- }
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
-
- // *******************************
- // Build Error Section
- // *******************************
- public void prepareDBRequestError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
-
- 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 DeleteServiceInstanceInfra 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://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>FAILED</requestStatus>
- <vnfOutputs/>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String buildDBRequestAsString = utils.formatXml(dbRequest)
- execution.setVariable("DELSI_createDBInfraErrorRequest", buildDBRequestAsString)
- utils.logAudit(buildDBRequestAsString)
-
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
- exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
- }
-
- }
-
- // Prepare for FalloutHandler
- public void buildErrorResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("ERROR", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
-
- String falloutHandlerRequest = ""
- try {
- // Display Success scenario for DB update Response:
- String dbReturnCode = execution.getVariable("DELSI_errorDBInfraErrorErrorCode")
- utils.log("DEBUG", " ***** Error DB Update Response Code : " + dbReturnCode, isDebugEnabled)
- utils.log("DEBUG", " ***** Error DB Update Response String: " + '\n' + execution.getVariable("DELSI_errorDBInfraErrorResponse"), isDebugEnabled)
-
- String requestId = execution.getVariable("DELSI_requestId")
- String source = execution.getVariable("DELSI_source")
-
- execution.setVariable("DELSI_Success", false)
- String errorMessage = ""
- String errorCode = ""
-
- if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
- WorkflowException wfe = execution.getVariable("WorkflowException")
- errorMessage = wfe.getErrorMessage()
- errorCode = wfe.getErrorCode().toString()
-
- } else {
- errorMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow."
- errorCode = "2500"
-
- }
-
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.logAudit(falloutHandlerRequest)
- execution.setVariable("DELSI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
-
- } catch (Exception ex) {
- // rebuild workflow exception
- String requestId = execution.getVariable("DELSI_requestId")
- String source = execution.getVariable("DELSI_source")
- String errorException = " Build Error Response exception encountered during method buildErrorResponse(), preparing request for FalloutHandler: - " + ex.getMessage()
- utils.log("DEBUG", errorException, isDebugEnabled)
- falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
- execution.setVariable("DELSI_FalloutHandlerRequest", falloutHandlerRequest)
- utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
-
- }
-
- }
-
- public void sendSyncError (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside sendSyncError() of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
-
- 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://ecomp.att.com/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- utils.logAudit(buildworkflowException)
- sendWorkflowResponse(execution, 500, buildworkflowException)
-
-
- } catch (Exception ex) {
- utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
- }
-
- }
-
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- try{
- utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
- execution.setVariable("DELSI_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
- }catch(BpmnError b){
- utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- execution.setVariable("DELSI_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy
deleted file mode 100644
index 5b726a0835..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy
+++ /dev/null
@@ -1,264 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-import java.io.Serializable;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-
-
-public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
-
- def Prefix="DoDVfMod_"
-
- public void initProcessVariables(Execution 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(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DoDeleteVfModuleRequest")
- utils.logAudit("DoDeleteVfModule Request: " + xml)
-
- utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
- initProcessVariables(execution)
- def vnfId = utils.getNodeText1(xml,"vnf-id")
- def vfModuleId = utils.getNodeText1(xml,"vf-module-id")
-// execution.setVariable("DoDVfMod_vnfId", vnfId)
-// execution.setVariable("DoDVfMod_vfModuleId", vfModuleId)
- // formulate the request for PrepareUpdateAAIVfModule
- String request = """<PrepareUpdateAAIVfModuleRequest>
- <vnf-id>${vnfId}</vnf-id>
- <vf-module-id>${vfModuleId}</vf-module-id>
- <orchestration-status>pending-delete</orchestration-status>
- </PrepareUpdateAAIVfModuleRequest>""" as String
- utils.log("DEBUG", "PrepareUpdateAAIVfModuleRequest :" + request, isDebugEnabled)
- utils.logAudit("UpdateAAIVfModule Request: " + request)
- execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
- execution.setVariable("DoDVfMod_vfModuleFromAAI", null)
- }
-
- // 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(Execution execution, String action) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DoDeleteVfModuleRequest")
- utils.logAudit("DoDeleteVfModule Request: " + xml)
-
- def srvInstId = execution.getVariable("att-mso-service-instance-id")
- def callbackUrl = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
- utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
-
- String requestId = ""
- try {
- requestId = execution.getVariable("att-mso-request-id")
- } catch (Exception ex) {
- requestId = utils.getNodeText1(xml, "request-id")
- }
-
- String source = utils.getNodeText1(xml, "source")
- String serviceId = utils.getNodeText1(xml, "service-id")
- String vnfId = utils.getNodeText1(xml, "vnf-id")
- String vnfType = utils.getNodeText1(xml, "vnf-type")
- String vnfName = utils.getNodeText1(xml, "vnf-name")
- String tenantId = utils.getNodeText1(xml, "tenant-id")
- String vfModuleId = utils.getNodeText1(xml, "vf-module-id")
- String serviceInstanceIdToSdnc = ""
- if (xml.contains("service-instance-id")) {
- serviceInstanceIdToSdnc = utils.getNodeText1(xml, "service-instance-id")
- } else {
- serviceInstanceIdToSdnc = vfModuleId
- }
- String vfModuleName = utils.getNodeText1(xml, "vf-module-name")
- // Get vfModuleName from AAI response if it was not specified on the request
- if (vfModuleName == null || vfModuleName.isEmpty()) {
- if (execution.getVariable("DoDVfMod_vfModuleFromAAI") != null) {
- VfModule vfModuleFromAAI = execution.getVariable("DoDVfMod_vfModuleFromAAI")
- vfModuleName = vfModuleFromAAI.getElementText("vf-module-name")
- }
- }
- String vfModuleModelName = utils.getNodeText1(xml, "vf-module-model-name")
- String cloudSiteId = utils.getNodeText1(xml, "aic-cloud-region")
- String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
- xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${vfModuleId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- <request-information>
- <request-id>${requestId}</request-id>
- <request-action>DisconnectVNFRequest</request-action>
- <source>${source}</source>
- <notification-url/>
- <order-number/>
- <order-version/>
- </request-information>
- <service-information>
- <service-id>${serviceId}</service-id>
- <service-type>${serviceId}</service-type>
- <service-instance-id>${serviceInstanceIdToSdnc}</service-instance-id>
- <subscriber-name>notsurewecare</subscriber-name>
- </service-information>
- <vnf-request-information>
- <vnf-id>${vfModuleId}</vnf-id>
- <vnf-type>${vfModuleModelName}</vnf-type>
- <vnf-name>${vfModuleName}</vnf-name>
- <generic-vnf-id>${vnfId}</generic-vnf-id>
- <generic-vnf-name>${vnfName}</generic-vnf-name>
- <generic-vnf-type>${vnfType}</generic-vnf-type>
- <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
- <tenant>${tenantId}</tenant>
- </vnf-request-information>
- </sdncadapterworkflow:SDNCRequestData>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
-
- utils.log("DEBUG", "sdncAdapterWorkflowRequest: " + request, isDebugEnabled)
- utils.logAudit("DoDeleteVfModule - SDNCAdapterWorkflowRequest: " + request)
- execution.setVariable("sdncAdapterWorkflowRequest", request)
- }
-
- // parse the incoming DELETE_VF_MODULE request
- // and formulate the outgoing VnfAdapterDeleteV1 request
- public void prepVNFAdapterRequest(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DoDeleteVfModuleRequest")
- def requestId = UUID.randomUUID().toString()
- def origRequestId = execution.getVariable('att-mso-request-id')
- def srvInstId = execution.getVariable('att-mso-service-instance-id')
- def aicCloudRegion = utils.getNodeText1(xml, "aic-cloud-region")
- def vnfId = utils.getNodeText1(xml, "vnf-id")
- def vnfName = utils.getNodeText1(xml, "vnf-name")
- def vfModuleId = utils.getNodeText1(xml, "vf-module-id")
- def vfModuleStackId = execution.getVariable('DoDVfMod_heatStackId')
- def tenantId = utils.getNodeText1(xml, "tenant-id")
- def messageId = execution.getVariable('att-mso-request-id') + '-' +
- System.currentTimeMillis()
- def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
- def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
- if ('true'.equals(useQualifiedHostName)) {
- notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
- }
-
- String request = """
- <deleteVfModuleRequest>
- <cloudSiteId>${aicCloudRegion}</cloudSiteId>
- <tenantId>${tenantId}</tenantId>
- <vnfId>${vnfId}</vnfId>
- <vfModuleId>${vfModuleId}</vfModuleId>
- <vfModuleStackId>${vfModuleStackId}</vfModuleStackId>
- <skipAAI>true</skipAAI>
- <msoRequest>
- <requestId>${origRequestId}</requestId>
- <serviceInstanceId>${srvInstId}</serviceInstanceId>
- </msoRequest>
- <messageId>${messageId}</messageId>
- <notificationUrl>${notificationUrl}</notificationUrl>
- </deleteVfModuleRequest>
- """ as String
-
- utils.log("DEBUG", "vnfAdapterRestV1Request: " + request, isDebugEnabled)
- utils.logAudit("deleteVfModuleRequest: " + request)
- execution.setVariable("vnfAdapterRestV1Request", request)
- }
-
- // parse the incoming DELETE_VF_MODULE request
- // and formulate the outgoing UpdateAAIVfModuleRequest request
- public void prepUpdateAAIVfModule(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DoDeleteVfModuleRequest")
- utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
- initProcessVariables(execution)
- def vnfId = utils.getNodeText1(xml,"vnf-id")
- def vfModuleId = utils.getNodeText1(xml,"vf-module-id")
- // formulate the request for UpdateAAIVfModule
- String request = """<UpdateAAIVfModuleRequest>
- <vnf-id>${vnfId}</vnf-id>
- <vf-module-id>${vfModuleId}</vf-module-id>
- <heat-stack-id>DELETE</heat-stack-id>
- <orchestration-status>deleted</orchestration-status>
- </UpdateAAIVfModuleRequest>""" as String
- utils.log("DEBUG", "UpdateAAIVfModuleRequest :" + request, isDebugEnabled)
- utils.logAudit("UpdateAAIVfModuleRequest: " + request)
- execution.setVariable("UpdateAAIVfModuleRequest", request)
- }
-
- // parse the incoming DELETE_VF_MODULE request
- // and formulate the outgoing DeleteAAIVfModuleRequest request
- public void prepDeleteAAIVfModule(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def xml = execution.getVariable("DoDeleteVfModuleRequest")
- utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
- initProcessVariables(execution)
- def vnfId = utils.getNodeText1(xml,"vnf-id")
- def vfModuleId = utils.getNodeText1(xml,"vf-module-id")
- // formulate the request for UpdateAAIVfModule
- String request = """<DeleteAAIVfModuleRequest>
- <vnf-id>${vnfId}</vnf-id>
- <vf-module-id>${vfModuleId}</vf-module-id>
- </DeleteAAIVfModuleRequest>""" as String
- utils.log("DEBUG", "DeleteAAIVfModuleRequest :" + request, isDebugEnabled)
- utils.logAudit("DeleteAAIVfModuleRequest: " + request)
- execution.setVariable("DeleteAAIVfModuleRequest", request)
- }
-
- // generates a WorkflowException if
- // -
- public void handleDoDeleteVfModuleFailure(Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
- + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"), isDebugEnabled)
- String processKey = getProcessKey(execution);
- WorkflowException exception = new WorkflowException(processKey, 5000,
- execution.getVariable("DoDVfMod_deleteGenericVnfResponse"))
- execution.setVariable("WorkflowException", exception)
- }
-
- public void sdncValidateResponse(Execution execution, String response){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- 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){
- utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
- }else{
- throw new BpmnError("MSOWorkflowException")
- }
- }
-}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy
deleted file mode 100644
index 3963c2690f..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts.beans
-
-import javax.xml.bind.annotation.XmlAccessType
-import javax.xml.bind.annotation.XmlAccessorType
-
-@XmlAccessorType(XmlAccessType.FIELD)
-class CommonCompletionRequest {
- String source
- String callbackURL
- String basicAuthCred
- String correlator
- String startTime
- String finishTime
- String requestScope
- String requestType
- //complete, failed, inProgress
- String requestState
- //COMPLETED or FAILED
- String status
- //response message for callback
- String message
- //response body for db update
- String response
- int responseCode
-
-}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java
deleted file mode 100644
index 5199322931..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma.workflow.service;
-
-import java.io.StringReader;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.camunda.bpm.BpmPlatform;
-import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
-import org.camunda.bpm.engine.ProcessEngineServices;
-import org.camunda.bpm.engine.RuntimeService;
-import org.slf4j.MDC;
-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.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
-
-/**
- * Listens for REST notifications from the VNF Adapter and injects each one
- * into a waiting BPMN processes.
- */
-@Path("/vnfAdapterRestNotify")
-public class VnfAdapterRestNotifyResource {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- private static final String LOGMARKER = "[VNF-REST-NOTIFY]";
-
- private ProcessEngineServices pes4junit = null;
-
- @POST
- @Path("/")
- @Consumes(MediaType.APPLICATION_XML)
- @Produces(MediaType.TEXT_PLAIN)
- public Response notify(String content) {
- LOGGER.debug(LOGMARKER + " Received VNF Adapter REST Notification:"
- + System.lineSeparator() + content);
-
- String messageId = null;
- long startTime = System.currentTimeMillis();
-
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setNamespaceAware(true);
- DocumentBuilder builder = factory.newDocumentBuilder();
- InputSource source = new InputSource(new StringReader(content));
- Document doc = builder.parse(source);
- doc.normalize();
-
- Element rootElement = doc.getDocumentElement();
- NodeList childList = rootElement.getChildNodes();
-
- for (int i = 0; i < childList.getLength(); i++) {
- Node childNode = childList.item(i);
- if (childNode.getNodeType() == Node.ELEMENT_NODE) {
- Element childElement = (Element) childNode;
-
- String childElementName = childElement.getLocalName();
- if (childElementName == null) {
- childElementName = childElement.getNodeName();
- }
-
- if ("messageId".equals(childElementName)) {
- messageId = childElement.getTextContent();
- }
- }
- }
- } catch (Exception e) {
- String msg = "Failed to parse VNF Adapter REST Notification: " + e;
- LOGGER.debug(LOGMARKER + " " + msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg, e);
-
- return Response.status(400).entity(e).build();
- }
-
- if (messageId == null || messageId.isEmpty()) {
- String msg = "No messageId in VNF Adapter REST Notification";
- LOGGER.debug(LOGMARKER + " " + msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
-
- return Response.status(400).entity(msg).build();
- }
-
- MsoLogger.setServiceName("MSO." + "vnfAdapterRestNotify");
- MsoLogger.setLogContext(messageId, "N/A");
-
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO vnfAdapterRestNotify ");
-
- try {
- ProcessEngineServices pes = getProcessEngineServices();
- RuntimeService runtimeService = pes.getRuntimeService();
-
- if (!isReadyforCorrelation(runtimeService, "VNFREST_messageId", messageId, "vnfAdapterRestCallbackMessage")) {
- String msg = "No process is waiting to receive vnfAdapterRestCallbackMessage with VNFREST_messageId='" + messageId + "'";
- LOGGER.debug(LOGMARKER + " " + msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER + ":" + msg);
-
- LOGGER.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + "Call to MSO vnfAdapterRestNotify ", "BPMN", MsoLogger.getServiceName(), "vnfAdapterRestNotify");
-
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
-
-
- return Response.status(500).entity(msg).build();
- }
-
- Map<String,Object> variables = new HashMap<String,Object>();
- variables.put("VNFREST_messageId", messageId);
- variables.put("VNFREST_callback", content);
-
- runtimeService.createMessageCorrelation("vnfAdapterRestCallbackMessage").setVariables(variables)
- .processInstanceVariableEquals("VNFREST_messageId", messageId).correlate();
-
- LOGGER.debug(LOGMARKER + " Completed processing of VNF Adapter REST Notification");
- } catch (MismatchingMessageCorrelationException e) {
- LOGGER.debug(LOGMARKER + "[CORM] correlation id mismatch");
- String msg = "vnfAdapterRestNotify received a notification with messageId='"
- + messageId + "' but it could not be correlated to any active process - ignoring the request";
- LOGGER.debug(msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER, e);
-
- LOGGER.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.InternalError,
- LOGMARKER + "Completed vnfAdapterRestNotify with error ", "BPMN", MsoLogger.getServiceName(), "vnfAdapterRestNotify");
-
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.InternalError, "Completed vnfAdapterRestNotify with error ");
-
- return Response.status(500).entity(msg).build();
- }
- LOGGER.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + "Completed vnfAdapterRestNotify", "BPMN", MsoLogger.getServiceName(), "vnfAdapterRestNotify");
-
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Completed vnfAdapterRestNotify");
-
- return Response.status(204).build();
- }
-
- private boolean isReadyforCorrelation(RuntimeService runtimeService,
- String correlationVariable, String correlationValue, String messageName) {
- long waitingInstances = runtimeService.createExecutionQuery()
- .messageEventSubscriptionName(messageName)
- .processVariableValueEquals(correlationVariable, correlationValue)
- .count();
-
- int retries = 50;
- while (waitingInstances == 0 && retries > 0) {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER, e);
-
- return false;
- }
-
- waitingInstances = runtimeService.createExecutionQuery()
- .messageEventSubscriptionName(messageName)
- .processVariableValueEquals(correlationVariable, correlationValue)
- .count();
-
- retries--;
- }
-
- return waitingInstances != 0;
- }
-
- private ProcessEngineServices getProcessEngineServices() {
- if (pes4junit == null) {
- return BpmPlatform.getDefaultProcessEngine();
- } else {
- return pes4junit;
- }
- }
-
- public void setProcessEngineServices4junit(ProcessEngineServices pes) {
- pes4junit = pes;
- }
-}
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn
deleted file mode 100644
index 8ce38e4dc2..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn
+++ /dev/null
@@ -1,1297 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="CreateNetworkInstanceInfra" name="CreateNetworkInstanceInfra" isExecutable="true">
- <bpmn2:startEvent id="createNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>
- <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:outgoing>SequenceFlow_32</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask"/>
- <bpmn2:callActivity id="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">
- <bpmn2:extensionElements>
- <camunda:in source="CRENWKI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_rollbackSDNCReturnCode"/>
- <camunda:out source="sdncAdapterResponse" target="CRENWKI_rollbackSDNCResponse"/>
- </bpmn2:extensionElements>
- </bpmn2:callActivity>
- <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" attachedToRef="callAssignSDNCAdapter_CallActivity">
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
- </bpmn2:boundaryEvent>
- <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 Sub-process" 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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:out source="WorkflowException" target="CRENWKI_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 &amp; Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>
- <bpmn2:serviceTask id="callRollbackContrailNetwork_ServiceTask" name="Call Rollback Network" isForCompensation="true">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="payload">${CRENWKI_rollbackNetworkRequest}</camunda:inputParameter>
- <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}</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_rollbackNetworkReturnCode">${statusCode}</camunda:outputParameter>
- <camunda:outputParameter name="CRENWKI_rollbackNetworkResponse">${response}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- </bpmn2:serviceTask>
- <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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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="prepareDBInfraRequestSilentSucces_ScriptTask">
- <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:scriptTask id="prepareDBInfraRequestSilentSucces_ScriptTask" name="Prepare DB Infra Request for Active Network" scriptFormat="groovy">
- <bpmn2:incoming>isNetworkActiveYes_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.prepareDBRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="prepareDBInfraRequestSilentSucces_ScriptTask" targetRef="silentSuccessCallDB_ServiceTask"/>
- <bpmn2:serviceTask id="silentSuccessCallDB_ServiceTask" name="Call DB Infra Update (Silent Success)">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${CRENWKI_createDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CRENWKI_createDBRequest">${response}</camunda:outputParameter>
- <camunda:outputParameter name="CRENWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_40" name="" sourceRef="silentSuccessCallDB_ServiceTask" targetRef="prepareSilentCompletion_ScriptTask"/>
- <bpmn2:scriptTask id="prepareSilentCompletion_ScriptTask" name="Prepare Active Network Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="prepareSilentCompletion_ScriptTask" targetRef="silentAccess_CallActivity"/>
- <bpmn2:callActivity id="silentAccess_CallActivity" name="Call CompleteMsoProcess (Silent Success)" calledElement="CompleteMsoProcess">
- <bpmn2:extensionElements>
- <camunda:in source="CRENWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in variables="all"/>
- <camunda:out variables="all"/>
- <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_41</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="silentAccess_CallActivity" targetRef="EndEvent_5"/>
- <bpmn2:endEvent id="EndEvent_5">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="isAAIQueryNameOk_ExclusiveGateway" name="Is Query Name Ok?" 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 Exception / FalloutHandler " triggeredByEvent="true">
- <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow">
- <bpmn2:incoming>SequenceFlow_23</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("CRENWKI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="isRollbackOn_NoNetwork_SequenceFlow" name="No" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="InclusiveGateway_6"/>
- <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="isRollbackOn_Network_ExclusiveGateway"/>
- <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="InclusiveGateway_6">
- <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="isNetworkOk_ExclusiveGateway"/>
- <bpmn2:exclusiveGateway id="isNetworkOk_ExclusiveGateway" name="is Network Ok?" default="isNetworkOk_No_SequenceFlow">
- <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>isNetworkOk_No_SequenceFlow</bpmn2:outgoing>
- <bpmn2:outgoing>isNetworkOk_Yes_SequenceFlow</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="isNetworkOk_No_SequenceFlow" name="No" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway"/>
- <bpmn2:sequenceFlow id="isNetworkOk_Yes_SequenceFlow" name="Yes" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="networkContrailRollback_IntermediateThrowEvent">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isNetworkRollbackNeeded") == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway">
- <bpmn2:incoming>isNetworkOk_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_8</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("CRENWKI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="validateRollbacksResponse_ScriptTask_2"/>
- <bpmn2:intermediateThrowEvent id="networkContrailRollback_IntermediateThrowEvent" name="Network Rollback">
- <bpmn2:incoming>isNetworkOk_Yes_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="network_CompensateEventDefinition" activityRef="callRollbackContrailNetwork_ServiceTask" waitForCompletion="false"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="networkContrailRollback_IntermediateThrowEvent" targetRef="sdncOk_ExclusiveGateway"/>
- <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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent"/>
- <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">
- <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2"/>
- <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>
- <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${CRENWKI_createDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CRENWKI_createDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="CRENWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>
- <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
- <bpmn2:extensionElements>
- <camunda:in variables="all"/>
- <camunda:out variables="all"/>
- <camunda:in source="CRENWKI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_18</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="validateRollbacksResponse_ScriptTask_2" name="Validate Rollback Responses" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>
- <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.validateRollbackResponses(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="validateRollbacksResponse_ScriptTask_2" targetRef="InclusiveGateway_6"/>
- <bpmn2:inclusiveGateway id="InclusiveGateway_6">
- <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>
- <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def buildErrorResponse = new CreateNetworkInstanceInfra()
-buildErrorResponse.buildErrorResponse(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>
- </bpmn2:subProcess>
- <bpmn2:boundaryEvent id="networkPOCompensation_BoundaryEvent" attachedToRef="callCreateNetwork_ServiceTask">
- <bpmn2:compensateEventDefinition id="_CompensateEventDefinition_5" waitForCompletion="false"/>
- </bpmn2:boundaryEvent>
- <bpmn2:serviceTask id="callCreateNetwork_ServiceTask" name="Call Create Network">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="payload">${CRENWKI_createNetworkRequest}</camunda:inputParameter>
- <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}</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: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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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_46</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>
- <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.prepareDBRequest(execution)
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
- <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${CRENWKI_createDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CRENWKI_createDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="CRENWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </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:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
- <bpmn2:extensionElements>
- <camunda:in variables="all"/>
- <camunda:out variables="all"/>
- <camunda:in source="CRENWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_17</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_17</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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
- <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>link</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="link" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/>
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#xD;&#xA;Service&#xD;&#xA;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>link</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>siFoundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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="callAAIQuery_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:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>siFoundNo</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2"/>
- </bpmn2:endEvent>
- <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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.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 com.att.bpm.scripts.*
-def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
-CreateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask"/>
- <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/>
- <bpmn2:association id="Association_3" sourceRef="networkPOCompensation_BoundaryEvent" targetRef="callRollbackContrailNetwork_ServiceTask"/>
- </bpmn2:process>
- <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateNetworkInstanceInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
- <dc:Bounds height="36.0" width="36.0" x="192.0" y="185.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="193.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="350.0" y="163.0"/>
- </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="228.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="350.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="249.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
- <dc:Bounds height="80.0" width="100.0" x="929.0" y="58.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryNameOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1097.0" y="72.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="121.0" x="1063.0" y="51.0"/>
- </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="1029.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1052.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1097.0" y="97.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1054.0" y="97.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateCreatePONetwork_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="1259.0"/>
- </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="1122.0" y="122.0"/>
- <di:waypoint xsi:type="dc:Point" x="1122.0" y="180.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1129.0" y="120.0"/>
- </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="1147.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1214.0" y="97.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1146.0" y="97.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1097.0" y="180.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="82.0" x="1037.0" y="165.0"/>
- </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="1122.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="1122.0" y="260.0"/>
- <di:waypoint xsi:type="dc:Point" x="1123.0" y="260.0"/>
- <di:waypoint xsi:type="dc:Point" x="1123.0" y="288.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1097.0" y="225.0"/>
- </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="1147.0" y="205.0"/>
- <di:waypoint xsi:type="dc:Point" x="1215.0" y="205.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1149.0" y="205.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="996.0" y="806.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
- <dc:Bounds height="36.0" width="36.0" x="1105.0" y="288.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="97.0" x="1075.0" y="329.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callCreateNetwork_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="1101.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1343.0" y="276.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="137.0" y="1395.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
- <dc:Bounds height="567.0" width="1122.0" x="17.0" y="585.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
- <dc:Bounds height="36.0" width="36.0" x="48.0" y="1040.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="67.0" x="33.0" y="1081.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="756.0" y="806.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1523.0" y="520.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="125.0" x="1487.0" y="569.0"/>
- </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="1573.0" y="545.0"/>
- <di:waypoint xsi:type="dc:Point" x="1682.0" y="546.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1577.0" y="546.0"/>
- </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="1523.0" y="545.0"/>
- <di:waypoint xsi:type="dc:Point" x="1443.0" y="546.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1500.0" y="546.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="347.0" y="1392.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="792.0" y="1390.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="564.0" y="1392.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
- <dc:Bounds height="36.0" width="36.0" x="1682.0" y="528.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="74.0" x="1663.0" y="569.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1341.0" y="395.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">
- <dc:Bounds height="36.0" width="36.0" x="1323.0" y="434.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="82.0" x="1280.0" y="474.0"/>
- </bpmndi:BPMNLabel>
- </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="1393.0" y="356.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="374.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="374.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="395.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1389.0" y="374.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="1441.0" y="435.0"/>
- <di:waypoint xsi:type="dc:Point" x="1499.0" y="435.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1473.0" y="435.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21">
- <di:waypoint xsi:type="dc:Point" x="1323.0" y="447.0"/>
- <di:waypoint xsi:type="dc:Point" x="1290.0" y="438.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
- <di:waypoint xsi:type="dc:Point" x="450.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="516.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="481.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="516.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">
- <di:waypoint xsi:type="dc:Point" x="84.0" y="1058.0"/>
- <di:waypoint xsi:type="dc:Point" x="131.0" y="1058.0"/>
- <di:waypoint xsi:type="dc:Point" x="131.0" y="1057.0"/>
- <di:waypoint xsi:type="dc:Point" x="161.0" y="1057.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="96.0" y="1058.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_128" bpmnElement="prepareDBInfraRequestSilentSucces_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1341.0" y="58.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_87" bpmnElement="silentSuccessCallDB_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1498.0" y="58.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_128" targetElement="_BPMNShape_ServiceTask_87">
- <di:waypoint xsi:type="dc:Point" x="1441.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="1498.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1456.0" y="98.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">
- <dc:Bounds height="36.0" width="36.0" x="470.0" y="867.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="96.0" x="440.0" y="906.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="prepareSilentCompletion_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1632.0" y="58.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_20" bpmnElement="silentAccess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1766.0" y="58.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ServiceTask_87" targetElement="_BPMNShape_ScriptTask_130">
- <di:waypoint xsi:type="dc:Point" x="1598.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="1632.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1617.0" y="98.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_56" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_CallActivity_20">
- <di:waypoint xsi:type="dc:Point" x="1732.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="1766.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1740.0" y="98.0"/>
- </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="856.0" y="846.0"/>
- <di:waypoint xsi:type="dc:Point" x="996.0" y="846.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="881.0" y="846.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1499.0" y="395.0"/>
- </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="1549.0" y="475.0"/>
- <di:waypoint xsi:type="dc:Point" x="1549.0" y="492.0"/>
- <di:waypoint xsi:type="dc:Point" x="1548.0" y="492.0"/>
- <di:waypoint xsi:type="dc:Point" x="1548.0" y="520.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1545.0" y="503.0"/>
- </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="564.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="447.0" y="1432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="528.0" y="1432.0"/>
- </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="347.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="292.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="292.0" y="1435.0"/>
- <di:waypoint xsi:type="dc:Point" x="237.0" y="1435.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="290.0" y="1512.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1190.0" y="384.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_73" bpmnElement="isNetworkActive_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1214.0" y="72.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="113.0" x="1191.0" y="51.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="isNetworkActiveYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73" targetElement="_BPMNShape_ScriptTask_128">
- <di:waypoint xsi:type="dc:Point" x="1264.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1328.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1328.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="1341.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1269.0" y="97.0"/>
- </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="1239.0" y="122.0"/>
- <di:waypoint xsi:type="dc:Point" x="1240.0" y="180.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1238.0" y="123.0"/>
- </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="1265.0" y="205.0"/>
- <di:waypoint xsi:type="dc:Point" x="1304.0" y="205.0"/>
- <di:waypoint xsi:type="dc:Point" x="1304.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1344.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1272.0" y="205.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_4" bpmnElement="InclusiveGateway">
- <dc:Bounds height="50.0" width="50.0" x="1215.0" y="180.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1297.0" y="175.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1343.0" y="506.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_88" bpmnElement="callRollbackContrailNetwork_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1190.0" y="1085.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQueryNetworkID_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1176.0" y="1390.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="984.0" y="1392.0"/>
- </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.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="1084.0" y="1432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1143.0" y="1657.0"/>
- </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="792.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="691.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="691.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="664.0" y="1432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="773.0" y="1430.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ScriptTask_83">
- <di:waypoint xsi:type="dc:Point" x="984.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="926.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="926.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="892.0" y="1430.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="947.0" y="1432.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_32" bpmnElement="networkPOCompensation_BoundaryEvent">
- <dc:Bounds height="36.0" width="36.0" x="1326.0" y="1137.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1344.0" y="1178.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_3" bpmnElement="Association_3" sourceElement="_BPMNShape_BoundaryEvent_32" targetElement="_BPMNShape_ServiceTask_88">
- <di:waypoint xsi:type="dc:Point" x="1326.0" y="1150.0"/>
- <di:waypoint xsi:type="dc:Point" x="1290.0" y="1139.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="624.0"/>
- </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="1394.0" y="704.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="739.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="717.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="1393.0" y="586.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="624.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="606.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="1394.0" y="1181.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="1234.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="1234.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="1259.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="1418.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1343.0" y="970.0"/>
- </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="1393.0" y="1050.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="1101.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="1077.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="161.0" y="1032.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="98.0" x="138.0" y="1092.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_31" bpmnElement="networkContrailRollback_IntermediateThrowEvent">
- <dc:Bounds height="36.0" width="36.0" x="169.0" y="764.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="107.0" x="121.0" y="739.0"/>
- </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="186.0" y="1032.0"/>
- <di:waypoint xsi:type="dc:Point" x="186.0" y="1004.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="186.0" y="1020.0"/>
- </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="211.0" y="1057.0"/>
- <di:waypoint xsi:type="dc:Point" x="361.0" y="1057.0"/>
- <di:waypoint xsi:type="dc:Point" x="361.0" y="1004.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="211.0" y="1062.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1343.0" y="739.0"/>
- </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="1393.0" y="819.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="835.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="835.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="851.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1390.0" y="828.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6">
- <dc:Bounds height="50.0" width="50.0" x="336.0" y="954.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="361.0" y="1009.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="161.0" y="954.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="60.0" x="88.0" y="969.0"/>
- </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="211.0" y="979.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="979.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="204.0" y="983.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_216">
- <di:waypoint xsi:type="dc:Point" x="186.0" y="954.0"/>
- <di:waypoint xsi:type="dc:Point" x="186.0" y="884.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="191.0" y="933.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="161.0" y="834.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="95.0" x="68.0" y="849.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_86" bpmnElement="isNetworkOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">
- <di:waypoint xsi:type="dc:Point" x="211.0" y="859.0"/>
- <di:waypoint xsi:type="dc:Point" x="273.0" y="859.0"/>
- <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="211.0" y="863.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_90" bpmnElement="isNetworkOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_IntermediateThrowEvent_31">
- <di:waypoint xsi:type="dc:Point" x="186.0" y="834.0"/>
- <di:waypoint xsi:type="dc:Point" x="186.0" y="816.0"/>
- <di:waypoint xsi:type="dc:Point" x="188.0" y="816.0"/>
- <di:waypoint xsi:type="dc:Point" x="188.0" y="800.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="188.0" y="816.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="336.0" y="756.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="78.0" x="323.0" y="722.0"/>
- </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="386.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="438.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="386.0" y="779.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_262">
- <di:waypoint xsi:type="dc:Point" x="361.0" y="806.0"/>
- <di:waypoint xsi:type="dc:Point" x="362.0" y="845.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="366.0" y="806.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="169.0" y="1536.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="187.0" y="1577.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">
- <di:waypoint xsi:type="dc:Point" x="187.0" y="1475.0"/>
- <di:waypoint xsi:type="dc:Point" x="187.0" y="1536.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="184.0" y="1475.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1028.0" y="924.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1046.0" y="965.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">
- <di:waypoint xsi:type="dc:Point" x="1046.0" y="886.0"/>
- <di:waypoint xsi:type="dc:Point" x="1046.0" y="924.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1043.0" y="888.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">
- <di:waypoint xsi:type="dc:Point" x="676.0" y="846.0"/>
- <di:waypoint xsi:type="dc:Point" x="756.0" y="846.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="686.0" y="846.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">
- <dc:Bounds height="80.0" width="100.0" x="576.0" y="806.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="576.0" y="940.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">
- <di:waypoint xsi:type="dc:Point" x="626.0" y="940.0"/>
- <di:waypoint xsi:type="dc:Point" x="626.0" y="886.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="623.0" y="927.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="1898.0" y="80.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1916.0" y="121.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_20" targetElement="_BPMNShape_EndEvent_181">
- <di:waypoint xsi:type="dc:Point" x="1866.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="1898.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1875.0" y="98.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="link" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72">
- <di:waypoint xsi:type="dc:Point" x="616.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="678.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="651.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="163.0"/>
- </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="1394.0" y="243.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="259.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="259.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="276.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1390.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1581.0" y="377.0"/>
- </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="1617.0" y="395.0"/>
- <di:waypoint xsi:type="dc:Point" x="1700.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="1700.0" y="528.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1697.0" y="467.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">
- <dc:Bounds height="79.0" width="100.0" x="438.0" y="742.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_IntermediateThrowEvent_31" targetElement="_BPMNShape_ExclusiveGateway_217">
- <di:waypoint xsi:type="dc:Point" x="205.0" y="782.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="238.0" y="782.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="312.0" y="845.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24" targetElement="_BPMNShape_ScriptTask_218">
- <di:waypoint xsi:type="dc:Point" x="386.0" y="979.0"/>
- <di:waypoint xsi:type="dc:Point" x="548.0" y="979.0"/>
- <di:waypoint xsi:type="dc:Point" x="548.0" y="980.0"/>
- <di:waypoint xsi:type="dc:Point" x="576.0" y="980.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="393.0" y="979.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261" targetElement="_BPMNShape_IntermediateThrowEvent_24">
- <di:waypoint xsi:type="dc:Point" x="488.0" y="820.0"/>
- <di:waypoint xsi:type="dc:Point" x="488.0" y="867.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="485.0" y="847.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_ScriptTask_262">
- <di:waypoint xsi:type="dc:Point" x="470.0" y="885.0"/>
- <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>
- <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>
- <di:waypoint xsi:type="dc:Point" x="412.0" y="885.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="448.0" y="885.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_262" targetElement="_BPMNShape_InclusiveGateway_24">
- <di:waypoint xsi:type="dc:Point" x="362.0" y="925.0"/>
- <di:waypoint xsi:type="dc:Point" x="361.0" y="954.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="358.0" y="948.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="1394.0" y="1339.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1310.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1276.0" y="1430.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="1373.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
- <dc:Bounds height="188.0" width="394.0" x="21.0" y="381.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="54.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="72.0" y="499.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="169.0" y="436.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="330.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="348.0" y="499.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.0" y="476.0"/>
- <di:waypoint xsi:type="dc:Point" x="169.0" y="476.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="129.0" y="476.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="269.0" y="476.0"/>
- <di:waypoint xsi:type="dc:Point" x="330.0" y="476.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="301.0" y="476.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
- <dc:Bounds height="80.0" width="100.0" x="678.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="816.0" y="177.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="148.0" x="861.0" y="205.0"/>
- </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="778.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="816.0" y="202.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="791.0" y="203.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="841.0" y="177.0"/>
- <di:waypoint xsi:type="dc:Point" x="841.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="929.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="845.0" y="111.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1039.0" y="275.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1057.0" y="316.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
- <dc:Bounds height="80.0" width="100.0" x="885.0" y="253.0"/>
- </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="841.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="841.0" y="293.0"/>
- <di:waypoint xsi:type="dc:Point" x="885.0" y="293.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="848.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">
- <di:waypoint xsi:type="dc:Point" x="985.0" y="293.0"/>
- <di:waypoint xsi:type="dc:Point" x="1039.0" y="293.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1004.0" y="293.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="851.0"/>
- </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="1394.0" y="931.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="950.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="950.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="970.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="943.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn
deleted file mode 100644
index 46faf80702..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn
+++ /dev/null
@@ -1,466 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="CreateServiceInstanceInfra" name="CreateServiceInstanceInfra" isExecutable="true">
- <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST PUT to create SI in AAI" scriptFormat="groovy">
- <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.callRESTCreateServiceInstanceInAAI(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_46" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>
- <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
- <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>
- <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${CRESI_createDBInfraErrorRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CRESI_errorDBInfraErrorResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="CRESI_errorDBInfraErrorErrorCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>
- <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.buildErrorResponse(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="sendSyncError_ScriptTask"/>
- <bpmn2:scriptTask id="sendSyncError_ScriptTask" name="Send Sync Ack Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.sendSyncError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="sendSyncError_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="CRESI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
- <camunda:in source="requestId" target="requestId"/>
- <camunda:in source="serviceInstanceId" target="serviceInstanceId"/>
- <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_33</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
- <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="subProcessStart_StartEvent" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.prepareDBRequest(execution)
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
- <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${CRESI_createDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CRESI_createDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="CRESI_createDBCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_4</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="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.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="CRESI_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="EndEvent_3"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- <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 com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
- <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Code 404?" default="isReturnCode404_No_SequenceFlow">
- <bpmn2:incoming>SequenceFlow_9</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_DuplicateFound_EndEvent"/>
- <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="callRESTQueryNetworkId_ScriptTask">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRESI_queryAAISINameCode" ) == "404"}
-
-]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="callRESTQueryCustomerSIName_ScriptTask" name="Call REST Query for SI by Name in AAI" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.callRESTQueryAAISIName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="callRESTQueryCustomerSIName_ScriptTask" targetRef="isReturnCode404_ExclusiveGateway"/>
- <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query SubscriberId in AAI" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.callRESTQueryAAIGlobalSubscriberId(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="callRESTQueryCustomerSIName_ScriptTask"/>
- <bpmn2:endEvent id="aai_DuplicateFound_EndEvent" name="Duplicate Found in AAI">
- <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_2"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callAAIQuery_scriptTask"/>
- <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 com.att.bpm.scripts.*
-def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
-CreateServiceInstanceInfra.processJavaException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>
- </bpmn2:subProcess>
- <bpmn2:startEvent id="createNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>
- </bpmn2:process>
- <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateServiceInstanceInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
- <dc:Bounds height="36.0" width="36.0" x="423.0" y="185.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="65.0" x="409.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="612.0" y="163.0"/>
- </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="459.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="612.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="498.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
- <dc:Bounds height="80.0" width="100.0" x="997.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ScriptTask_135">
- <di:waypoint xsi:type="dc:Point" x="1097.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1176.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1122.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1368.0" y="177.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="82.0" x="1353.0" y="154.0"/>
- </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="1418.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="1477.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="1536.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1418.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_ScriptTask_133">
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="1392.0" y="264.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="312.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1395.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="810.0" y="611.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_DuplicateFound_EndEvent">
- <dc:Bounds height="36.0" width="36.0" x="1536.0" y="185.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="125.0" x="1500.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1167.0" y="775.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
- <dc:Bounds height="301.0" width="751.0" x="346.0" y="427.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
- <dc:Bounds height="36.0" width="36.0" x="408.0" y="633.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="67.0" x="393.0" y="674.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="678.0" y="477.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="775.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="456.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="614.0"/>
- </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="712.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="803.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="743.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="803.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_ScriptTask_158">
- <di:waypoint xsi:type="dc:Point" x="778.0" y="517.0"/>
- <di:waypoint xsi:type="dc:Point" x="810.0" y="517.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="803.0" y="517.0"/>
- </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="1394.0" y="694.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="775.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="727.0"/>
- </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="1344.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1267.0" y="815.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1298.0" y="815.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="312.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTQueryCustomerSIName_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1176.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_83">
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="392.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="456.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="427.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="sendSyncError_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="810.0" y="477.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_57" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_CallActivity_3">
- <di:waypoint xsi:type="dc:Point" x="860.0" y="557.0"/>
- <di:waypoint xsi:type="dc:Point" x="860.0" y="611.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="857.0" y="573.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="1083.0" y="797.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1101.0" y="838.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="984.0" y="633.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1002.0" y="674.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">
- <di:waypoint xsi:type="dc:Point" x="910.0" y="651.0"/>
- <di:waypoint xsi:type="dc:Point" x="984.0" y="651.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="909.0" y="651.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">
- <di:waypoint xsi:type="dc:Point" x="634.0" y="517.0"/>
- <di:waypoint xsi:type="dc:Point" x="678.0" y="517.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="644.0" y="517.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">
- <dc:Bounds height="80.0" width="100.0" x="534.0" y="477.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="534.0" y="611.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">
- <di:waypoint xsi:type="dc:Point" x="584.0" y="611.0"/>
- <di:waypoint xsi:type="dc:Point" x="584.0" y="557.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="581.0" y="598.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_ScriptTask_62">
- <di:waypoint xsi:type="dc:Point" x="903.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="997.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="911.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_218">
- <di:waypoint xsi:type="dc:Point" x="444.0" y="651.0"/>
- <di:waypoint xsi:type="dc:Point" x="534.0" y="651.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="451.0" y="651.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="536.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="614.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="575.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">
- <di:waypoint xsi:type="dc:Point" x="1167.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1119.0" y="815.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1140.0" y="815.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ExclusiveGateway_64">
- <di:waypoint xsi:type="dc:Point" x="1276.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1317.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1317.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="1368.0" y="202.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1324.0" y="202.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
- <dc:Bounds height="232.0" width="409.0" x="349.0" y="837.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="417.0" y="942.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="435.0" y="983.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="492.0" y="920.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="647.0" y="939.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="665.0" y="980.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="453.0" y="960.0"/>
- <di:waypoint xsi:type="dc:Point" x="492.0" y="960.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="478.0" y="960.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="592.0" y="960.0"/>
- <di:waypoint xsi:type="dc:Point" x="625.0" y="960.0"/>
- <di:waypoint xsi:type="dc:Point" x="625.0" y="957.0"/>
- <di:waypoint xsi:type="dc:Point" x="647.0" y="957.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="614.0" y="960.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn
deleted file mode 100644
index 79d39cae7d..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn
+++ /dev/null
@@ -1,463 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_DkzPAHB4EeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="CreateVnfInfra" name="CreateVnfInfra" isExecutable="true">
- <bpmn2:startEvent id="StartEvent_1" camunda:asyncAfter="true">
- <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 com.att.bpm.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 com.att.bpm.scripts.*
-CreateVnfInfra createVnf = new CreateVnfInfra()
-createVnf.sendSyncResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendResponse" 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 com.att.bpm.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&#xD;&#xA;Service&#xD;&#xA;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="CREVI_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"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_3</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="callGetVnf">
- <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&#xD;&#xA;Generic Vnf" calledElement="GenericGetVnf">
- <bpmn2:extensionElements>
- <camunda:in source="CREVI_vnfName" target="GENGV_vnfName"/>
- <camunda:in source="CREVI_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>found</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 com.att.bpm.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="Prepare&#xD;&#xA;Create Vnf Payload" scriptFormat="groovy">
- <bpmn2:incoming>vnfExistNo</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-CreateVnfInfra createVnf = new CreateVnfInfra()
-createVnf.prepareCreateGenericVnf(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareCreateGenericVnf" targetRef="callPutVnf"/>
- <bpmn2:callActivity id="callPutVnf" name="Create (Put)&#xD;&#xA;Generic Vnf" calledElement="GenericPutVnf">
- <bpmn2:extensionElements>
- <camunda:in source="CREVI_genericVnfPayload" target="GENPV_vnfPayload"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="CREVI_vnfId" target="GENPV_vnfId"/>
- <camunda:out source="GENPV_SuccessIndicator" target="GENPV_SuccessIndicator"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:in source="CREVI_type" target="GENPV_type"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callPutVnf" targetRef="postProcess"/>
- <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 com.att.bpm.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:subProcess id="bpmnErrorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:callActivity id="callFalloutHandler" name="Call&#xD;&#xA;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 com.att.bpm.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 com.att.bpm.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_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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&#xD;&#xA;Handler" calledElement="CompleteMsoProcess">
- <bpmn2:extensionElements>
- <camunda:in source="CREVI_completionHandlerRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="CREVI_requestId" target="att-mso-request-id"/>
- <camunda:in source="CREVI_serviceInstanceId" target="att-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:process>
- <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="Java Lang Exception"/>
- <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVnfInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="96.0" y="222.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="114.0" y="263.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
- <dc:Bounds height="80.0" width="100.0" x="216.0" y="200.0"/>
- </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.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="216.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="165.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="sendResponse">
- <dc:Bounds height="80.0" width="100.0" x="360.0" y="200.0"/>
- </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.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="360.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="347.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="callGetService">
- <dc:Bounds height="80.0" width="100.0" x="504.0" y="200.0"/>
- </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="460.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="504.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="485.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="serviceInstanceFound" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="642.0" y="214.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="148.0" x="678.0" y="244.0"/>
- </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="604.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="626.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="626.0" y="239.0"/>
- <di:waypoint xsi:type="dc:Point" x="642.0" y="239.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="617.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
- <dc:Bounds height="80.0" width="100.0" x="720.0" y="115.0"/>
- </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="667.0" y="214.0"/>
- <di:waypoint xsi:type="dc:Point" x="667.0" y="155.0"/>
- <di:waypoint xsi:type="dc:Point" x="720.0" y="155.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="666.0" y="174.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="876.0" y="137.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="894.0" y="178.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.0" y="155.0"/>
- <di:waypoint xsi:type="dc:Point" x="876.0" y="155.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="846.0" y="155.0"/>
- </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="667.0" y="264.0"/>
- <di:waypoint xsi:type="dc:Point" x="667.0" y="328.0"/>
- <di:waypoint xsi:type="dc:Point" x="720.0" y="328.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="666.0" y="282.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="callGetVnf">
- <dc:Bounds height="80.0" width="100.0" x="720.0" y="288.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_232" bpmnElement="vnfExist" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="854.0" y="302.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="114.0" x="890.0" y="332.0"/>
- </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.0" y="328.0"/>
- <di:waypoint xsi:type="dc:Point" x="854.0" y="327.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="804.0" y="330.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="vnfExistWorkflowException">
- <dc:Bounds height="80.0" width="100.0" x="926.0" y="367.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="prepareCreateGenericVnf">
- <dc:Bounds height="80.0" width="100.0" x="935.0" y="200.0"/>
- </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.0" y="352.0"/>
- <di:waypoint xsi:type="dc:Point" x="879.0" y="407.0"/>
- <di:waypoint xsi:type="dc:Point" x="926.0" y="407.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="880.0" y="367.0"/>
- </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.0" y="302.0"/>
- <di:waypoint xsi:type="dc:Point" x="879.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="935.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="880.0" y="254.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_227" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1092.0" y="389.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1110.0" y="430.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.0" y="407.0"/>
- <di:waypoint xsi:type="dc:Point" x="1092.0" y="407.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1034.0" y="407.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="1608.0" y="222.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1626.0" y="263.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_CallActivity_61">
- <di:waypoint xsi:type="dc:Point" x="1035.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="1080.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1073.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_61" bpmnElement="callPutVnf">
- <dc:Bounds height="80.0" width="100.0" x="1080.0" y="200.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_61" targetElement="_BPMNShape_ScriptTask_325">
- <di:waypoint xsi:type="dc:Point" x="1180.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="1236.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1223.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_32" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="169.0" width="313.0" x="253.0" y="696.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_76" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="277.0" y="763.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="295.0" y="804.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="processJavaError">
- <dc:Bounds height="80.0" width="100.0" x="360.0" y="741.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="505.0" y="763.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="523.0" y="804.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.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="360.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="331.0" y="781.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="460.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="505.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="477.0" y="781.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_33" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="232.0" width="601.0" x="109.0" y="433.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_77" bpmnElement="StartEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="133.0" y="532.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="151.0" y="573.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="649.0" y="532.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="667.0" y="573.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_62" bpmnElement="callFalloutHandler">
- <dc:Bounds height="80.0" width="100.0" x="493.0" y="510.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_309" bpmnElement="processError">
- <dc:Bounds height="80.0" width="100.0" x="361.0" y="510.0"/>
- </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.0" y="550.0"/>
- <di:waypoint xsi:type="dc:Point" x="229.0" y="550.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="172.0" y="550.0"/>
- </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.0" y="550.0"/>
- <di:waypoint xsi:type="dc:Point" x="493.0" y="550.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="486.0" y="550.0"/>
- </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.0" y="550.0"/>
- <di:waypoint xsi:type="dc:Point" x="649.0" y="550.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="618.0" y="550.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="sendErrorResponse">
- <dc:Bounds height="80.0" width="100.0" x="229.0" y="510.0"/>
- </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.0" y="550.0"/>
- <di:waypoint xsi:type="dc:Point" x="361.0" y="550.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="342.0" y="550.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_325" bpmnElement="postProcess">
- <dc:Bounds height="80.0" width="100.0" x="1236.0" y="200.0"/>
- </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="1336.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="1380.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1347.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_69" bpmnElement="callCompletionHandler">
- <dc:Bounds height="80.0" width="100.0" x="1380.0" y="200.0"/>
- </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="1480.0" y="240.0"/>
- <di:waypoint xsi:type="dc:Point" x="1608.0" y="240.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1541.0" y="240.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn
deleted file mode 100644
index fc6d7f5cb1..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn
+++ /dev/null
@@ -1,1007 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="DeleteNetworkInstanceInfra" name="DeleteNetworkInstanceInfra" isExecutable="true">
- <bpmn2:startEvent id="deleteNetwork_startEvent" camunda:asyncAfter="true" 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="callAAIQuery_scriptTask" name="Call REST Query In AAI" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def callRESTDeleteAAI = new DeleteNetworkInstanceInfra()
-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 Delete 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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callDeleteSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask"/>
- <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" name="Compesation" attachedToRef="callDeleteSDNCAdapter_CallActivity">
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
- </bpmn2:boundaryEvent>
- <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
- <bpmn2:incoming>sdncTopoDeleteYes_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def prepareDBRequest = new DeleteNetworkInstanceInfra()
-prepareDBRequest.prepareDBRequest(execution)
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <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 com.att.bpm.scripts.*
-def validateSDNCResponse = new DeleteNetworkInstanceInfra()
-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 Delete 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="prepareDBInfraRequest_ScriptTask">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_sdncResponseSuccess" ) == true}
-]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
- <bpmn2:callActivity id="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">
- <bpmn2:extensionElements>
- <camunda:in source="DELNWKI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_rollbackSDNCReturnCode"/>
- <camunda:out source="sdncAdapterResponse" target="DELNWKI_rollbackSDNCResponse"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- </bpmn2:extensionElements>
- </bpmn2:callActivity>
- <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="isRollbackON_ExclusiveGateway"/>
- <bpmn2:exclusiveGateway id="isRollbackON_ExclusiveGateway" name="Is Rollback ON?" default="isRollbackOnNo_SequenceFlow">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>isRollbackOnNo_SequenceFlow</bpmn2:outgoing>
- <bpmn2:outgoing>isRollbackOnYes_SequenceFlow</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="isRollbackOnNo_SequenceFlow" name="No" sourceRef="isRollbackON_ExclusiveGateway" targetRef="InclusiveGateway_1"/>
- <bpmn2:sequenceFlow id="isRollbackOnYes_SequenceFlow" name="Yes" sourceRef="isRollbackON_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("URN_mso_rollback") == true}
-
-]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="is PONR?" default="isPONR_No_SequenceFlow">
- <bpmn2:incoming>isRollbackOnYes_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>
- <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isSdncOk_ExclusiveGateway"/>
- <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="InclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isPONR") == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def buildErrorResponse = new DeleteNetworkInstanceInfra()
-buildErrorResponse.buildErrorResponse(execution)
-]]></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="DELNWKI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_26</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_2"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="isSdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="isSdncOk_No_SequenceFlow">
- <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>isSdncOk_Yes_SequenceFlow</bpmn2:outgoing>
- <bpmn2:outgoing>isSdncOk_No_SequenceFlow</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="isSdncOk_Yes_SequenceFlow" name="Yes" sourceRef="isSdncOk_ExclusiveGateway" targetRef="sdncTopoRollback_IntermediateThrowEvent">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="isSdncOk_No_SequenceFlow" name="No" sourceRef="isSdncOk_ExclusiveGateway" targetRef="InclusiveGateway_2"/>
- <bpmn2:serviceTask id="dbUpdateError_ServiceTask" name="Call DB Update Error">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${DELNWKI_deleteDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="DELNWKI_deleteDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="DELNWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="dbUpdateError_ServiceTask" targetRef="prepareFalloutHandler_ScriptTask"/>
- <bpmn2:scriptTask id="prepareDBUpdateErrorRequest_ScriptTask" name="Prepare DB Update Error Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def prepareDBRequest = new DeleteNetworkInstanceInfra()
-prepareDBRequest.prepareDBRequestError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="prepareDBUpdateErrorRequest_ScriptTask" targetRef="dbUpdateError_ServiceTask"/>
- <bpmn2:inclusiveGateway id="InclusiveGateway_1">
- <bpmn2:incoming>isRollbackOnNo_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="InclusiveGateway_1" targetRef="prepareDBUpdateErrorRequest_ScriptTask"/>
- <bpmn2:inclusiveGateway id="InclusiveGateway_2">
- <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>isSdncOk_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InclusiveGateway_2" targetRef="InclusiveGateway_1"/>
- <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">
- <bpmn2:incoming>isSdncOk_Yes_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="InclusiveGateway_2"/>
- </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="prepareDBInfraRequestSilentSucces_ScriptTask"/>
- <bpmn2:scriptTask id="prepareDBInfraRequestSilentSucces_ScriptTask" name="Prepare DB Infra Request Silent Success" scriptFormat="groovy">
- <bpmn2:incoming>silentSuccess_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def prepareDBRequest = new DeleteNetworkInstanceInfra()
-prepareDBRequest.prepareDBRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="prepareDBInfraRequestSilentSucces_ScriptTask" targetRef="silentSuccessCallDB_ServiceTask"/>
- <bpmn2:serviceTask id="silentSuccessCallDB_ServiceTask" name="Call DB Infra Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${DELNWKI_deleteDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="DELNWKI_deleteDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="DELNWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_40" name="" sourceRef="silentSuccessCallDB_ServiceTask" targetRef="prepareSilentCompletion_ScriptTask"/>
- <bpmn2:scriptTask id="prepareSilentCompletion_ScriptTask" name="Prepare Silent Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def postProcessResponse = new DeleteNetworkInstanceInfra()
-postProcessResponse.postProcessResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="prepareSilentCompletion_ScriptTask" targetRef="silentAccess_CallActivity"/>
- <bpmn2:callActivity id="silentAccess_CallActivity" name="Call CompleteMsoProcess (Silent Success)" calledElement="CompleteMsoProcess">
- <bpmn2:extensionElements>
- <camunda:in source="DELNWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in variables="all"/>
- <camunda:out variables="all"/>
- <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_41</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="silentAccess_CallActivity" targetRef="EndEvent_1"/>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_24</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 com.att.bpm.scripts.*
-def DeleteNetworkInstanceInfra = new DeleteNetworkInstanceInfra()
-DeleteNetworkInstanceInfra.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:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${DELNWKI_deleteDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="DELNWKI_deleteDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="DELNWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_18</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="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def postProcessResponse = new DeleteNetworkInstanceInfra()
-postProcessResponse.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="DELNWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_35</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def prepareSDNCRequest = new DeleteNetworkInstanceInfra()
-prepareSDNCRequest.prepareSDNCRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callDeleteSDNCAdapter_CallActivity"/>
- <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 com.att.bpm.scripts.*
-def validateNetworkResponse = new DeleteNetworkInstanceInfra()
-validateNetworkResponse.validateNetworkResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="validateDeletePONetwork_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask"/>
- <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 com.att.bpm.scripts.*
-def prepareNetworkRequest = new DeleteNetworkInstanceInfra()
-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 com.att.bpm.scripts.*
-def prepareNetworkRequest = new DeleteNetworkInstanceInfra()
-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 com.att.bpm.scripts.*
-def CreateNetworkV2 = new DeleteNetworkInstanceInfra()
-DeleteNetworkInstanceInfra.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="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def preProcessRequest = new DeleteNetworkInstanceInfra()
-preProcessRequest.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
- <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sendSyncResponse = new DeleteNetworkInstanceInfra()
-sendSyncResponse.sendSyncResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callAAIQuery_scriptTask"/>
- <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/>
- </bpmn2:process>
- <bpmn2:error id="Error_3" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteNetworkInstanceInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
- <dc:Bounds height="36.0" width="36.0" x="96.0" y="185.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="97.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="262.0" y="163.0"/>
- </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.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="262.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="216.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
- <dc:Bounds height="80.0" width="100.0" x="816.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryOk_ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="984.0" y="72.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="108.0" x="956.0" y="51.0"/>
- </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.0" y="163.0"/>
- <di:waypoint xsi:type="dc:Point" x="865.0" y="122.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="862.0" y="135.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateDeletePONetwork_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1102.0" y="550.0"/>
- </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.0" y="122.0"/>
- <di:waypoint xsi:type="dc:Point" x="1009.0" y="177.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1008.0" y="120.0"/>
- </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.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1126.0" y="97.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1036.0" y="97.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1126.0" y="72.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="124.0" x="1090.0" y="51.0"/>
- </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.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1212.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="1212.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="1281.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1176.0" y="97.0"/>
- </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.0" y="122.0"/>
- <di:waypoint xsi:type="dc:Point" x="1151.0" y="177.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1152.0" y="120.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="696.0" y="684.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_65" bpmnElement="isResponseEmpty_ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="984.0" y="177.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="95.0" x="1016.0" y="163.0"/>
- </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.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="1010.0" y="269.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1016.0" y="227.0"/>
- </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.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="1126.0" y="202.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1034.0" y="202.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
- <dc:Bounds height="36.0" width="36.0" x="1281.0" y="80.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="59.0" x="1270.0" y="121.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_66" bpmnElement="prepareNetworkRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="960.0" y="417.0"/>
- </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="1060.0" y="457.0"/>
- <di:waypoint xsi:type="dc:Point" x="1104.0" y="457.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1071.0" y="457.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1102.0" y="687.0"/>
- </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="1152.0" y="630.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="687.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1149.0" y="641.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1102.0" y="1416.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
- <dc:Bounds height="512.0" width="902.0" x="0.0" y="576.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
- <dc:Bounds height="36.0" width="36.0" x="60.0" y="945.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="67.0" x="45.0" y="987.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="396.0" y="684.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoDeleteOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1272.0" y="988.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="157.0" x="1221.0" y="1047.0"/>
- </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="1322.0" y="1013.0"/>
- <di:waypoint xsi:type="dc:Point" x="1372.0" y="1013.0"/>
- <di:waypoint xsi:type="dc:Point" x="1372.0" y="1014.0"/>
- <di:waypoint xsi:type="dc:Point" x="1407.0" y="1014.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1326.0" y="1017.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoDeleteYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_83">
- <di:waypoint xsi:type="dc:Point" x="1272.0" y="1013.0"/>
- <di:waypoint xsi:type="dc:Point" x="1245.0" y="1013.0"/>
- <di:waypoint xsi:type="dc:Point" x="1245.0" y="1014.0"/>
- <di:waypoint xsi:type="dc:Point" x="1204.0" y="1014.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1249.0" y="1017.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1104.0" y="1272.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1104.0" y="974.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1104.0" y="1140.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
- <dc:Bounds height="36.0" width="36.0" x="1407.0" y="996.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="74.0" x="1388.0" y="1037.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callDeleteSDNCAdapter_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1104.0" y="851.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">
- <dc:Bounds height="36.0" width="36.0" x="1086.0" y="890.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1101.0" y="931.0"/>
- </bpmndi:BPMNLabel>
- </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="1152.0" y="767.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="798.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="798.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="851.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1149.0" y="786.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="1204.0" y="891.0"/>
- <di:waypoint xsi:type="dc:Point" x="1246.0" y="891.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1236.0" y="891.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21">
- <di:waypoint xsi:type="dc:Point" x="1086.0" y="922.0"/>
- <di:waypoint xsi:type="dc:Point" x="1045.0" y="953.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
- <di:waypoint xsi:type="dc:Point" x="362.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="432.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="393.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="432.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_72">
- <di:waypoint xsi:type="dc:Point" x="96.0" y="963.0"/>
- <di:waypoint xsi:type="dc:Point" x="144.0" y="962.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="108.0" y="963.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="1154.0" y="497.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="523.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="523.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="550.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1149.0" y="528.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_2" bpmnElement="silentSucces_InclusiveGateway">
- <dc:Bounds height="50.0" width="50.0" x="1126.0" y="177.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="33.0" x="1136.0" y="227.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="silentSuccess_SequenceFlow" sourceElement="_BPMNShape_InclusiveGateway_2" targetElement="_BPMNShape_ScriptTask_128">
- <di:waypoint xsi:type="dc:Point" x="1176.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="1238.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="1238.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1307.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="94.0" x="1179.0" y="177.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_128" bpmnElement="prepareDBInfraRequestSilentSucces_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1307.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_87" bpmnElement="silentSuccessCallDB_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1453.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_128" targetElement="_BPMNShape_ServiceTask_87">
- <di:waypoint xsi:type="dc:Point" x="1407.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1453.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1422.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">
- <dc:Bounds height="36.0" width="36.0" x="244.0" y="696.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="96.0" x="194.0" y="666.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="prepareSilentCompletion_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1453.0" y="307.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_20" bpmnElement="silentAccess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1453.0" y="428.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ServiceTask_87" targetElement="_BPMNShape_ScriptTask_130">
- <di:waypoint xsi:type="dc:Point" x="1503.0" y="243.0"/>
- <di:waypoint xsi:type="dc:Point" x="1503.0" y="307.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1500.0" y="265.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_56" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_CallActivity_20">
- <di:waypoint xsi:type="dc:Point" x="1503.0" y="387.0"/>
- <di:waypoint xsi:type="dc:Point" x="1503.0" y="428.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1500.0" y="417.0"/>
- </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="496.0" y="724.0"/>
- <di:waypoint xsi:type="dc:Point" x="696.0" y="724.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="521.0" y="724.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1246.0" y="851.0"/>
- </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="1296.0" y="931.0"/>
- <di:waypoint xsi:type="dc:Point" x="1297.0" y="988.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1294.0" y="960.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="1054.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="1140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1151.0" y="1076.0"/>
- </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="1154.0" y="1220.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="1272.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1151.0" y="1238.0"/>
- </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="1154.0" y="1352.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="1384.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="1384.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="1416.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1151.0" y="1377.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_72" bpmnElement="isRollbackON_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="144.0" y="937.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="100.0" x="130.0" y="987.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="isRollbackOnNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_InclusiveGateway_27">
- <di:waypoint xsi:type="dc:Point" x="194.0" y="962.0"/>
- <di:waypoint xsi:type="dc:Point" x="244.0" y="962.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="192.0" y="968.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="isRollbackOnYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_ExclusiveGateway_218">
- <di:waypoint xsi:type="dc:Point" x="169.0" y="937.0"/>
- <di:waypoint xsi:type="dc:Point" x="169.0" y="890.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="180.0" y="917.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="945.0" y="951.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_242" bpmnElement="sendRequestToNewworkAdapater_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1104.0" y="417.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_27" bpmnElement="InclusiveGateway_1">
- <dc:Bounds height="50.0" width="50.0" x="244.0" y="937.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="269.0" y="992.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_44" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_InclusiveGateway_28">
- <di:waypoint xsi:type="dc:Point" x="280.0" y="714.0"/>
- <di:waypoint xsi:type="dc:Point" x="334.0" y="714.0"/>
- <di:waypoint xsi:type="dc:Point" x="334.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="294.0" y="865.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="284.0" y="714.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_InclusiveGateway_27" targetElement="_BPMNShape_ScriptTask_243">
- <di:waypoint xsi:type="dc:Point" x="294.0" y="962.0"/>
- <di:waypoint xsi:type="dc:Point" x="396.0" y="963.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="309.0" y="962.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1485.0" y="548.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1503.0" y="589.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_46" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_CallActivity_20" targetElement="_BPMNShape_EndEvent_179">
- <di:waypoint xsi:type="dc:Point" x="1503.0" y="508.0"/>
- <di:waypoint xsi:type="dc:Point" x="1503.0" y="548.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1500.0" y="530.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="828.0" y="706.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="846.0" y="747.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_49" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_180">
- <di:waypoint xsi:type="dc:Point" x="796.0" y="724.0"/>
- <di:waypoint xsi:type="dc:Point" x="828.0" y="724.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="816.0" y="724.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_218" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="144.0" y="840.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="64.0" x="82.0" y="855.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_50" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_218" targetElement="_BPMNShape_ExclusiveGateway_219">
- <di:waypoint xsi:type="dc:Point" x="169.0" y="840.0"/>
- <di:waypoint xsi:type="dc:Point" x="169.0" y="804.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="174.0" y="820.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_51" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_218" targetElement="_BPMNShape_InclusiveGateway_28">
- <di:waypoint xsi:type="dc:Point" x="194.0" y="865.0"/>
- <di:waypoint xsi:type="dc:Point" x="244.0" y="865.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="189.0" y="865.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_182" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="1135.0" y="1545.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1153.0" y="1586.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_182">
- <di:waypoint xsi:type="dc:Point" x="1153.0" y="1496.0"/>
- <di:waypoint xsi:type="dc:Point" x="1153.0" y="1514.0"/>
- <di:waypoint xsi:type="dc:Point" x="1153.0" y="1545.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1150.0" y="1510.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_28" bpmnElement="InclusiveGateway_2">
- <dc:Bounds height="50.0" width="50.0" x="244.0" y="840.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="269.0" y="895.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_219" bpmnElement="isSdncOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="144.0" y="754.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="78.0" x="60.0" y="769.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_57" bpmnElement="isSdncOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_219" targetElement="_BPMNShape_IntermediateThrowEvent_24">
- <di:waypoint xsi:type="dc:Point" x="169.0" y="754.0"/>
- <di:waypoint xsi:type="dc:Point" x="169.0" y="714.0"/>
- <di:waypoint xsi:type="dc:Point" x="244.0" y="714.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="180.0" y="741.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="isSdncOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_219" targetElement="_BPMNShape_InclusiveGateway_28">
- <di:waypoint xsi:type="dc:Point" x="194.0" y="779.0"/>
- <di:waypoint xsi:type="dc:Point" x="269.0" y="779.0"/>
- <di:waypoint xsi:type="dc:Point" x="269.0" y="840.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="194.0" y="784.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_59" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_InclusiveGateway_28" targetElement="_BPMNShape_InclusiveGateway_27">
- <di:waypoint xsi:type="dc:Point" x="269.0" y="890.0"/>
- <di:waypoint xsi:type="dc:Point" x="269.0" y="937.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="266.0" y="914.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_243" bpmnElement="prepareDBUpdateErrorRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="396.0" y="923.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_98" bpmnElement="dbUpdateError_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="396.0" y="804.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_243" targetElement="_BPMNShape_ServiceTask_98">
- <di:waypoint xsi:type="dc:Point" x="446.0" y="923.0"/>
- <di:waypoint xsi:type="dc:Point" x="446.0" y="884.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="443.0" y="901.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ServiceTask_98" targetElement="_BPMNShape_ScriptTask_79">
- <di:waypoint xsi:type="dc:Point" x="446.0" y="804.0"/>
- <di:waypoint xsi:type="dc:Point" x="446.0" y="764.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="443.0" y="784.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_ScriptTask_62">
- <di:waypoint xsi:type="dc:Point" x="532.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="816.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="540.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_250" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="960.0" y="269.0"/>
- </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="1010.0" y="349.0"/>
- <di:waypoint xsi:type="dc:Point" x="1010.0" y="417.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1007.0" y="366.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_41" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1328.0" y="833.0"/>
- </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="1364.0" y="851.0"/>
- <di:waypoint xsi:type="dc:Point" x="1387.0" y="850.0"/>
- <di:waypoint xsi:type="dc:Point" x="1425.0" y="850.0"/>
- <di:waypoint xsi:type="dc:Point" x="1425.0" y="996.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1422.0" y="940.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="isRelationshipExists_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="840.0" y="72.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="139.0" x="797.0" y="51.0"/>
- </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.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="984.0" y="97.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="890.0" y="97.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_216" bpmnElement="relationshipError_EndEvent">
- <dc:Bounds height="36.0" width="36.0" x="730.0" y="80.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="109.0" x="701.0" y="117.0"/>
- </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.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="800.0" y="97.0"/>
- <di:waypoint xsi:type="dc:Point" x="800.0" y="98.0"/>
- <di:waypoint xsi:type="dc:Point" x="766.0" y="98.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="816.0" y="97.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_29" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds height="175.0" width="326.0" x="0.0" y="369.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_73" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="36.0" y="432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="54.0" y="473.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_222" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="240.0" y="432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="258.0" y="473.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="unexpectedError_DeleteNetworkInfra_ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="108.0" y="410.0"/>
- </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.0" y="450.0"/>
- <di:waypoint xsi:type="dc:Point" x="108.0" y="450.0"/>
- </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.0" y="450.0"/>
- <di:waypoint xsi:type="dc:Point" x="240.0" y="450.0"/>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.bpmn
deleted file mode 100644
index 7a5c30a170..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.bpmn
+++ /dev/null
@@ -1,554 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="DeleteServiceInstanceInfra" name="DeleteServiceInstanceInfra" isExecutable="true">
- <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
- <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>
- <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${DELSI_createDBInfraErrorRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="DELSI_errorDBInfraErrorResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="DELSI_errorDBInfraErrorErrorCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>
- <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.buildErrorResponse(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="sendSyncError_ScriptTask"/>
- <bpmn2:scriptTask id="sendSyncError_ScriptTask" name="Send Sync Ack Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.sendSyncError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="sendSyncError_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="DELSI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
- <camunda:in source="requestId" target="requestId"/>
- <camunda:in source="serviceInstanceId" target="serviceInstanceId"/>
- <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_33</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
- <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="subProcessStart_StartEvent" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>
- </bpmn2:subProcess>
- <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${DELSI_createDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="DELSI_dbResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="DELSI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_4</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="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.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="DELSI_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="EndEvent_3"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- <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 com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
- <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/>
- <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 com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.processJavaException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>
- </bpmn2:subProcess>
- <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="SI found?" default="isReturnCode404_Yes_SequenceFlow">
- <bpmn2:incoming>SequenceFlow_6</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="YES" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="processResponse">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="prepareDBInfraRequestSilentSucces_ScriptTask" name="Prepare DB Infra Request Silent Success" scriptFormat="groovy">
- <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.prepareDBRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:serviceTask id="silentSuccessCallDB_ServiceTask" name="Call DB Infra Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${DELSI_createDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="DELSI_dbResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="DELSI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:scriptTask id="prepareSilentCompletion_ScriptTask" name="Prepare Silent Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:callActivity id="silentAccess_CallActivity" name="Call CompleteMsoProcess (Silent Success)" calledElement="CompleteMsoProcess">
- <bpmn2:extensionElements>
- <camunda:in source="DELSI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_12</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="prepareDBInfraRequestSilentSucces_ScriptTask" targetRef="silentSuccessCallDB_ServiceTask"/>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="silentSuccessCallDB_ServiceTask" targetRef="prepareSilentCompletion_ScriptTask"/>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="prepareSilentCompletion_ScriptTask" targetRef="silentAccess_CallActivity"/>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="silentAccess_CallActivity" targetRef="EndEvent_2"/>
- <bpmn2:startEvent id="createNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callGetServiceInstance" targetRef="isReturnCode404_ExclusiveGateway"/>
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#xD;&#xA;Service&#xD;&#xA;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="DELSI_serviceInstanceId" target="GENGS_serviceInstanceId"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator"/>
- <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator"/>
- <camunda:out source="GENGS_service" target="DELSI_serviceInstance"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink"/>
- <camunda:in source="GENGS_type" target="GENGS_type"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.prepareDBRequest(execution)
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
- <bpmn2:callActivity id="callDeleteSIsub_CallActivity" name="Call Delete SI subprocess" calledElement="GenericDeleteService">
- <bpmn2:extensionElements>
- <camunda:in source="DELSI_globalSubscriberId" target="GENDS_globalCustomerId"/>
- <camunda:in source="serviceInstanceId" target="GENDS_serviceInstanceId"/>
- <camunda:in source="serviceType" target="GENDS_serviceType"/>
- <camunda:in source="GENGS_type" target="GENDS_type"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_46" name="" sourceRef="callDeleteSIsub_CallActivity" targetRef="prepareDBInfraRequest_ScriptTask"/>
- <bpmn2:scriptTask id="processResponse" name="Process Response" scriptFormat="groovy">
- <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
-DeleteServiceInstanceInfra.processGetServiceInstanceResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="processResponse" targetRef="callDeleteSIsub_CallActivity"/>
- <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="NO" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="prepareDBInfraRequestSilentSucces_ScriptTask"/>
- </bpmn2:process>
- <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteServiceInstanceInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">
- <dc:Bounds height="36.0" width="36.0" x="403.0" y="185.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="65.0" x="389.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="612.0" y="163.0"/>
- </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="439.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="612.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="478.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_CallActivity_73" targetElement="_BPMNShape_ExclusiveGateway_64">
- <di:waypoint xsi:type="dc:Point" x="1132.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1172.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1172.0" y="205.0"/>
- <di:waypoint xsi:type="dc:Point" x="1212.0" y="205.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1157.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1212.0" y="180.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="82.0" x="1197.0" y="157.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_ScriptTask_333">
- <di:waypoint xsi:type="dc:Point" x="1237.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="1237.0" y="283.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="33.0" x="1221.0" y="242.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="810.0" y="611.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1167.0" y="775.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
- <dc:Bounds height="301.0" width="751.0" x="346.0" y="427.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
- <dc:Bounds height="36.0" width="36.0" x="408.0" y="633.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="67.0" x="393.0" y="674.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="678.0" y="477.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="775.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1188.0" y="614.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="614.0"/>
- </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="712.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="803.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="743.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="803.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_ScriptTask_158">
- <di:waypoint xsi:type="dc:Point" x="778.0" y="517.0"/>
- <di:waypoint xsi:type="dc:Point" x="810.0" y="517.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="803.0" y="517.0"/>
- </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="1394.0" y="694.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="775.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1391.0" y="727.0"/>
- </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="1344.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1267.0" y="815.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1298.0" y="815.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_CallActivity_61" targetElement="_BPMNShape_ScriptTask_83">
- <di:waypoint xsi:type="dc:Point" x="1238.0" y="560.0"/>
- <di:waypoint xsi:type="dc:Point" x="1238.0" y="614.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1235.0" y="595.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="sendSyncError_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="810.0" y="477.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_57" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_CallActivity_3">
- <di:waypoint xsi:type="dc:Point" x="860.0" y="557.0"/>
- <di:waypoint xsi:type="dc:Point" x="860.0" y="611.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="857.0" y="573.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="1083.0" y="797.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1101.0" y="838.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="984.0" y="633.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1002.0" y="674.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">
- <di:waypoint xsi:type="dc:Point" x="910.0" y="651.0"/>
- <di:waypoint xsi:type="dc:Point" x="984.0" y="651.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="909.0" y="651.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">
- <di:waypoint xsi:type="dc:Point" x="634.0" y="517.0"/>
- <di:waypoint xsi:type="dc:Point" x="678.0" y="517.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="644.0" y="517.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">
- <dc:Bounds height="80.0" width="100.0" x="534.0" y="477.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="534.0" y="611.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">
- <di:waypoint xsi:type="dc:Point" x="584.0" y="611.0"/>
- <di:waypoint xsi:type="dc:Point" x="584.0" y="557.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="581.0" y="598.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_73">
- <di:waypoint xsi:type="dc:Point" x="903.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="1032.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="911.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_218">
- <di:waypoint xsi:type="dc:Point" x="444.0" y="651.0"/>
- <di:waypoint xsi:type="dc:Point" x="534.0" y="651.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="451.0" y="651.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">
- <di:waypoint xsi:type="dc:Point" x="1288.0" y="654.0"/>
- <di:waypoint xsi:type="dc:Point" x="1344.0" y="654.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1324.0" y="654.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">
- <di:waypoint xsi:type="dc:Point" x="1167.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="1119.0" y="815.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1140.0" y="815.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
- <dc:Bounds height="232.0" width="409.0" x="349.0" y="837.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="417.0" y="942.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="435.0" y="983.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="492.0" y="920.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="647.0" y="939.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="665.0" y="980.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="453.0" y="960.0"/>
- <di:waypoint xsi:type="dc:Point" x="492.0" y="960.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="478.0" y="960.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="592.0" y="960.0"/>
- <di:waypoint xsi:type="dc:Point" x="625.0" y="960.0"/>
- <di:waypoint xsi:type="dc:Point" x="625.0" y="957.0"/>
- <di:waypoint xsi:type="dc:Point" x="647.0" y="957.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="614.0" y="960.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="prepareDBInfraRequestSilentSucces_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1344.0" y="168.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_104" bpmnElement="silentSuccessCallDB_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1500.0" y="166.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="prepareSilentCompletion_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1488.0" y="312.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1512.0" y="521.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1530.0" y="562.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="silentAccess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1480.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ServiceTask_104">
- <di:waypoint xsi:type="dc:Point" x="1444.0" y="208.0"/>
- <di:waypoint xsi:type="dc:Point" x="1472.0" y="208.0"/>
- <di:waypoint xsi:type="dc:Point" x="1472.0" y="206.0"/>
- <di:waypoint xsi:type="dc:Point" x="1500.0" y="206.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ServiceTask_104" targetElement="_BPMNShape_ScriptTask_286">
- <di:waypoint xsi:type="dc:Point" x="1550.0" y="246.0"/>
- <di:waypoint xsi:type="dc:Point" x="1550.0" y="279.0"/>
- <di:waypoint xsi:type="dc:Point" x="1538.0" y="279.0"/>
- <di:waypoint xsi:type="dc:Point" x="1538.0" y="312.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_286" targetElement="_BPMNShape_CallActivity_60">
- <di:waypoint xsi:type="dc:Point" x="1538.0" y="392.0"/>
- <di:waypoint xsi:type="dc:Point" x="1538.0" y="406.0"/>
- <di:waypoint xsi:type="dc:Point" x="1530.0" y="406.0"/>
- <di:waypoint xsi:type="dc:Point" x="1530.0" y="420.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_CallActivity_60" targetElement="_BPMNShape_EndEvent_220">
- <di:waypoint xsi:type="dc:Point" x="1530.0" y="500.0"/>
- <di:waypoint xsi:type="dc:Point" x="1530.0" y="521.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_61" bpmnElement="callDeleteSIsub_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1188.0" y="480.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_73" bpmnElement="callGetServiceInstance">
- <dc:Bounds height="80.0" width="100.0" x="1032.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="processResponse">
- <dc:Bounds height="80.0" width="100.0" x="1187.0" y="283.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_333" targetElement="_BPMNShape_CallActivity_61">
- <di:waypoint xsi:type="dc:Point" x="1237.0" y="363.0"/>
- <di:waypoint xsi:type="dc:Point" x="1237.0" y="421.0"/>
- <di:waypoint xsi:type="dc:Point" x="1238.0" y="421.0"/>
- <di:waypoint xsi:type="dc:Point" x="1238.0" y="480.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_ScriptTask_285">
- <di:waypoint xsi:type="dc:Point" x="1262.0" y="205.0"/>
- <di:waypoint xsi:type="dc:Point" x="1303.0" y="205.0"/>
- <di:waypoint xsi:type="dc:Point" x="1303.0" y="208.0"/>
- <di:waypoint xsi:type="dc:Point" x="1344.0" y="208.0"/>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn
deleted file mode 100644
index 28d005c144..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn
+++ /dev/null
@@ -1,458 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_9MhrcHqVEea26OhQB97uCQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <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_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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 com.att.bpm.scripts.*
-DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
-deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="sendSyncResponse"/>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncResponse" targetRef="callGetVnf"/>
- <bpmn2:callActivity id="callGetVnf" name="Get&#xD;&#xA;Generic Vnf" calledElement="GenericGetVnf">
- <bpmn2:extensionElements>
- <camunda:out source="GENGV_vnf" target="DELVI_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="DELVI_type" target="GENGV_type"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="DELVI_vnfId" target="GENGV_vnfId"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_3</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 com.att.bpm.scripts.*
-DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
-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("DELVI_vnfInUse") == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notInUse" name="No" sourceRef="vnfInUseCheck" targetRef="callDeleteVnf"/>
- <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 com.att.bpm.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:callActivity id="callDeleteVnf" name="Delete&#xD;&#xA;Generic Vnf" calledElement="GenericDeleteVnf">
- <bpmn2:extensionElements>
- <camunda:in source="DELVI_vnfId" target="GENDV_vnfId"/>
- <camunda:in source="DELVI_type" target="GENDV_type"/>
- <camunda:out source="GENDV_SuccessIndicator" target="GENDV_SuccessIndicator"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="DELVI_resourceVersion" target="GENDV_resourceVersion"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>notInUse</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- </bpmn2:callActivity>
- <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="callDeleteVnf" targetRef="ExclusiveGateway_2"/>
- <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 com.att.bpm.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&#xD;&#xA;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 com.att.bpm.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 com.att.bpm.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="postProcess"/>
- <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:scriptTask id="postProcess" name="Prepare Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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&#xD;&#xA;Handler" calledElement="CompleteMsoProcess">
- <bpmn2:extensionElements>
- <camunda:in source="DELVI_completionHandlerRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="DELVI_requestId" target="att-mso-request-id"/>
- <camunda:in source="DELVI_serviceInstanceId" target="att-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:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="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 height="36.0" width="36.0" x="90.0" y="210.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="108.0" y="251.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
- <dc:Bounds height="80.0" width="100.0" x="216.0" y="188.0"/>
- </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.0" y="228.0"/>
- <di:waypoint xsi:type="dc:Point" x="216.0" y="228.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="164.0" y="228.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="sendSyncResponse">
- <dc:Bounds height="80.0" width="100.0" x="364.0" y="188.0"/>
- </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.0" y="228.0"/>
- <di:waypoint xsi:type="dc:Point" x="364.0" y="228.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="341.0" y="228.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_314" bpmnElement="processResponse">
- <dc:Bounds height="80.0" width="100.0" x="704.0" y="291.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_313" targetElement="_BPMNShape_CallActivity_63">
- <di:waypoint xsi:type="dc:Point" x="464.0" y="228.0"/>
- <di:waypoint xsi:type="dc:Point" x="504.0" y="228.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="487.0" y="228.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_63" bpmnElement="callGetVnf">
- <dc:Bounds height="80.0" width="100.0" x="504.0" y="188.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_236" bpmnElement="vnfInUseCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="840.0" y="305.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="73.0" x="890.0" y="335.0"/>
- </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.0" y="331.0"/>
- <di:waypoint xsi:type="dc:Point" x="840.0" y="330.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="799.0" y="325.0"/>
- </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.0" y="228.0"/>
- <di:waypoint xsi:type="dc:Point" x="634.0" y="227.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="630.0" y="227.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="createWorkflowExceptionInUse">
- <dc:Bounds height="80.0" width="100.0" x="912.0" y="196.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_64" bpmnElement="callDeleteVnf">
- <dc:Bounds height="80.0" width="100.0" x="912.0" y="384.0"/>
- </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.0" y="305.0"/>
- <di:waypoint xsi:type="dc:Point" x="865.0" y="236.0"/>
- <di:waypoint xsi:type="dc:Point" x="912.0" y="236.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="867.0" y="258.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="notInUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="_BPMNShape_CallActivity_64">
- <di:waypoint xsi:type="dc:Point" x="865.0" y="355.0"/>
- <di:waypoint xsi:type="dc:Point" x="865.0" y="424.0"/>
- <di:waypoint xsi:type="dc:Point" x="912.0" y="424.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="870.0" y="384.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1100.0" y="218.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1118.0" y="259.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.0" y="236.0"/>
- <di:waypoint xsi:type="dc:Point" x="1100.0" y="236.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1062.0" y="236.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_237" bpmnElement="vnfFoundCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="634.0" y="202.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="72.0" x="672.0" y="240.0"/>
- </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.0" y="252.0"/>
- <di:waypoint xsi:type="dc:Point" x="659.0" y="331.0"/>
- <di:waypoint xsi:type="dc:Point" x="704.0" y="331.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="659.0" y="288.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_2" bpmnElement="IntermediateThrowEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="740.0" y="102.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="73.0" x="722.0" y="143.0"/>
- </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.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="659.0" y="120.0"/>
- <di:waypoint xsi:type="dc:Point" x="740.0" y="120.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="662.0" y="144.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1524.0" y="406.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1542.0" y="447.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_238" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1062.0" y="398.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1087.0" y="453.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_64" targetElement="_BPMNShape_ExclusiveGateway_238">
- <di:waypoint xsi:type="dc:Point" x="1012.0" y="424.0"/>
- <di:waypoint xsi:type="dc:Point" x="1062.0" y="423.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1036.0" y="423.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_238" targetElement="_BPMNShape_ScriptTask_326">
- <di:waypoint xsi:type="dc:Point" x="1112.0" y="423.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="424.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1128.0" y="423.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_2" bpmnElement="IntermediateCatchEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1069.0" y="492.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="73.0" x="1051.0" y="533.0"/>
- </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.0" y="492.0"/>
- <di:waypoint xsi:type="dc:Point" x="1087.0" y="448.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1084.0" y="462.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_34" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="207.0" width="589.0" x="132.0" y="442.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_80" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="144.0" y="528.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="162.0" y="569.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="672.0" y="528.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="690.0" y="569.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_66" bpmnElement="callFalloutHandler">
- <dc:Bounds height="80.0" width="100.0" x="516.0" y="506.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_317" bpmnElement="sendErrorResponse">
- <dc:Bounds height="80.0" width="100.0" x="240.0" y="506.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="prepareFalloutHandlerRequest">
- <dc:Bounds height="80.0" width="100.0" x="377.0" y="506.0"/>
- </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.0" y="546.0"/>
- <di:waypoint xsi:type="dc:Point" x="240.0" y="546.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="201.0" y="546.0"/>
- </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.0" y="546.0"/>
- <di:waypoint xsi:type="dc:Point" x="377.0" y="546.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="353.0" y="546.0"/>
- </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.0" y="546.0"/>
- <di:waypoint xsi:type="dc:Point" x="516.0" y="546.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="491.0" y="546.0"/>
- </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.0" y="546.0"/>
- <di:waypoint xsi:type="dc:Point" x="672.0" y="546.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="635.0" y="546.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="157.0" width="312.0" x="271.0" y="696.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="300.0" y="757.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="318.0" y="798.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="516.0" y="757.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="534.0" y="798.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
- <dc:Bounds height="80.0" width="100.0" x="378.0" y="735.0"/>
- </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.0" y="775.0"/>
- <di:waypoint xsi:type="dc:Point" x="378.0" y="775.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="354.0" y="775.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="478.0" y="775.0"/>
- <di:waypoint xsi:type="dc:Point" x="516.0" y="775.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="494.0" y="775.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_326" bpmnElement="postProcess">
- <dc:Bounds height="80.0" width="100.0" x="1152.0" y="384.0"/>
- </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="1252.0" y="424.0"/>
- <di:waypoint xsi:type="dc:Point" x="1296.0" y="424.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1271.0" y="424.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_71" bpmnElement="callCompletionHandler">
- <dc:Bounds height="80.0" width="100.0" x="1296.0" y="384.0"/>
- </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="1396.0" y="424.0"/>
- <di:waypoint xsi:type="dc:Point" x="1524.0" y="424.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1411.0" y="424.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
deleted file mode 100644
index 158c4b7766..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
+++ /dev/null
@@ -1,1024 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_EsMs0HcuEeW2U_kkOHX1ZQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="CompleteMsoProcess" name="CompleteMsoProcess" isExecutable="true">
- <bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def preProcessRequestData = new CompleteMsoProcess()
-preProcessRequestData.preProcessRequest(execution)
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest" targetRef="ExclusiveGateway_5"/>
- <bpmn2:startEvent id="StartEvent_1" name="Start With Message ">
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_2"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_1" targetRef="preProcessRequest"/>
- <bpmn2:parallelGateway id="ExclusiveGateway_5">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_45</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_45" name="" sourceRef="ExclusiveGateway_5" targetRef="ParallelGateway_3"/>
- <bpmn2:sequenceFlow id="SequenceFlow_46" name="" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_3"/>
- <bpmn2:exclusiveGateway id="ParallelGateway_3" name="Notification Url Present?" default="SequenceFlow_40">
- <bpmn2:incoming>SequenceFlow_45</bpmn2:incoming>
- <bpmn2:outgoing>if_notifcationURLExists</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="if_notifcationURLExists" name="Yes" sourceRef="ParallelGateway_3" targetRef="ExclusiveGateway_1">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_notification-url-Ok") ==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_40" name="No" sourceRef="ParallelGateway_3" targetRef="ParallelGateway_5"/>
- <bpmn2:parallelGateway id="ExclusiveGateway_1">
- <bpmn2:incoming>if_notifcationURLExists</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_87</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_73</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_87" name="" sourceRef="ExclusiveGateway_1" targetRef="UpdateFinalNotifyAckStatus"/>
- <bpmn2:sequenceFlow id="SequenceFlow_73" name="" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_11"/>
- <bpmn2:subProcess id="subProcessExceptionCompleteMSO" name="Sub Process Exception Complete MSO" triggeredByEvent="true">
- <bpmn2:endEvent id="endEventExceptionCompleteMSO">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:outputParameter name="DB_ADAPTER_ERROR">${CMSO_updateRequestResponse}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="MessageEventDefinition_3"/>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="startEventExceptionCompleteMSO">
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_4"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="startEventExceptionCompleteMSO" targetRef="endEventExceptionCompleteMSO"/>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="ScriptTask_6" name="Build Error Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_58</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>
- <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
-import com.att.bpm.scripts.*
-def buildDataErrorMessage = new CompleteMsoProcess()
-buildDataErrorMessage.buildDataError(execution, "Complete --updateFinal NotifyAck Status Success-- Failed")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="ScriptTask_6" targetRef="EndEvent_10"/>
- <bpmn2:serviceTask id="updateFinalNotifyAckStatus" name="updateFinal NotifyAck Status">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CMSO_updateFinalNotifyAckStatusSuccessPayload")}]]></camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="updateFinalNotifyAckStatus" targetRef="ExclusiveGateway_15"/>
- <bpmn2:endEvent id="EndEvent_14">
- <bpmn2:incoming>SequenceFlow_44</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_15" default="SequenceFlow_58">
- <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_54</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_58</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_54" name="" sourceRef="ExclusiveGateway_15" targetRef="ParallelGateway_5">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_58" name="" sourceRef="ExclusiveGateway_15" targetRef="ScriptTask_6"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="updateFinalNotifyAckStatus">
- <bpmn2:outgoing>SequenceFlow_44</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_85" errorRef="Error_1"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_44" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_14"/>
- <bpmn2:parallelGateway id="ParallelGateway_9">
- <bpmn2:incoming>SequenceFlow_63</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_70</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_70" name="" sourceRef="ParallelGateway_9" targetRef="prepareUpdateFinalAckStatus"/>
- <bpmn2:scriptTask id="prepareUpdateFinalAckStatus" name="Prepare DB Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_70</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def updateFinal= new CompleteMsoProcess()
-updateFinal.updateFinalNotifyAckStatusSuccessPayload(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareUpdateFinalAckStatus" targetRef="updateFinalNotifyAckStatus"/>
- <bpmn2:endEvent id="EndEvent_10">
- <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_10" errorRef="Error_3"/>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_16" default="SequenceFlow_61">
- <bpmn2:incoming>SequenceFlow_60</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_63</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="ExclusiveGateway_16" targetRef="ScriptTask_7"/>
- <bpmn2:sequenceFlow id="SequenceFlow_63" name="" sourceRef="ExclusiveGateway_16" targetRef="ParallelGateway_9">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_7" name="Build Error Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_62</bpmn2:outgoing>
- <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
-import com.att.bpm.scripts.*
-def buildDataErrorMessage = new CompleteMsoProcess()
-buildDataErrorMessage.buildDataError(execution, "Complete -- Update Final Notify Ack Status -- Failed")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_62" name="" sourceRef="ScriptTask_7" targetRef="EndEvent_11"/>
- <bpmn2:endEvent id="EndEvent_11">
- <bpmn2:incoming>SequenceFlow_62</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_11" errorRef="Error_3"/>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_17">
- <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_92</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ExclusiveGateway_17" targetRef="ParallelGateway_9"/>
- <bpmn2:scriptTask id="ScriptTask_1" name="Set Delivery Status Variable" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[if(execution.getVariable("CCDStatusCode")==204){
- execution.setVariable("CMSO_deliveryStatus", true)
-}
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_17"/>
- <bpmn2:serviceTask id="ServiceTask_1" name="Notify CCD Success">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url"><![CDATA[${execution.getVariable("CMSO_notification-url")}]]></camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="Content-Type">text/xml</camunda:entry>
- <camunda:entry key="Authorization"/>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> NOTIFY CCD Payload @@@@"
-import com.att.bpm.scripts.*
-def notifyCCDSuccess = new CompleteMsoProcess()
-return notifyCCDSuccess.notifyCCDSuccessPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CCDResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="CCDStatusCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ServiceTask_1" targetRef="ScriptTask_1"/>
- <bpmn2:serviceTask id="NotifyOMXSuccessFailureViaCSI" name="Notify OMX Success Failure Via CSI">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_csi_networkstatus_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[import com.att.bpm.scripts.*
-def notifyOMXSuccessFailureViaCSI = new CompleteMsoProcess()
-return notifyOMXSuccessFailureViaCSI.notifyOMXSuccessFailureViaCSIPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="CMSO_notifyOMXSuccessFailureViaCSIResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="CMSO_notifyOMXSuccessFailureViaCSIResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- <camunda:properties>
- <camunda:property/>
- </camunda:properties>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_65</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_65" name="" sourceRef="NotifyOMXSuccessFailureViaCSI" targetRef="setdeliverysuccessstatustofalse"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_11" name="OMX Source?" default="SequenceFlow_16">
- <bpmn2:incoming>SequenceFlow_73</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="Yes" sourceRef="ExclusiveGateway_11" targetRef="NotifyOMXSuccessFailureViaCSI">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_source").equals("OMX")}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_16" name="No" sourceRef="ExclusiveGateway_11" targetRef="ServiceTask_1"/>
- <bpmn2:scriptTask id="setdeliverysuccessstatustofalse" name="Set Delivery Status Variable" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_65</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_92</bpmn2:outgoing>
- <bpmn2:script><![CDATA[if(execution.getVariable("CMSO_notifyOMXSuccessFailureViaCSIResponseCode")==200){
- execution.setVariable("CMSO_deliveryStatus", true)
-}
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_92" name="" sourceRef="setdeliverysuccessstatustofalse" targetRef="ExclusiveGateway_17"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_3" name="" attachedToRef="UpdateFinalNotifyAckStatus">
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_80" errorRef="Error_1"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="BoundaryEvent_3" targetRef="EndEvent_2"/>
- <bpmn2:serviceTask id="UpdateFinalNotifyAckStatus" name="Update Final Notify Ack Status">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> UpdateFinalNotifyAckStatus"
-import com.att.bpm.scripts.*
-def updateFinalNotifyAckStatus= new CompleteMsoProcess()
-return updateFinalNotifyAckStatus.updateFinalNotifyAckStatusPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_87</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_60</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_60" name="" sourceRef="UpdateFinalNotifyAckStatus" targetRef="ExclusiveGateway_16"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_13">
- <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ParallelGateway_7">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="ParallelGateway_7" targetRef="ParallelGateway_6"/>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_5" errorRef="Error_3"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="ScriptTask_3" name="Prepare&#xD;&#xA;Update DB Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_72</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def completeMsoProcess = new CompleteMsoProcess()
-completeMsoProcess.setUpdateDBstatustoSuccessPayload(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_3" targetRef="updateInfraRequest"/>
- <bpmn2:endEvent id="EndEvent_5">
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_3"/>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Active Request?" default="SequenceFlow_72">
- <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_72</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_81</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_72" name="No" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_3"/>
- <bpmn2:sequenceFlow id="SequenceFlow_81" name="Yes" sourceRef="ExclusiveGateway_3" targetRef="prepareUpdateRequest">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_request_id-Ok") ==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="BuildErrorMessage1" name="Build Error Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
-import com.att.bpm.scripts.*
-def buildDataErrorMessage = new CompleteMsoProcess()
-buildDataErrorMessage.buildDataError(execution, "Complete --Update DB status to SUCCESS-- Failed")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="BuildErrorMessage1" targetRef="EndEvent_5"/>
- <bpmn2:scriptTask id="prepareUpdateRequest" name="Prepare&#xD;&#xA;Update DB Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_81</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_49</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def completeMsoProcess = new CompleteMsoProcess()
-completeMsoProcess.updateDBStatusToSuccessPayload(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_49" name="" sourceRef="prepareUpdateRequest" targetRef="updateDBStatus"/>
- <bpmn2:serviceTask id="updateInfraRequest" name="Update DB status to SUCCESS">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CMSO_setUpdateDBstatustoSuccessPayload")}]]></camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="updateInfraRequest" targetRef="ExclusiveGateway_7"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_6" name="" attachedToRef="updateDBStatus">
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_83" errorRef="Error_1"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="BoundaryEvent_6" targetRef="EndEvent_12"/>
- <bpmn2:scriptTask id="BuildErrorMessage" name="Build Error Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
-//println "CMSO_updateRequestResponse IS --> " + execution.getVariable("CMSO_updateRequestResponse")
-import com.att.bpm.scripts.*
-def buildDataErrorMessage = new CompleteMsoProcess()
-buildDataErrorMessage.buildDataError(execution, "Complete MSO -- Update DB status to SUCCESS -- Failed")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="BuildErrorMessage" targetRef="EndEvent_4"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_10" default="SequenceFlow_25">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ExclusiveGateway_10" targetRef="ParallelGateway_7">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ExclusiveGateway_10" targetRef="BuildErrorMessage1"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_7" default="SequenceFlow_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ExclusiveGateway_7" targetRef="ParallelGateway_7">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ExclusiveGateway_7" targetRef="BuildErrorMessage"/>
- <bpmn2:serviceTask id="updateDBStatus" name="Update DB status to SUCCESS">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CMSO_updateDBStatusToSuccessPayload")}]]></camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_49</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="updateDBStatus" targetRef="ExclusiveGateway_10"/>
- <bpmn2:endEvent id="EndEvent_12">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:boundaryEvent id="BoundaryEvent_7" name="" attachedToRef="updateInfraRequest">
- <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_1"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="BoundaryEvent_7" targetRef="EndEvent_13"/>
- <bpmn2:exclusiveGateway id="ParallelGateway_5">
- <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_54</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ParallelGateway_5" targetRef="ParallelGateway_6"/>
- <bpmn2:parallelGateway id="ParallelGateway_6">
- <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="ParallelGateway_6" targetRef="Done"/>
- <bpmn2:scriptTask id="Done" name="Prepare Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
- <bpmn2:script><![CDATA[println "INSIDE --> Complete MSO Process Done SUCCESSFULLY"
-import com.att.bpm.scripts.*
-def postProcessResponseData = new CompleteMsoProcess()
-postProcessResponseData.postProcessResponse(execution)
-println "CompleteMsoProcess Response -->" + "\n" + execution.getVariable("CompletionHandlerResponse")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="Done" targetRef="EndEvent_1"/>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>
- </bpmn2:endEvent>
- </bpmn2:process>
- <bpmn2:message id="Message_2" name="CompleteMsoProcessRequest"/>
- <bpmn2:error id="Error_3" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="Java Lang Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CompleteMsoProcess">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_41" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="156.0" y="827.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="126.0" x="144.0" y="868.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_55" bpmnElement="ExclusiveGateway_1">
- <dc:Bounds height="50.0" width="50.0" x="662.0" y="506.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="687.0" y="561.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_81" bpmnElement="NotifyOMXSuccessFailureViaCSI">
- <dc:Bounds height="80.0" width="100.0" x="820.0" y="253.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_82" bpmnElement="UpdateFinalNotifyAckStatus">
- <dc:Bounds height="80.0" width="100.0" x="820.0" y="577.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_4" bpmnElement="ParallelGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="576.0" y="643.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="146.0" x="616.0" y="676.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="if_notifcationURLExists" sourceElement="_BPMNShape_ParallelGateway_4" targetElement="_BPMNShape_ExclusiveGateway_55">
- <di:waypoint xsi:type="dc:Point" x="601.0" y="643.0"/>
- <di:waypoint xsi:type="dc:Point" x="601.0" y="531.0"/>
- <di:waypoint xsi:type="dc:Point" x="662.0" y="531.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="601.0" y="573.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="updateFinalNotifyAckStatus">
- <dc:Bounds height="80.0" width="100.0" x="1425.0" y="492.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_6" bpmnElement="ParallelGateway_5" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1656.0" y="643.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1681.0" y="698.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_59" bpmnElement="ExclusiveGateway_5">
- <dc:Bounds height="50.0" width="50.0" x="470.0" y="819.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="495.0" y="874.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_7" bpmnElement="ParallelGateway_6">
- <dc:Bounds height="50.0" width="50.0" x="1769.0" y="819.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1794.0" y="874.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ParallelGateway_6" targetElement="_BPMNShape_ParallelGateway_7">
- <di:waypoint xsi:type="dc:Point" x="1706.0" y="668.0"/>
- <di:waypoint xsi:type="dc:Point" x="1794.0" y="668.0"/>
- <di:waypoint xsi:type="dc:Point" x="1794.0" y="819.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1791.0" y="617.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_34" bpmnElement="preProcessRequest">
- <dc:Bounds height="80.0" width="100.0" x="324.0" y="805.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_34" targetElement="_BPMNShape_ExclusiveGateway_59">
- <di:waypoint xsi:type="dc:Point" x="424.0" y="845.0"/>
- <di:waypoint xsi:type="dc:Point" x="470.0" y="844.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="433.0" y="845.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_41" targetElement="_BPMNShape_ScriptTask_34">
- <di:waypoint xsi:type="dc:Point" x="192.0" y="845.0"/>
- <di:waypoint xsi:type="dc:Point" x="324.0" y="845.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="221.0" y="845.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_60" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="734.0" y="1068.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="100.0" x="782.0" y="1083.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_9" bpmnElement="ParallelGateway_7" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1214.0" y="1068.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1239.0" y="1123.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ParallelGateway_9" targetElement="_BPMNShape_ParallelGateway_7">
- <di:waypoint xsi:type="dc:Point" x="1264.0" y="1093.0"/>
- <di:waypoint xsi:type="dc:Point" x="1794.0" y="1093.0"/>
- <di:waypoint xsi:type="dc:Point" x="1794.0" y="869.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1688.0" y="1149.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ParallelGateway_4" targetElement="_BPMNShape_ParallelGateway_6">
- <di:waypoint xsi:type="dc:Point" x="601.0" y="693.0"/>
- <di:waypoint xsi:type="dc:Point" x="601.0" y="813.0"/>
- <di:waypoint xsi:type="dc:Point" x="1187.0" y="813.0"/>
- <di:waypoint xsi:type="dc:Point" x="1681.0" y="813.0"/>
- <di:waypoint xsi:type="dc:Point" x="1681.0" y="693.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="604.0" y="737.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_51" bpmnElement="updateInfraRequest">
- <dc:Bounds height="80.0" width="100.0" x="973.0" y="1144.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_52" bpmnElement="updateDBStatus">
- <dc:Bounds height="80.0" width="100.0" x="970.0" y="963.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_47" bpmnElement="SequenceFlow_45" sourceElement="_BPMNShape_ExclusiveGateway_59" targetElement="_BPMNShape_ParallelGateway_4">
- <di:waypoint xsi:type="dc:Point" x="495.0" y="819.0"/>
- <di:waypoint xsi:type="dc:Point" x="495.0" y="668.0"/>
- <di:waypoint xsi:type="dc:Point" x="576.0" y="668.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="492.0" y="973.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_64" bpmnElement="prepareUpdateRequest">
- <dc:Bounds height="80.0" width="100.0" x="822.0" y="963.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_48" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ExclusiveGateway_59" targetElement="_BPMNShape_ExclusiveGateway_60">
- <di:waypoint xsi:type="dc:Point" x="495.0" y="869.0"/>
- <di:waypoint xsi:type="dc:Point" x="495.0" y="1093.0"/>
- <di:waypoint xsi:type="dc:Point" x="734.0" y="1093.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="492.0" y="990.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_50" bpmnElement="SequenceFlow_49" sourceElement="_BPMNShape_ScriptTask_64" targetElement="_BPMNShape_ScriptTask_52">
- <di:waypoint xsi:type="dc:Point" x="922.0" y="1003.0"/>
- <di:waypoint xsi:type="dc:Point" x="970.0" y="1003.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="937.0" y="1003.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_73" bpmnElement="setdeliverysuccessstatustofalse">
- <dc:Bounds height="80.0" width="100.0" x="959.0" y="253.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_11" bpmnElement="ParallelGateway_9">
- <dc:Bounds height="50.0" width="50.0" x="1200.0" y="506.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1225.0" y="561.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_71" bpmnElement="SequenceFlow_70" sourceElement="_BPMNShape_ParallelGateway_11" targetElement="_BPMNShape_ScriptTask_326">
- <di:waypoint xsi:type="dc:Point" x="1250.0" y="531.0"/>
- <di:waypoint xsi:type="dc:Point" x="1284.0" y="532.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1109.0" y="531.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_73" bpmnElement="SequenceFlow_72" sourceElement="_BPMNShape_ExclusiveGateway_60" targetElement="_BPMNShape_ScriptTask_88">
- <di:waypoint xsi:type="dc:Point" x="759.0" y="1118.0"/>
- <di:waypoint xsi:type="dc:Point" x="759.0" y="1184.0"/>
- <di:waypoint xsi:type="dc:Point" x="822.0" y="1184.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="761.0" y="1141.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_82" bpmnElement="SequenceFlow_81" sourceElement="_BPMNShape_ExclusiveGateway_60" targetElement="_BPMNShape_ScriptTask_64">
- <di:waypoint xsi:type="dc:Point" x="759.0" y="1068.0"/>
- <di:waypoint xsi:type="dc:Point" x="759.0" y="1003.0"/>
- <di:waypoint xsi:type="dc:Point" x="822.0" y="1003.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="758.0" y="1022.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_87" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_ServiceTask_82">
- <di:waypoint xsi:type="dc:Point" x="687.0" y="556.0"/>
- <di:waypoint xsi:type="dc:Point" x="687.0" y="617.0"/>
- <di:waypoint xsi:type="dc:Point" x="820.0" y="617.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="686.0" y="573.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_13" bpmnElement="subProcessExceptionCompleteMSO" isExpanded="true">
- <dc:Bounds height="169.0" width="427.0" x="264.0" y="1388.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_110" bpmnElement="endEventExceptionCompleteMSO">
- <dc:Bounds height="36.0" width="36.0" x="564.0" y="1455.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="582.0" y="1496.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_51" bpmnElement="startEventExceptionCompleteMSO">
- <dc:Bounds height="36.0" width="36.0" x="360.0" y="1455.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="378.0" y="1496.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_63" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1132.0" y="1158.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1157.0" y="1213.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_51" targetElement="_BPMNShape_ExclusiveGateway_63">
- <di:waypoint xsi:type="dc:Point" x="1073.0" y="1184.0"/>
- <di:waypoint xsi:type="dc:Point" x="1132.0" y="1183.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1255.0" y="1227.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_63" targetElement="_BPMNShape_ParallelGateway_9">
- <di:waypoint xsi:type="dc:Point" x="1182.0" y="1183.0"/>
- <di:waypoint xsi:type="dc:Point" x="1239.0" y="1183.0"/>
- <di:waypoint xsi:type="dc:Point" x="1239.0" y="1118.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1158.0" y="1141.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_111" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1269.0" y="1271.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1287.0" y="1312.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_76" bpmnElement="BuildErrorMessage">
- <dc:Bounds height="80.0" width="100.0" x="1108.0" y="1249.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ExclusiveGateway_63" targetElement="_BPMNShape_ScriptTask_76">
- <di:waypoint xsi:type="dc:Point" x="1157.0" y="1208.0"/>
- <di:waypoint xsi:type="dc:Point" x="1158.0" y="1249.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1199.0" y="1035.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_76" targetElement="_BPMNShape_EndEvent_111">
- <di:waypoint xsi:type="dc:Point" x="1208.0" y="1289.0"/>
- <di:waypoint xsi:type="dc:Point" x="1269.0" y="1289.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1236.0" y="1289.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_77" bpmnElement="Done">
- <dc:Bounds height="80.0" width="100.0" x="1860.0" y="805.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_66" bpmnElement="ExclusiveGateway_10" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1132.0" y="977.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1157.0" y="1032.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_52" targetElement="_BPMNShape_ExclusiveGateway_66">
- <di:waypoint xsi:type="dc:Point" x="1070.0" y="1003.0"/>
- <di:waypoint xsi:type="dc:Point" x="1132.0" y="1002.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1261.0" y="1003.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_66" targetElement="_BPMNShape_ParallelGateway_9">
- <di:waypoint xsi:type="dc:Point" x="1182.0" y="1002.0"/>
- <di:waypoint xsi:type="dc:Point" x="1239.0" y="1002.0"/>
- <di:waypoint xsi:type="dc:Point" x="1239.0" y="1068.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1348.0" y="1003.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="BuildErrorMessage1">
- <dc:Bounds height="80.0" width="100.0" x="1108.0" y="856.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ExclusiveGateway_66" targetElement="_BPMNShape_ScriptTask_79">
- <di:waypoint xsi:type="dc:Point" x="1157.0" y="977.0"/>
- <di:waypoint xsi:type="dc:Point" x="1158.0" y="936.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1242.0" y="957.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_113" bpmnElement="EndEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="1269.0" y="878.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1287.0" y="919.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ParallelGateway_7" targetElement="_BPMNShape_ScriptTask_77">
- <di:waypoint xsi:type="dc:Point" x="1819.0" y="844.0"/>
- <di:waypoint xsi:type="dc:Point" x="1860.0" y="845.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1806.0" y="845.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_71" bpmnElement="ExclusiveGateway_15" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1571.0" y="506.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1596.0" y="561.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ExclusiveGateway_71">
- <di:waypoint xsi:type="dc:Point" x="1525.0" y="532.0"/>
- <di:waypoint xsi:type="dc:Point" x="1571.0" y="531.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1544.0" y="532.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_54" sourceElement="_BPMNShape_ExclusiveGateway_71" targetElement="_BPMNShape_ParallelGateway_6">
- <di:waypoint xsi:type="dc:Point" x="1621.0" y="531.0"/>
- <di:waypoint xsi:type="dc:Point" x="1681.0" y="531.0"/>
- <di:waypoint xsi:type="dc:Point" x="1681.0" y="643.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1463.0" y="531.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="ScriptTask_6">
- <dc:Bounds height="80.0" width="100.0" x="1546.0" y="381.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_59" bpmnElement="SequenceFlow_58" sourceElement="_BPMNShape_ExclusiveGateway_71" targetElement="_BPMNShape_ScriptTask_83">
- <di:waypoint xsi:type="dc:Point" x="1596.0" y="506.0"/>
- <di:waypoint xsi:type="dc:Point" x="1596.0" y="461.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1574.0" y="484.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="EndEvent_10">
- <dc:Bounds height="36.0" width="36.0" x="1684.0" y="403.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1702.0" y="444.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_EndEvent_118">
- <di:waypoint xsi:type="dc:Point" x="1646.0" y="421.0"/>
- <di:waypoint xsi:type="dc:Point" x="1684.0" y="421.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1476.0" y="421.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_72" bpmnElement="ExclusiveGateway_16" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="967.0" y="591.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="992.0" y="646.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_61" bpmnElement="SequenceFlow_60" sourceElement="_BPMNShape_ServiceTask_82" targetElement="_BPMNShape_ExclusiveGateway_72">
- <di:waypoint xsi:type="dc:Point" x="920.0" y="617.0"/>
- <di:waypoint xsi:type="dc:Point" x="967.0" y="616.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="937.0" y="617.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_84" bpmnElement="ScriptTask_7">
- <dc:Bounds height="80.0" width="100.0" x="943.0" y="681.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_62" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_ScriptTask_84">
- <di:waypoint xsi:type="dc:Point" x="992.0" y="641.0"/>
- <di:waypoint xsi:type="dc:Point" x="992.0" y="666.0"/>
- <di:waypoint xsi:type="dc:Point" x="993.0" y="666.0"/>
- <di:waypoint xsi:type="dc:Point" x="993.0" y="681.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1006.0" y="638.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_119" bpmnElement="EndEvent_11">
- <dc:Bounds height="36.0" width="36.0" x="1081.0" y="703.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1099.0" y="744.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_63" bpmnElement="SequenceFlow_62" sourceElement="_BPMNShape_ScriptTask_84" targetElement="_BPMNShape_EndEvent_119">
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="721.0"/>
- <di:waypoint xsi:type="dc:Point" x="1081.0" y="721.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="990.0" y="704.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_64" bpmnElement="SequenceFlow_63" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_ParallelGateway_11">
- <di:waypoint xsi:type="dc:Point" x="1017.0" y="616.0"/>
- <di:waypoint xsi:type="dc:Point" x="1225.0" y="616.0"/>
- <di:waypoint xsi:type="dc:Point" x="1225.0" y="556.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="963.0" y="617.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_66" bpmnElement="SequenceFlow_65" sourceElement="_BPMNShape_ServiceTask_81" targetElement="_BPMNShape_ScriptTask_73">
- <di:waypoint xsi:type="dc:Point" x="920.0" y="293.0"/>
- <di:waypoint xsi:type="dc:Point" x="959.0" y="293.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="941.0" y="343.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_74" bpmnElement="SequenceFlow_73" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_ExclusiveGateway_85">
- <di:waypoint xsi:type="dc:Point" x="687.0" y="506.0"/>
- <di:waypoint xsi:type="dc:Point" x="687.0" y="397.0"/>
- <di:waypoint xsi:type="dc:Point" x="742.0" y="397.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="765.0" y="515.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="SequenceFlow_92" sourceElement="_BPMNShape_ScriptTask_73" targetElement="_BPMNShape_ExclusiveGateway_86">
- <di:waypoint xsi:type="dc:Point" x="1059.0" y="293.0"/>
- <di:waypoint xsi:type="dc:Point" x="1132.0" y="293.0"/>
- <di:waypoint xsi:type="dc:Point" x="1132.0" y="372.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1137.0" y="346.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_EndEvent_113">
- <di:waypoint xsi:type="dc:Point" x="1208.0" y="896.0"/>
- <di:waypoint xsi:type="dc:Point" x="1269.0" y="896.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1225.0" y="896.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_85" bpmnElement="ExclusiveGateway_11" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="742.0" y="372.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="86.0" x="789.0" y="394.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ExclusiveGateway_85" targetElement="_BPMNShape_ServiceTask_81">
- <di:waypoint xsi:type="dc:Point" x="767.0" y="372.0"/>
- <di:waypoint xsi:type="dc:Point" x="768.0" y="293.0"/>
- <di:waypoint xsi:type="dc:Point" x="820.0" y="293.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="771.0" y="335.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_17" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1107.0" y="372.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1132.0" y="427.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ParallelGateway_11">
- <di:waypoint xsi:type="dc:Point" x="1157.0" y="397.0"/>
- <di:waypoint xsi:type="dc:Point" x="1225.0" y="397.0"/>
- <di:waypoint xsi:type="dc:Point" x="1225.0" y="506.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1210.0" y="475.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_85" targetElement="_BPMNShape_ServiceTask_94">
- <di:waypoint xsi:type="dc:Point" x="767.0" y="422.0"/>
- <di:waypoint xsi:type="dc:Point" x="768.0" y="487.0"/>
- <di:waypoint xsi:type="dc:Point" x="820.0" y="487.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="774.0" y="443.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_94" bpmnElement="ServiceTask_1">
- <dc:Bounds height="80.0" width="100.0" x="820.0" y="447.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ServiceTask_94" targetElement="_BPMNShape_ScriptTask_86">
- <di:waypoint xsi:type="dc:Point" x="920.0" y="487.0"/>
- <di:waypoint xsi:type="dc:Point" x="959.0" y="487.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="933.0" y="487.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_86" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="959.0" y="447.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_86" targetElement="_BPMNShape_ExclusiveGateway_86">
- <di:waypoint xsi:type="dc:Point" x="1059.0" y="487.0"/>
- <di:waypoint xsi:type="dc:Point" x="1132.0" y="487.0"/>
- <di:waypoint xsi:type="dc:Point" x="1132.0" y="422.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1072.0" y="507.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_128" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="2077.0" y="827.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="2095.0" y="868.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_77" targetElement="_BPMNShape_EndEvent_128">
- <di:waypoint xsi:type="dc:Point" x="1960.0" y="845.0"/>
- <di:waypoint xsi:type="dc:Point" x="2077.0" y="845.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1982.0" y="845.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_23" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1458.0" y="474.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1473.0" y="515.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_25" bpmnElement="BoundaryEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="851.0" y="639.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="866.0" y="680.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_28" bpmnElement="BoundaryEvent_6">
- <dc:Bounds height="36.0" width="36.0" x="1001.0" y="945.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1016.0" y="986.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="BoundaryEvent_7">
- <dc:Bounds height="36.0" width="36.0" x="1002.0" y="1206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1292.0" y="1088.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="851.0" y="708.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="869.0" y="749.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_BoundaryEvent_25" targetElement="_BPMNShape_EndEvent_215">
- <di:waypoint xsi:type="dc:Point" x="869.0" y="675.0"/>
- <di:waypoint xsi:type="dc:Point" x="869.0" y="708.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="866.0" y="684.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_218" bpmnElement="EndEvent_12">
- <dc:Bounds height="36.0" width="36.0" x="1001.0" y="864.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1019.0" y="905.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_BoundaryEvent_28" targetElement="_BPMNShape_EndEvent_218">
- <di:waypoint xsi:type="dc:Point" x="1019.0" y="945.0"/>
- <di:waypoint xsi:type="dc:Point" x="1019.0" y="900.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1180.0" y="927.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_13">
- <dc:Bounds height="36.0" width="36.0" x="1002.0" y="1292.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1020.0" y="1333.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_EndEvent_219">
- <di:waypoint xsi:type="dc:Point" x="1020.0" y="1242.0"/>
- <di:waypoint xsi:type="dc:Point" x="1020.0" y="1292.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="847.0" y="747.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_14">
- <dc:Bounds height="36.0" width="36.0" x="1458.0" y="395.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1476.0" y="436.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_46" bpmnElement="SequenceFlow_44" sourceElement="_BPMNShape_BoundaryEvent_23" targetElement="_BPMNShape_EndEvent_220">
- <di:waypoint xsi:type="dc:Point" x="1476.0" y="474.0"/>
- <di:waypoint xsi:type="dc:Point" x="1476.0" y="431.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1369.0" y="474.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_88" bpmnElement="ScriptTask_3">
- <dc:Bounds height="80.0" width="100.0" x="822.0" y="1144.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_88" targetElement="_BPMNShape_ScriptTask_51">
- <di:waypoint xsi:type="dc:Point" x="922.0" y="1184.0"/>
- <di:waypoint xsi:type="dc:Point" x="973.0" y="1184.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="939.0" y="1208.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_326" bpmnElement="prepareUpdateFinalAckStatus">
- <dc:Bounds height="80.0" width="100.0" x="1284.0" y="492.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_326" targetElement="_BPMNShape_ServiceTask_86">
- <di:waypoint xsi:type="dc:Point" x="1384.0" y="532.0"/>
- <di:waypoint xsi:type="dc:Point" x="1425.0" y="532.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1366.0" y="532.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_StartEvent_51" targetElement="_BPMNShape_EndEvent_110">
- <di:waypoint xsi:type="dc:Point" x="396.0" y="1473.0"/>
- <di:waypoint xsi:type="dc:Point" x="564.0" y="1473.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="519.0" y="1473.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
deleted file mode 100644
index 46b4e1fc02..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
+++ /dev/null
@@ -1,830 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_pNTO8MRhEeWv36YLr7PC3Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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" language="groovy"><![CDATA[import com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-return doCreateVfModule.isVolumeGroupNamePresent(execution)]]></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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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 com.att.bpm.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_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-doCreateVfModule.preProcessSDNCGetRequest(execution)]]></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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_22" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="PreProcessSDNCGetRequest"/>
- <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 com.att.bpm.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_26</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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 com.att.bpm.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.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_28</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="ExclusiveGateway_5" targetRef="PrepareCreateAAIVfModuleVolumeGroupRequest">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <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_26</bpmn2:outgoing>
- <bpmn2:linkEventDefinition id="_LinkEventDefinition_30" name="UpdateAndActivate"/>
- </bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="IntermediateCatchEvent_3" targetRef="PreProcessUpdateAAIVfModule_1"/>
- <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 com.att.bpm.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 com.att.bpm.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_34</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-doCreateVfModule.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="To UpdateAndActivate">
- <bpmn2:incoming>SequenceFlow_34</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:sequenceFlow id="SequenceFlow_34" name="" sourceRef="PostProcessVNFAdapterRequest" targetRef="IntermediateThrowEvent_2"/>
- <bpmn2:callActivity id="CreateAAIVfModule" name="CreateAAIVfModule" calledElement="CreateAAIVfModule">
- <bpmn2:extensionElements>
- <camunda:in source="CreateAAIVfModuleRequest" target="CreateAAIVfModuleRequest"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="isVidRequest" target="isVidRequest"/>
- <camunda:in source="newVfModuleId" target="newVfModuleId"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:out source="CreateAAIVfModuleResponse" target="DCVFM_createVfModuleResponse"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_3" name="To Provision">
- <bpmn2:incoming>SequenceFlow_41</bpmn2:incoming>
- <bpmn2:linkEventDefinition id="_LinkEventDefinition_28" name="Provision"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_41</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 com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-doCreateVfModule.postProcessCreateAAIVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="CreateAAIVfModule" targetRef="PostProcessCreateAAIVfModule"/>
- <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 com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-doCreateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_2"/>
- <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="ExclusiveGateway_2" targetRef="IntermediateThrowEvent_3"/>
- <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 com.att.bpm.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 com.att.bpm.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" language="groovy"><![CDATA[import com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="QueryCloudRegion" targetRef="ConfirmVolumeGroupTenant"/>
- <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="ScriptTask_1" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-doCreateVfModule.processBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_2"/>
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_1"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <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 com.att.bpm.scripts.*
-def doCreateVfModule = new DoCreateVfModule()
-doCreateVfModule.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="PreProcessRequest" targetRef="IntermediateThrowEvent_1"/>
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To DoCreateVfModule">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:linkEventDefinition id="_LinkEventDefinition_25" name="DoCreateVfModule"/>
- </bpmn2:intermediateThrowEvent>
- </bpmn2:process>
- <bpmn2:message id="Message_1" name="DoCreateVfModuleRequest"/>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModule">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="41.0" y="231.0"/>
- </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.0" y="249.0"/>
- <di:waypoint xsi:type="dc:Point" x="150.0" y="249.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="99.0" y="249.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
- <dc:Bounds height="80.0" width="100.0" x="150.0" y="209.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="CreateAAIVfModule">
- <dc:Bounds height="92.0" width="121.0" x="696.0" y="348.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_24" bpmnElement="IntermediateCatchEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="36.0" y="376.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="114.0" x="0.0" y="417.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_22" bpmnElement="IntermediateThrowEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="338.0" y="231.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="132.0" x="290.0" y="272.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="CallSDNCAdapterVDModuleTopologyAssign">
- <dc:Bounds height="94.0" width="121.0" x="266.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="CallSDNCAdapterVFModuleTopologyGET">
- <dc:Bounds height="97.0" width="133.0" x="744.0" y="670.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="IsVolumeGroupIdSpecified" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="144.0" y="368.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="178.0" x="89.0" y="347.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ConfirmVolumeGroupTenant">
- <dc:Bounds height="89.0" width="118.0" x="209.0" y="528.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_91" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="559.0" y="368.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="584.0" y="423.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.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="559.0" y="393.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="209.0" y="393.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="CallVNFAdapterVFModuleCreate">
- <dc:Bounds height="97.0" width="121.0" x="1236.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="UpdateAAIVfModule_1">
- <dc:Bounds height="97.0" width="117.0" x="268.0" y="816.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="CallSDNCAdapterVFModuleTopologyActivate">
- <dc:Bounds height="99.0" width="119.0" x="590.0" y="814.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_92" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="935.0" y="839.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="178.0" x="886.0" y="811.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="CreateAAIVfModuleVolumeGroup">
- <dc:Bounds height="112.0" width="121.0" x="1193.0" y="972.0"/>
- </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="960.0" y="889.0"/>
- <di:waypoint xsi:type="dc:Point" x="960.0" y="1028.0"/>
- <di:waypoint xsi:type="dc:Point" x="1020.0" y="1028.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="947.0" y="914.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_93" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1318.0" y="840.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1343.0" y="895.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="1313.0" y="1028.0"/>
- <di:waypoint xsi:type="dc:Point" x="1343.0" y="1028.0"/>
- <di:waypoint xsi:type="dc:Point" x="1343.0" y="930.0"/>
- <di:waypoint xsi:type="dc:Point" x="1343.0" y="890.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1336.0" y="1028.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="985.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="1151.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="1151.0" y="865.0"/>
- <di:waypoint xsi:type="dc:Point" x="1318.0" y="865.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="1015.0" y="864.0"/>
- </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.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="120.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="120.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="144.0" y="393.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="117.0" y="394.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_101" bpmnElement="IsVolumeGroupNameSpecified" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="360.0" y="547.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="200.0" x="309.0" y="496.0"/>
- </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.0" y="572.0"/>
- <di:waypoint xsi:type="dc:Point" x="360.0" y="572.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="338.0" y="572.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_Task_3" bpmnElement="ConfirmVolumeName">
- <dc:Bounds height="89.0" width="109.0" x="453.0" y="528.0"/>
- </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.0" y="572.0"/>
- <di:waypoint xsi:type="dc:Point" x="453.0" y="572.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="410.0" y="576.0"/>
- </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.0" y="547.0"/>
- <di:waypoint xsi:type="dc:Point" x="385.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="559.0" y="393.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="392.0" y="450.0"/>
- </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.0" y="572.0"/>
- <di:waypoint xsi:type="dc:Point" x="584.0" y="572.0"/>
- <di:waypoint xsi:type="dc:Point" x="584.0" y="418.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="581.0" y="492.0"/>
- </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="250.0" y="249.0"/>
- <di:waypoint xsi:type="dc:Point" x="338.0" y="249.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="287.0" y="249.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.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="628.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="628.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="696.0" y="394.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="633.0" y="394.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="PreProcessSDNCAssignRequest">
- <dc:Bounds height="94.0" width="121.0" x="109.0" y="674.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="PostProcessSDNCAssignRequest">
- <dc:Bounds height="94.0" width="121.0" x="435.0" y="674.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_44" bpmnElement="IntermediateThrowEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="1537.0" y="374.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="76.0" x="1517.0" y="415.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_29" bpmnElement="IntermediateCatchEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="24.0" y="706.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="58.0" x="13.0" y="747.0"/>
- </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.0" y="724.0"/>
- <di:waypoint xsi:type="dc:Point" x="81.0" y="724.0"/>
- <di:waypoint xsi:type="dc:Point" x="81.0" y="721.0"/>
- <di:waypoint xsi:type="dc:Point" x="109.0" y="721.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="78.0" y="722.0"/>
- </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.0" y="721.0"/>
- <di:waypoint xsi:type="dc:Point" x="248.0" y="721.0"/>
- <di:waypoint xsi:type="dc:Point" x="248.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="266.0" y="719.0"/>
- </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.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="411.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="411.0" y="721.0"/>
- <di:waypoint xsi:type="dc:Point" x="435.0" y="721.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_213" bpmnElement="PreProcessSDNCGetRequest">
- <dc:Bounds height="94.0" width="121.0" x="588.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_214" bpmnElement="PostProcessSDNCGetRequest">
- <dc:Bounds height="94.0" width="121.0" x="924.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_ScriptTask_213">
- <di:waypoint xsi:type="dc:Point" x="555.0" y="721.0"/>
- <di:waypoint xsi:type="dc:Point" x="572.0" y="721.0"/>
- <di:waypoint xsi:type="dc:Point" x="572.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="588.0" y="719.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_213" targetElement="_BPMNShape_ScriptTask_158">
- <di:waypoint xsi:type="dc:Point" x="708.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="726.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="726.0" y="718.0"/>
- <di:waypoint xsi:type="dc:Point" x="744.0" y="718.0"/>
- </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="876.0" y="718.0"/>
- <di:waypoint xsi:type="dc:Point" x="899.0" y="718.0"/>
- <di:waypoint xsi:type="dc:Point" x="899.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="924.0" y="719.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="897.0" y="719.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="PreProcessUpdateAAIVfModule_1">
- <dc:Bounds height="97.0" width="118.0" x="109.0" y="816.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_Task_33" bpmnElement="PreProcessSDNCActivateRequest">
- <dc:Bounds height="98.0" width="118.0" x="435.0" y="815.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_Task_4" bpmnElement="PostProcessSDNCActivateRequest">
- <dc:Bounds height="95.0" width="121.0" x="752.0" y="816.0"/>
- </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="227.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="268.0" y="864.0"/>
- </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="384.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="435.0" y="864.0"/>
- </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="553.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="571.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="571.0" y="863.0"/>
- <di:waypoint xsi:type="dc:Point" x="590.0" y="863.0"/>
- </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="708.0" y="863.0"/>
- <di:waypoint xsi:type="dc:Point" x="752.0" y="863.0"/>
- </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="872.0" y="863.0"/>
- <di:waypoint xsi:type="dc:Point" x="904.0" y="863.0"/>
- <di:waypoint xsi:type="dc:Point" x="904.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="935.0" y="864.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_175" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1620.0" y="846.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1638.0" y="887.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="1368.0" y="865.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="865.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="863.0"/>
- <di:waypoint xsi:type="dc:Point" x="1433.0" y="863.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1378.0" y="865.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_45" bpmnElement="IntermediateThrowEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1596.0" y="702.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="134.0" x="1547.0" y="743.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_30" bpmnElement="IntermediateCatchEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="24.0" y="846.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="116.0" x="0.0" y="887.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_IntermediateCatchEvent_30" targetElement="_BPMNShape_Task_2">
- <di:waypoint xsi:type="dc:Point" x="60.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="109.0" y="864.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="86.0" y="864.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_Task_7" bpmnElement="PrepareCreateAAIVfModuleVolumeGroupRequest">
- <dc:Bounds height="112.0" width="121.0" x="1020.0" y="972.0"/>
- </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="1140.0" y="1028.0"/>
- <di:waypoint xsi:type="dc:Point" x="1193.0" y="1028.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_Task_25" bpmnElement="PreProcessVNFAdapterRequest">
- <dc:Bounds height="96.0" width="121.0" x="1073.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_Task_35" bpmnElement="PostProcessVNFAdapterRequest">
- <dc:Bounds height="92.0" width="116.0" x="1397.0" y="674.0"/>
- </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="1044.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="1059.0" y="719.0"/>
- <di:waypoint xsi:type="dc:Point" x="1059.0" y="720.0"/>
- <di:waypoint xsi:type="dc:Point" x="1073.0" y="720.0"/>
- </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="1193.0" y="720.0"/>
- <di:waypoint xsi:type="dc:Point" x="1236.0" y="720.0"/>
- </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="1356.0" y="720.0"/>
- <di:waypoint xsi:type="dc:Point" x="1397.0" y="720.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_Task_35" targetElement="_BPMNShape_IntermediateThrowEvent_45">
- <di:waypoint xsi:type="dc:Point" x="1513.0" y="720.0"/>
- <di:waypoint xsi:type="dc:Point" x="1596.0" y="720.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="QueryAAIVfModule">
- <dc:Bounds height="92.0" width="125.0" x="1224.0" y="516.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_211" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1128.0" y="368.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="124.0" x="1092.0" y="336.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_212" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1408.0" y="368.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1433.0" y="423.0"/>
- </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.0" y="418.0"/>
- <di:waypoint xsi:type="dc:Point" x="1153.0" y="562.0"/>
- <di:waypoint xsi:type="dc:Point" x="1224.0" y="562.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="1122.0" y="450.0"/>
- </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.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="1408.0" y="393.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="1285.0" y="393.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_216" bpmnElement="PostProcessCreateAAIVfModule">
- <dc:Bounds height="92.0" width="125.0" x="897.0" y="348.0"/>
- </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.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="897.0" y="394.0"/>
- </bpmndi:BPMNEdge>
- <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.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="1075.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="1075.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="1128.0" y="393.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1072.0" y="394.0"/>
- </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.0" y="562.0"/>
- <di:waypoint xsi:type="dc:Point" x="1378.0" y="562.0"/>
- <di:waypoint xsi:type="dc:Point" x="1378.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="1408.0" y="393.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ExclusiveGateway_212" targetElement="_BPMNShape_IntermediateThrowEvent_44">
- <di:waypoint xsi:type="dc:Point" x="1458.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="1497.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="1497.0" y="392.0"/>
- <di:waypoint xsi:type="dc:Point" x="1537.0" y="392.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="ScriptTask_setSuccess">
- <dc:Bounds height="95.0" width="128.0" x="1433.0" y="817.0"/>
- </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="1561.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="1596.0" y="864.0"/>
- <di:waypoint xsi:type="dc:Point" x="1596.0" y="865.0"/>
- <di:waypoint xsi:type="dc:Point" x="1620.0" y="864.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1593.0" y="865.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_254" bpmnElement="QueryCloudRegion">
- <dc:Bounds height="81.0" width="134.0" x="101.0" y="440.0"/>
- </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.0" y="418.0"/>
- <di:waypoint xsi:type="dc:Point" x="169.0" y="429.0"/>
- <di:waypoint xsi:type="dc:Point" x="168.0" y="429.0"/>
- <di:waypoint xsi:type="dc:Point" x="168.0" y="440.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="180.0" y="417.0"/>
- </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.0" y="520.0"/>
- <di:waypoint xsi:type="dc:Point" x="168.0" y="524.0"/>
- <di:waypoint xsi:type="dc:Point" x="168.0" y="581.0"/>
- <di:waypoint xsi:type="dc:Point" x="208.0" y="581.0"/>
- <di:waypoint xsi:type="dc:Point" x="209.0" y="581.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="165.0" y="574.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds height="203.0" width="405.0" x="103.0" y="1020.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="132.0" y="1104.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="150.0" y="1145.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="444.0" y="1104.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="462.0" y="1145.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_284" bpmnElement="ScriptTask_1">
- <dc:Bounds height="81.0" width="134.0" x="239.0" y="1081.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_55" targetElement="_BPMNShape_ScriptTask_284">
- <di:waypoint xsi:type="dc:Point" x="168.0" y="1122.0"/>
- <di:waypoint xsi:type="dc:Point" x="239.0" y="1121.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="189.0" y="1122.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_284" targetElement="_BPMNShape_EndEvent_181">
- <di:waypoint xsi:type="dc:Point" x="373.0" y="1121.0"/>
- <di:waypoint xsi:type="dc:Point" x="444.0" y="1122.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="400.0" y="1121.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
deleted file mode 100644
index e5856bb14c..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
+++ /dev/null
@@ -1,1102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_3SPHsLr9EeWak-hhutJWuQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="FalloutHandler" name="Fallout Handler" isExecutable="true">
- <bpmn2:parallelGateway id="ParallelGateway_1">
- <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_1"/>
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_6"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_16" name="source == OMX?" default="SequenceFlow_56">
- <bpmn2:incoming>SequenceFlow_54</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_56</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_55" name="yes" sourceRef="ExclusiveGateway_16" targetRef="ServiceTask_4">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_source").equals("OMX")}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_56" name="no" sourceRef="ExclusiveGateway_16" targetRef="ServiceTask_1"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_9" name="CSI Notify Success?" default="SequenceFlow_42">
- <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_42</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="ExclusiveGateway_9" targetRef="ParallelGateway_3">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notifyCSIResponseCode")==200}
-
-]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="ExclusiveGateway_9" targetRef="ScriptTask_5"/>
- <bpmn2:serviceTask id="ServiceTask_4" name="Notify CSI">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_csi_networkstatus_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[import com.att.bpm.scripts.*
-def notifyCSI = new FalloutHandler()
-return notifyCSI.notifyCSIPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_notifyCSIResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="FH_notifyCSIResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_40" name="" sourceRef="ServiceTask_4" targetRef="ExclusiveGateway_9"/>
- <bpmn2:parallelGateway id="ParallelGateway_2">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_54</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ParallelGateway_2" targetRef="ScriptTask_1"/>
- <bpmn2:sequenceFlow id="SequenceFlow_54" name="" sourceRef="ParallelGateway_2" targetRef="ExclusiveGateway_16"/>
- <bpmn2:exclusiveGateway id="ParallelGateway_3">
- <bpmn2:incoming>SequenceFlow_41</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_45</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_62</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_62" name="" sourceRef="ParallelGateway_3" targetRef="ExclusiveGateway_4"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_4">
- <bpmn2:incoming>SequenceFlow_62</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_63</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_63" name="" sourceRef="ExclusiveGateway_4" targetRef="ParallelGateway_7"/>
- <bpmn2:scriptTask id="ScriptTask_5" name="Handle CSI Notification Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_42</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_50</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_45</bpmn2:outgoing>
- <bpmn2:script><![CDATA[execution.setVariable("FH_success", false)
-execution.setVariable("FH_NOTIFY_STATUS", "FAILED")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_45" name="" sourceRef="ScriptTask_5" targetRef="ParallelGateway_3"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_5" name="Connect Fault" attachedToRef="ServiceTask_4">
- <bpmn2:outgoing>SequenceFlow_50</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_91" errorRef="Error_2"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_50" name="" sourceRef="BoundaryEvent_5" targetRef="ScriptTask_5"/>
- <bpmn2:serviceTask id="ServiceTask_1" name="Notify CCD">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url"><![CDATA[${execution.getVariable("FH_notification-url")}]]></camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="Content-Type">text/xml</camunda:entry>
- <camunda:entry key="Authorization"/>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> NOTIFY CCD"
-import com.att.bpm.scripts.*
-def notifyCCD = new FalloutHandler()
-return notifyCCD.notifyCCDFailurePayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_notifyCCDResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="FH_notifyCCDStatusCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_56</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_52</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_52" name="" sourceRef="ServiceTask_1" targetRef="ExclusiveGateway_15"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_19">
- <bpmn2:incoming>SequenceFlow_75</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_48</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="ExclusiveGateway_19" targetRef="ExclusiveGateway_4"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_15" name="CCD Notify Success?" default="SequenceFlow_47">
- <bpmn2:incoming>SequenceFlow_52</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_75</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_75" name="" sourceRef="ExclusiveGateway_15" targetRef="ExclusiveGateway_19">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notifyCCDStatusCode")==204}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="ExclusiveGateway_15" targetRef="ScriptTask_3"/>
- <bpmn2:scriptTask id="ScriptTask_3" name="Handle CCD Notification Failure" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_51</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_48</bpmn2:outgoing>
- <bpmn2:script><![CDATA[execution.setVariable("FH_success", false)
-execution.setVariable("FH_NOTIFY_STATUS", "FAILED")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_48" name="" sourceRef="ScriptTask_3" targetRef="ExclusiveGateway_19"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_6" name="Connect Fault" attachedToRef="ServiceTask_1">
- <bpmn2:outgoing>SequenceFlow_51</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_2"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_51" sourceRef="BoundaryEvent_6" targetRef="ScriptTask_3"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Notification URL exists?" default="SequenceFlow_23">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="yes" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notification-url-Ok") ==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="no" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_4"/>
- <bpmn2:scriptTask id="ScriptTask_8" name="Pre-Process Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def preProcessRequestData = new FalloutHandler()
-preProcessRequestData.preProcessRequest(execution)
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ScriptTask_8" targetRef="ParallelGateway_1"/>
- <bpmn2:startEvent id="StartEvent_1" name="Start">
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_8"/>
- <bpmn2:parallelGateway id="ParallelGateway_7">
- <bpmn2:incoming>SequenceFlow_63</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ParallelGateway_7" targetRef="ServiceTask_5"/>
- <bpmn2:serviceTask id="ServiceTask_5" name="Update Request Status">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request"
-import com.att.bpm.scripts.*
-def updateRequest= new FalloutHandler()
-return updateRequest.updateRequestPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="FH_updateRequestResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="ServiceTask_5" targetRef="ExclusiveGateway_5"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_4" name="Connect Fault" attachedToRef="ServiceTask_5">
- <bpmn2:outgoing>SequenceFlow_74</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_88" errorRef="Error_2"/>
- </bpmn2:boundaryEvent>
- <bpmn2:parallelGateway id="ParallelGateway_6">
- <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ParallelGateway_6" targetRef="ScriptTask_2"/>
- <bpmn2:scriptTask id="ScriptTask_2" name="Post Process Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def falloutHandler = new FalloutHandler()
-falloutHandler.postProcessResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_6"/>
- <bpmn2:exclusiveGateway id="ParallelGateway_4">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ParallelGateway_4" targetRef="ParallelGateway_6"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_6" default="SequenceFlow_26">
- <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_3">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_request_id-Ok") ==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_2"/>
- <bpmn2:serviceTask id="ServiceTask_3" name="Update Request Gamma">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Gamma"
-import com.att.bpm.scripts.*
-def updateRequestGamma= new FalloutHandler()
-return updateRequestGamma.updateRequestGammaPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_updateRequestGammaResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="FH_updateRequestGammaResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ServiceTask_3" targetRef="ExclusiveGateway_7"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_2" name="Connect Fault" attachedToRef="ServiceTask_3">
- <bpmn2:outgoing>SequenceFlow_72</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" errorRef="Error_2"/>
- </bpmn2:boundaryEvent>
- <bpmn2:exclusiveGateway id="ParallelGateway_5">
- <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="ParallelGateway_5" targetRef="ParallelGateway_6"/>
- <bpmn2:endEvent id="EndEvent_6" name="Normal End">
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Connect Fault" attachedToRef="ScriptTask_1">
- <bpmn2:outgoing>SequenceFlow_71</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_87" errorRef="Error_2"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_71" name="" sourceRef="BoundaryEvent_1" targetRef="ScriptTask_9"/>
- <bpmn2:serviceTask id="ScriptTask_1" name="Update Response Status to SENDING">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Response Status to pending ..."
-import com.att.bpm.scripts.*
-def updateResponseStatus= new FalloutHandler()
-return updateResponseStatus.updateResponseStatusPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_updateResponseStatusResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="FH_updateResponseStatusResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_43</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_2"/>
- <bpmn2:sequenceFlow id="SequenceFlow_72" name="" sourceRef="BoundaryEvent_2" targetRef="ScriptTask_6"/>
- <bpmn2:sequenceFlow id="SequenceFlow_74" name="" sourceRef="BoundaryEvent_4" targetRef="ScriptTask_10"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Update Success?" default="SequenceFlow_68">
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_68</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_5" targetRef="ParallelGateway_4">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_68" name="" sourceRef="ExclusiveGateway_5" targetRef="ScriptTask_10"/>
- <bpmn2:scriptTask id="ScriptTask_10" name="Build Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_68</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_74</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_77</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def falloutHandler = new FalloutHandler()
-falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestResponseCode")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_77" name="" sourceRef="ScriptTask_10" targetRef="EndEvent_10"/>
- <bpmn2:endEvent id="EndEvent_10">
- <bpmn2:incoming>SequenceFlow_77</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_TerminateEventDefinition_10" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_12">
- <bpmn2:incoming>SequenceFlow_78</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_TerminateEventDefinition_14" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="ScriptTask_9" name="Build Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_71</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_78</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def falloutHandler = new FalloutHandler()
-falloutHandler.buildDBWorkflowException(execution, "FH_updateResponseStatusResponseCode")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Update Success?" default="SequenceFlow_6">
- <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_9"/>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ExclusiveGateway_2" targetRef="ParallelGateway_7">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateResponseStatusResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_78" name="" sourceRef="ScriptTask_9" targetRef="EndEvent_12"/>
- <bpmn2:scriptTask id="ScriptTask_6" name="Build Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_72</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_79</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def falloutHandler = new FalloutHandler()
-falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestGammaResponseCode")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_79" name="" sourceRef="ScriptTask_6" targetRef="EndEvent_13"/>
- <bpmn2:endEvent id="EndEvent_13">
- <bpmn2:incoming>SequenceFlow_79</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_TerminateEventDefinition_15" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_7" name="Update Success?" default="SequenceFlow_31">
- <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ExclusiveGateway_7" targetRef="ScriptTask_6"/>
- <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ExclusiveGateway_7" targetRef="ParallelGateway_5">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestGammaResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_7" name="Build Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_80</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_73</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def falloutHandler = new FalloutHandler()
-falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestInfraResponseCode")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_73" name="" sourceRef="ScriptTask_7" targetRef="EndEvent_14"/>
- <bpmn2:serviceTask id="ServiceTask_2" name="Update Request Infra">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Infra"
-import com.att.bpm.scripts.*
-def updateRequestInfra= new FalloutHandler()
-return updateRequestInfra.updateRequestInfraPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_updateRequestInfraResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="FH_updateRequestInfraResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="ServiceTask_2" targetRef="ExclusiveGateway_8"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_8" name="Update Success?" default="SequenceFlow_32">
- <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ExclusiveGateway_8" targetRef="ScriptTask_7"/>
- <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="ExclusiveGateway_8" targetRef="ParallelGateway_5">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestInfraResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:boundaryEvent id="BoundaryEvent_3" name="Connect Fault" attachedToRef="ServiceTask_2">
- <bpmn2:outgoing>SequenceFlow_80</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_90" errorRef="Error_2"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_80" name="" sourceRef="BoundaryEvent_3" targetRef="ScriptTask_7"/>
- <bpmn2:endEvent id="EndEvent_14">
- <bpmn2:incoming>SequenceFlow_73</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_TerminateEventDefinition_16" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:subProcess id="SubProcess_1" name="Event Handler" triggeredByEvent="true">
- <bpmn2:scriptTask id="ScriptTask_4" name="Handle Event" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-execution.setVariable("FH_success", false)
-def falloutHandler = new FalloutHandler()
-
-// This does not (and cannot) throw exceptions
-falloutHandler.postProcessResponse(execution)
-
-// Clear any WorkflowException object that might be in the execution, but keep a copy in FH_WorkflowException
-def wfe = execution.getVariable("WorkflowException")
-execution.setVariable("WorkflowException", null)
-execution.setVariable("FH_WorkflowException", wfe)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_2"/>
- <bpmn2:endEvent id="EndEvent_2" name="Error End">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_8"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_4"/>
- </bpmn2:subProcess>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="Java Lang Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="FalloutHandler">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="108.0" y="900.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="109.0" y="937.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_12" bpmnElement="ParallelGateway_1">
- <dc:Bounds height="50.0" width="50.0" x="311.0" y="892.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="336.0" y="947.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_74" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="384.0" y="744.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="145.0" x="252.0" y="726.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_74">
- <di:waypoint xsi:type="dc:Point" x="336.0" y="892.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="769.0"/>
- <di:waypoint xsi:type="dc:Point" x="384.0" y="769.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="404.0" y="849.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_13" bpmnElement="ParallelGateway_2">
- <dc:Bounds height="50.0" width="50.0" x="482.0" y="438.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="507.0" y="493.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="_BPMNShape_ParallelGateway_13">
- <di:waypoint xsi:type="dc:Point" x="409.0" y="744.0"/>
- <di:waypoint xsi:type="dc:Point" x="410.0" y="463.0"/>
- <di:waypoint xsi:type="dc:Point" x="482.0" y="463.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="422.0" y="468.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_85" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="552.0" y="594.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ParallelGateway_13" targetElement="_BPMNShape_ScriptTask_85">
- <di:waypoint xsi:type="dc:Point" x="507.0" y="488.0"/>
- <di:waypoint xsi:type="dc:Point" x="508.0" y="634.0"/>
- <di:waypoint xsi:type="dc:Point" x="552.0" y="634.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="504.0" y="545.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_75" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="729.0" y="608.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="109.0" x="701.0" y="658.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_75" targetElement="_BPMNShape_ScriptTask_254">
- <di:waypoint xsi:type="dc:Point" x="754.0" y="608.0"/>
- <di:waypoint xsi:type="dc:Point" x="754.0" y="548.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="765.0" y="637.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_14" bpmnElement="ParallelGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1022.0" y="102.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1047.0" y="157.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_88" bpmnElement="ServiceTask_4">
- <dc:Bounds height="80.0" width="100.0" x="677.0" y="103.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_89" bpmnElement="ScriptTask_5">
- <dc:Bounds height="80.0" width="100.0" x="898.0" y="30.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_89" bpmnElement="ServiceTask_5">
- <dc:Bounds height="80.0" width="100.0" x="1216.0" y="424.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_78" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1397.0" y="438.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="109.0" x="1373.0" y="488.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_89" targetElement="_BPMNShape_ExclusiveGateway_78">
- <di:waypoint xsi:type="dc:Point" x="1316.0" y="464.0"/>
- <di:waypoint xsi:type="dc:Point" x="1397.0" y="463.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1361.0" y="464.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_15" bpmnElement="ParallelGateway_4" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1472.0" y="744.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1497.0" y="799.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_78" targetElement="_BPMNShape_ParallelGateway_15">
- <di:waypoint xsi:type="dc:Point" x="1447.0" y="463.0"/>
- <di:waypoint xsi:type="dc:Point" x="1497.0" y="463.0"/>
- <di:waypoint xsi:type="dc:Point" x="1497.0" y="744.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1502.0" y="478.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="_BPMNShape_ParallelGateway_15">
- <di:waypoint xsi:type="dc:Point" x="409.0" y="794.0"/>
- <di:waypoint xsi:type="dc:Point" x="410.0" y="835.0"/>
- <di:waypoint xsi:type="dc:Point" x="1497.0" y="835.0"/>
- <di:waypoint xsi:type="dc:Point" x="1497.0" y="794.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="425.0" y="810.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_79" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="381.0" y="1105.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="406.0" y="1160.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_79">
- <di:waypoint xsi:type="dc:Point" x="336.0" y="942.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="1130.0"/>
- <di:waypoint xsi:type="dc:Point" x="381.0" y="1130.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="381.0" y="1082.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_90">
- <di:waypoint xsi:type="dc:Point" x="406.0" y="1105.0"/>
- <di:waypoint xsi:type="dc:Point" x="406.0" y="1039.0"/>
- <di:waypoint xsi:type="dc:Point" x="461.0" y="1039.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="403.0" y="1081.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_91">
- <di:waypoint xsi:type="dc:Point" x="406.0" y="1155.0"/>
- <di:waypoint xsi:type="dc:Point" x="406.0" y="1287.0"/>
- <di:waypoint xsi:type="dc:Point" x="457.0" y="1287.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="403.0" y="1233.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_90" bpmnElement="ServiceTask_3">
- <dc:Bounds height="80.0" width="100.0" x="461.0" y="999.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_91" bpmnElement="ServiceTask_2">
- <dc:Bounds height="80.0" width="100.0" x="457.0" y="1247.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_80" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="644.0" y="1013.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="109.0" x="615.0" y="1068.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ServiceTask_90" targetElement="_BPMNShape_ExclusiveGateway_80">
- <di:waypoint xsi:type="dc:Point" x="561.0" y="1039.0"/>
- <di:waypoint xsi:type="dc:Point" x="644.0" y="1038.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="598.0" y="1041.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_81" bpmnElement="ExclusiveGateway_8" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="643.0" y="1262.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="109.0" x="614.0" y="1317.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ServiceTask_91" targetElement="_BPMNShape_ExclusiveGateway_81">
- <di:waypoint xsi:type="dc:Point" x="557.0" y="1287.0"/>
- <di:waypoint xsi:type="dc:Point" x="595.0" y="1287.0"/>
- <di:waypoint xsi:type="dc:Point" x="595.0" y="1286.0"/>
- <di:waypoint xsi:type="dc:Point" x="643.0" y="1287.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="602.0" y="1288.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ScriptTask_252">
- <di:waypoint xsi:type="dc:Point" x="669.0" y="1013.0"/>
- <di:waypoint xsi:type="dc:Point" x="670.0" y="961.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="673.0" y="988.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ScriptTask_253">
- <di:waypoint xsi:type="dc:Point" x="668.0" y="1262.0"/>
- <di:waypoint xsi:type="dc:Point" x="668.0" y="1245.0"/>
- <di:waypoint xsi:type="dc:Point" x="668.0" y="1214.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="675.0" y="1294.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_16" bpmnElement="ParallelGateway_5" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="822.0" y="1105.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="847.0" y="1160.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ParallelGateway_16">
- <di:waypoint xsi:type="dc:Point" x="694.0" y="1038.0"/>
- <di:waypoint xsi:type="dc:Point" x="847.0" y="1038.0"/>
- <di:waypoint xsi:type="dc:Point" x="847.0" y="1105.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="728.0" y="1029.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ParallelGateway_16">
- <di:waypoint xsi:type="dc:Point" x="693.0" y="1287.0"/>
- <di:waypoint xsi:type="dc:Point" x="847.0" y="1287.0"/>
- <di:waypoint xsi:type="dc:Point" x="847.0" y="1155.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="844.0" y="1211.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_17" bpmnElement="ParallelGateway_6">
- <dc:Bounds height="50.0" width="50.0" x="1535.0" y="878.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1560.0" y="933.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ParallelGateway_16" targetElement="_BPMNShape_ParallelGateway_17">
- <di:waypoint xsi:type="dc:Point" x="872.0" y="1130.0"/>
- <di:waypoint xsi:type="dc:Point" x="1560.0" y="1130.0"/>
- <di:waypoint xsi:type="dc:Point" x="1560.0" y="928.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="764.0" y="1134.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ParallelGateway_15" targetElement="_BPMNShape_ParallelGateway_17">
- <di:waypoint xsi:type="dc:Point" x="1522.0" y="769.0"/>
- <di:waypoint xsi:type="dc:Point" x="1560.0" y="769.0"/>
- <di:waypoint xsi:type="dc:Point" x="1560.0" y="878.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1663.0" y="830.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_82" bpmnElement="ExclusiveGateway_9" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="827.0" y="117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="126.0" x="872.0" y="154.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ScriptTask_88" targetElement="_BPMNShape_ExclusiveGateway_82">
- <di:waypoint xsi:type="dc:Point" x="777.0" y="143.0"/>
- <di:waypoint xsi:type="dc:Point" x="827.0" y="142.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="799.0" y="147.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ExclusiveGateway_82" targetElement="_BPMNShape_ParallelGateway_14">
- <di:waypoint xsi:type="dc:Point" x="852.0" y="167.0"/>
- <di:waypoint xsi:type="dc:Point" x="852.0" y="199.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="199.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="152.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="849.0" y="168.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_42" sourceElement="_BPMNShape_ExclusiveGateway_82" targetElement="_BPMNShape_ScriptTask_89">
- <di:waypoint xsi:type="dc:Point" x="852.0" y="117.0"/>
- <di:waypoint xsi:type="dc:Point" x="852.0" y="69.0"/>
- <di:waypoint xsi:type="dc:Point" x="898.0" y="69.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="831.0" y="150.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_99">
- <di:waypoint xsi:type="dc:Point" x="144.0" y="918.0"/>
- <di:waypoint xsi:type="dc:Point" x="180.0" y="918.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="159.0" y="918.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_99" bpmnElement="ScriptTask_8">
- <dc:Bounds height="80.0" width="100.0" x="180.0" y="878.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_14" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds height="167.0" width="329.0" x="115.0" y="1396.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_100" bpmnElement="ScriptTask_4">
- <dc:Bounds height="80.0" width="100.0" x="228.0" y="1440.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="372.0" y="1462.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="392.0" y="1506.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_100" targetElement="_BPMNShape_EndEvent_127">
- <di:waypoint xsi:type="dc:Point" x="328.0" y="1480.0"/>
- <di:waypoint xsi:type="dc:Point" x="372.0" y="1480.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="256.0" y="1491.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="144.0" y="1462.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="162.0" y="1506.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ScriptTask_100">
- <di:waypoint xsi:type="dc:Point" x="180.0" y="1480.0"/>
- <di:waypoint xsi:type="dc:Point" x="228.0" y="1480.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="201.0" y="1480.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_84" bpmnElement="ParallelGateway_7">
- <dc:Bounds height="50.0" width="50.0" x="1129.0" y="438.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1154.0" y="493.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_75" targetElement="_BPMNShape_ExclusiveGateway_84">
- <di:waypoint xsi:type="dc:Point" x="779.0" y="633.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="633.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="488.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1103.0" y="600.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ExclusiveGateway_84" targetElement="_BPMNShape_ServiceTask_89">
- <di:waypoint xsi:type="dc:Point" x="1179.0" y="463.0"/>
- <di:waypoint xsi:type="dc:Point" x="1216.0" y="464.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1036.0" y="301.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_101" bpmnElement="ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="1632.0" y="864.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ParallelGateway_17" targetElement="_BPMNShape_ScriptTask_101">
- <di:waypoint xsi:type="dc:Point" x="1585.0" y="903.0"/>
- <di:waypoint xsi:type="dc:Point" x="1632.0" y="904.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1752.0" y="904.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_99" targetElement="_BPMNShape_ParallelGateway_12">
- <di:waypoint xsi:type="dc:Point" x="280.0" y="918.0"/>
- <di:waypoint xsi:type="dc:Point" x="311.0" y="917.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="293.0" y="918.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_95" bpmnElement="ServiceTask_1">
- <dc:Bounds height="80.0" width="100.0" x="677.0" y="342.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_94" bpmnElement="ExclusiveGateway_15" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="827.0" y="356.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="132.0" x="859.0" y="403.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_52" bpmnElement="SequenceFlow_52" sourceElement="_BPMNShape_ServiceTask_95" targetElement="_BPMNShape_ExclusiveGateway_94">
- <di:waypoint xsi:type="dc:Point" x="777.0" y="382.0"/>
- <di:waypoint xsi:type="dc:Point" x="827.0" y="381.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="800.0" y="401.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_95" bpmnElement="ExclusiveGateway_16" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="576.0" y="218.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="104.0" x="482.0" y="209.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_54" sourceElement="_BPMNShape_ParallelGateway_13" targetElement="_BPMNShape_ExclusiveGateway_95">
- <di:waypoint xsi:type="dc:Point" x="507.0" y="438.0"/>
- <di:waypoint xsi:type="dc:Point" x="508.0" y="243.0"/>
- <di:waypoint xsi:type="dc:Point" x="576.0" y="243.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="503.0" y="390.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_ExclusiveGateway_95" targetElement="_BPMNShape_ScriptTask_88">
- <di:waypoint xsi:type="dc:Point" x="601.0" y="218.0"/>
- <di:waypoint xsi:type="dc:Point" x="601.0" y="143.0"/>
- <di:waypoint xsi:type="dc:Point" x="677.0" y="143.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="629.0" y="117.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_56" bpmnElement="SequenceFlow_56" sourceElement="_BPMNShape_ExclusiveGateway_95" targetElement="_BPMNShape_ServiceTask_95">
- <di:waypoint xsi:type="dc:Point" x="601.0" y="268.0"/>
- <di:waypoint xsi:type="dc:Point" x="601.0" y="327.0"/>
- <di:waypoint xsi:type="dc:Point" x="601.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="677.0" y="382.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="626.0" y="356.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_102" bpmnElement="ScriptTask_3">
- <dc:Bounds height="80.0" width="100.0" x="898.0" y="282.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_98" bpmnElement="ExclusiveGateway_19" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1022.0" y="349.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1047.0" y="404.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_62" bpmnElement="SequenceFlow_62" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ExclusiveGateway_106">
- <di:waypoint xsi:type="dc:Point" x="1072.0" y="127.0"/>
- <di:waypoint xsi:type="dc:Point" x="1106.0" y="127.0"/>
- <di:waypoint xsi:type="dc:Point" x="1106.0" y="211.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1084.0" y="168.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_63" bpmnElement="SequenceFlow_63" sourceElement="_BPMNShape_ExclusiveGateway_106" targetElement="_BPMNShape_ExclusiveGateway_84">
- <di:waypoint xsi:type="dc:Point" x="1131.0" y="236.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="236.0"/>
- <di:waypoint xsi:type="dc:Point" x="1154.0" y="438.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1134.0" y="255.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_75" bpmnElement="SequenceFlow_75" sourceElement="_BPMNShape_ExclusiveGateway_94" targetElement="_BPMNShape_ExclusiveGateway_98">
- <di:waypoint xsi:type="dc:Point" x="852.0" y="406.0"/>
- <di:waypoint xsi:type="dc:Point" x="852.0" y="446.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="446.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="399.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="976.0" y="446.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_129" bpmnElement="EndEvent_6">
- <dc:Bounds height="36.0" width="36.0" x="1766.0" y="886.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1784.0" y="927.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_101" targetElement="_BPMNShape_EndEvent_129">
- <di:waypoint xsi:type="dc:Point" x="1732.0" y="904.0"/>
- <di:waypoint xsi:type="dc:Point" x="1766.0" y="904.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1746.0" y="904.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_30" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="585.0" y="576.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="87.0" x="607.0" y="521.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_31" bpmnElement="BoundaryEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="494.0" y="981.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="87.0" x="522.0" y="937.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_32" bpmnElement="BoundaryEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="490.0" y="1229.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="87.0" x="522.0" y="1191.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_33" bpmnElement="BoundaryEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1249.0" y="406.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="87.0" x="1272.0" y="353.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_106" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1081.0" y="211.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1106.0" y="266.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ExclusiveGateway_98" targetElement="_BPMNShape_ExclusiveGateway_106">
- <di:waypoint xsi:type="dc:Point" x="1072.0" y="374.0"/>
- <di:waypoint xsi:type="dc:Point" x="1106.0" y="373.0"/>
- <di:waypoint xsi:type="dc:Point" x="1106.0" y="319.0"/>
- <di:waypoint xsi:type="dc:Point" x="1106.0" y="261.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1103.0" y="361.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_43" sourceElement="_BPMNShape_ScriptTask_85" targetElement="_BPMNShape_ExclusiveGateway_75">
- <di:waypoint xsi:type="dc:Point" x="652.0" y="634.0"/>
- <di:waypoint xsi:type="dc:Point" x="683.0" y="634.0"/>
- <di:waypoint xsi:type="dc:Point" x="683.0" y="633.0"/>
- <di:waypoint xsi:type="dc:Point" x="729.0" y="633.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="694.0" y="682.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_45" sourceElement="_BPMNShape_ScriptTask_89" targetElement="_BPMNShape_ParallelGateway_14">
- <di:waypoint xsi:type="dc:Point" x="998.0" y="69.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="69.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="102.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1042.0" y="150.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_47" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_ExclusiveGateway_94" targetElement="_BPMNShape_ScriptTask_102">
- <di:waypoint xsi:type="dc:Point" x="852.0" y="356.0"/>
- <di:waypoint xsi:type="dc:Point" x="852.0" y="322.0"/>
- <di:waypoint xsi:type="dc:Point" x="898.0" y="322.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="855.0" y="377.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_48" bpmnElement="SequenceFlow_48" sourceElement="_BPMNShape_ScriptTask_102" targetElement="_BPMNShape_ExclusiveGateway_98">
- <di:waypoint xsi:type="dc:Point" x="998.0" y="322.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="322.0"/>
- <di:waypoint xsi:type="dc:Point" x="1047.0" y="349.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1033.0" y="377.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_48" bpmnElement="BoundaryEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="759.0" y="85.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="87.0" x="785.0" y="4.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_50" bpmnElement="SequenceFlow_50" sourceElement="_BPMNShape_BoundaryEvent_48" targetElement="_BPMNShape_ScriptTask_89">
- <di:waypoint xsi:type="dc:Point" x="777.0" y="85.0"/>
- <di:waypoint xsi:type="dc:Point" x="777.0" y="0.0"/>
- <di:waypoint xsi:type="dc:Point" x="948.0" y="0.0"/>
- <di:waypoint xsi:type="dc:Point" x="948.0" y="30.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_49" bpmnElement="BoundaryEvent_6">
- <dc:Bounds height="36.0" width="36.0" x="759.0" y="324.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="87.0" x="785.0" y="261.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_51" bpmnElement="SequenceFlow_51" sourceElement="_BPMNShape_BoundaryEvent_49" targetElement="_BPMNShape_ScriptTask_102">
- <di:waypoint xsi:type="dc:Point" x="777.0" y="324.0"/>
- <di:waypoint xsi:type="dc:Point" x="777.0" y="252.0"/>
- <di:waypoint xsi:type="dc:Point" x="948.0" y="252.0"/>
- <di:waypoint xsi:type="dc:Point" x="948.0" y="282.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="87.0" x="785.0" y="256.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_10">
- <dc:Bounds height="36.0" width="36.0" x="1506.0" y="324.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1577.0" y="373.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_68" bpmnElement="SequenceFlow_68" sourceElement="_BPMNShape_ExclusiveGateway_78" targetElement="_BPMNShape_ScriptTask_255">
- <di:waypoint xsi:type="dc:Point" x="1422.0" y="438.0"/>
- <di:waypoint xsi:type="dc:Point" x="1423.0" y="382.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1428.0" y="401.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_12">
- <dc:Bounds height="36.0" width="36.0" x="835.0" y="490.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="853.0" y="531.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_71" bpmnElement="SequenceFlow_71" sourceElement="_BPMNShape_BoundaryEvent_30" targetElement="_BPMNShape_ScriptTask_254">
- <di:waypoint xsi:type="dc:Point" x="603.0" y="576.0"/>
- <di:waypoint xsi:type="dc:Point" x="603.0" y="508.0"/>
- <di:waypoint xsi:type="dc:Point" x="704.0" y="508.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="600.0" y="604.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_13">
- <dc:Bounds height="36.0" width="36.0" x="762.0" y="903.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="780.0" y="944.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_72" bpmnElement="SequenceFlow_72" sourceElement="_BPMNShape_BoundaryEvent_31" targetElement="_BPMNShape_ScriptTask_252">
- <di:waypoint xsi:type="dc:Point" x="512.0" y="981.0"/>
- <di:waypoint xsi:type="dc:Point" x="512.0" y="921.0"/>
- <di:waypoint xsi:type="dc:Point" x="620.0" y="921.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="509.0" y="963.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_230" bpmnElement="EndEvent_14">
- <dc:Bounds height="36.0" width="36.0" x="759.0" y="1156.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="777.0" y="1197.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_73" bpmnElement="SequenceFlow_73" sourceElement="_BPMNShape_ScriptTask_253" targetElement="_BPMNShape_EndEvent_230">
- <di:waypoint xsi:type="dc:Point" x="719.0" y="1174.0"/>
- <di:waypoint xsi:type="dc:Point" x="759.0" y="1174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="732.0" y="1184.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_252" bpmnElement="ScriptTask_6">
- <dc:Bounds height="80.0" width="100.0" x="620.0" y="881.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_253" bpmnElement="ScriptTask_7">
- <dc:Bounds height="80.0" width="100.0" x="619.0" y="1134.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_254" bpmnElement="ScriptTask_9">
- <dc:Bounds height="80.0" width="100.0" x="704.0" y="468.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_10">
- <dc:Bounds height="80.0" width="100.0" x="1373.0" y="302.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_74" bpmnElement="SequenceFlow_74" sourceElement="_BPMNShape_BoundaryEvent_33" targetElement="_BPMNShape_ScriptTask_255">
- <di:waypoint xsi:type="dc:Point" x="1267.0" y="406.0"/>
- <di:waypoint xsi:type="dc:Point" x="1267.0" y="342.0"/>
- <di:waypoint xsi:type="dc:Point" x="1373.0" y="342.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1278.0" y="342.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="SequenceFlow_77" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_EndEvent_226">
- <di:waypoint xsi:type="dc:Point" x="1473.0" y="342.0"/>
- <di:waypoint xsi:type="dc:Point" x="1506.0" y="342.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1482.0" y="342.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_78" bpmnElement="SequenceFlow_78" sourceElement="_BPMNShape_ScriptTask_254" targetElement="_BPMNShape_EndEvent_228">
- <di:waypoint xsi:type="dc:Point" x="804.0" y="508.0"/>
- <di:waypoint xsi:type="dc:Point" x="835.0" y="508.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_79" bpmnElement="SequenceFlow_79" sourceElement="_BPMNShape_ScriptTask_252" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="720.0" y="921.0"/>
- <di:waypoint xsi:type="dc:Point" x="762.0" y="921.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="738.0" y="921.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_80" bpmnElement="SequenceFlow_80" sourceElement="_BPMNShape_BoundaryEvent_32" targetElement="_BPMNShape_ScriptTask_253">
- <di:waypoint xsi:type="dc:Point" x="508.0" y="1229.0"/>
- <di:waypoint xsi:type="dc:Point" x="508.0" y="1174.0"/>
- <di:waypoint xsi:type="dc:Point" x="619.0" y="1174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="533.0" y="1174.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn
deleted file mode 100644
index fc9f0a114c..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn
+++ /dev/null
@@ -1,810 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_l2hJ8CccEeW3d--PaFJMbg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="sdncAdapter" name="SDNC Adapter" isExecutable="true">
- <bpmn2:exclusiveGateway id="isResponseOK" name="is Response Ok?" default="badSynchronousResponse">
- <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
- <bpmn2:outgoing>badSynchronousResponse</bpmn2:outgoing>
- <bpmn2:outgoing>goodSynchronousResponse</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="badSynchronousResponse" name="Bad synchronous response" sourceRef="isResponseOK" targetRef="setBadResponse"/>
- <bpmn2:sequenceFlow id="goodSynchronousResponse" name="Good synchronous response" sourceRef="isResponseOK" targetRef="resetCallbackRequest">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCA_ResponseCode")=='200'}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="setBadResponse" name="Set Bad Response&#xD;&#xA;Exception" scriptFormat="groovy">
- <bpmn2:incoming>badSynchronousResponse</bpmn2:incoming>
- <bpmn2:outgoing>Exception</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-
-int responseCode = execution.getVariable("SDNCA_ResponseCode")
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 7000, "Could not communicate with the SDNC Adapter" )]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="Exception" name="Exception" sourceRef="setBadResponse" targetRef="badResponseEndFlow"/>
- <bpmn2:serviceTask id="invokeSDNCAdapter" camunda:class="" name="Invoke SDNC Adapter">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_sdnc_endpoint}</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">#{BasicAuthHeaderValue}</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">${sdncAdapterRequest}</camunda:inputParameter>
- <camunda:outputParameter name="sdncAdapterWorkflowResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="SDNCA_ResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_15" sourceRef="invokeSDNCAdapter" targetRef="isResponseOK"/>
- <bpmn2:endEvent id="badResponseEndFlow" name="Bad Response End Flow">
- <bpmn2:incoming>Exception</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_77" errorRef="Error_3"/>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="SDNCAdapter_Start" name="Incoming Message">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- <bpmn2:messageEventDefinition id="_MessageEventDefinition_3" messageRef="Message_1"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="SDNCAdapter_Start" targetRef="processMessage"/>
- <bpmn2:scriptTask id="processMessage" name="Process message" scriptFormat="groovy">
- <bpmn2:extensionElements>
- <camunda:inputOutput>
- <camunda:inputParameter name="ScriptObject">
- <camunda:map>
- <camunda:entry key="MethodName">massageSDNCRequestScript</camunda:entry>
- <camunda:entry key="Params"/>
- </camunda:map>
- </camunda:inputParameter>
- </camunda:inputOutput>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" sourceRef="processMessage" targetRef="invokeSDNCAdapter"/>
- <bpmn2:exclusiveGateway id="timeOutCheck">
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- <bpmn2:incoming>timeOut</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:scriptTask id="returnWorkflowResult" name="Return workflow result" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.postProcessResponse(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_14" sourceRef="returnWorkflowResult" targetRef="timeoutError"/>
- <bpmn2:exclusiveGateway id="timeoutError" name="Did Timeout occur?" default="noTimeoutError">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>noTimeoutError</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="noTimeoutError" name="No Timeout" sourceRef="timeoutError" targetRef="ExclusiveGateway_1"/>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="Timeout" sourceRef="timeoutError" targetRef="setTimeoutEx">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("asynchronousResponseTimeout")==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:subProcess id="SubProcess" name="Wait for asynchronous message">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:endEvent id="eEndEventSubprocess" name="End Event Subprocess">
- <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent" name="Start Event">
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_18" sourceRef="StartEvent" targetRef="IntermediateCatchEvent"/>
- <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent" name="Catch Event">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- <bpmn2:messageEventDefinition id="MessageEventDefinition_2" messageRef="Message_2"/>
- </bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_16" sourceRef="IntermediateCatchEvent" targetRef="eEndEventSubprocess"/>
- </bpmn2:subProcess>
- <bpmn2:sequenceFlow id="SequenceFlow_9" sourceRef="SubProcess" targetRef="timeOutCheck"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Boundary Event" attachedToRef="SubProcess">
- <bpmn2:outgoing>timeOut</bpmn2:outgoing>
- <bpmn2:timerEventDefinition id="TimerEventDefinition_1">
- <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${sdncTimeoutValue}</bpmn2:timeDuration>
- </bpmn2:timerEventDefinition>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="timeOut" name="Timed out" sourceRef="BoundaryEvent_1" targetRef="timeOutCheck"/>
- <bpmn2:scriptTask id="setTimeoutEx" name="Set Timeout&#xD;&#xA;Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>Error</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 500, "SDNC Callback Timeout Error" )
-
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="Error" name="Error" sourceRef="setTimeoutEx" targetRef="endEventException"/>
- <bpmn2:endEvent id="endEventException" name="Timeout Exception">
- <bpmn2:incoming>Error</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="timeOutCheck" targetRef="returnWorkflowResult"/>
- <bpmn2:scriptTask id="resetCallbackRequest" name="Reset callback request and set timer value" scriptFormat="groovy">
- <bpmn2:incoming>goodSynchronousResponse</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.resetCallbackRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="resetCallbackRequest" targetRef="SubProcess"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Check final indicator" default="Done">
- <bpmn2:incoming>noTimeoutError</bpmn2:incoming>
- <bpmn2:outgoing>Done</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="Done" name="Done" sourceRef="ExclusiveGateway_1" targetRef="toggleSuccessIndicator"/>
- <bpmn2:sequenceFlow id="SequenceFlow_30" name="Not Done" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_3">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("continueListening")==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="toggleSuccessIndicator" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>Done</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.toggleSuccessIndicator(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="toggleSuccessIndicator" targetRef="endEventFlow"/>
- <bpmn2:endEvent id="endEventFlow" name="End Event Flow">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:outputParameter name="sdncAdapterResponse">${sdncAdapterWorkflowResponse}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
- <bpmn2:messageEventDefinition id="_MessageEventDefinition_6"/>
- </bpmn2:endEvent>
- <bpmn2:parallelGateway id="ParallelGateway_3">
- <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ParallelGateway_3" targetRef="toggleSuccess"/>
- <bpmn2:sequenceFlow id="SequenceFlow_26" name="Continue listening for asynchronous message" sourceRef="ParallelGateway_3" targetRef="resetCallbackRequest"/>
- <bpmn2:subProcess id="errorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:startEvent id="catchErrors" name="Catch">
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_78" errorRef="Error_3"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="catchErrors" targetRef="assignError"/>
- <bpmn2:scriptTask id="assignError" name="Assign Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.assignError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="assignError" targetRef="EndEvent_5"/>
- <bpmn2:endEvent id="EndEvent_5">
- <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_5">
- <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_2"/>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_3">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('source').equals('CCD')}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="ScriptTask_3" name="Prepare CCD Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.prepareCCDMessage(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_3" targetRef="notifyCCD"/>
- <bpmn2:scriptTask id="ScriptTask_2" name="Prepare CSI Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.prepareCSIMessage(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_2" targetRef="notifyCSI"/>
- <bpmn2:scriptTask id="ScriptTask_1" name="Prepare DB Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.prepareDBMessage(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_1" targetRef="notifyDB"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:serviceTask id="notifyDB" camunda:class="" name="Notify DB">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">${dbUpdateInterimStageCompletion}</camunda:inputParameter>
- <camunda:outputParameter name="dbUpdateInterimStageCompletionResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="dbUpdateInterimStageCompletionResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:serviceTask id="notifyCCD" name="Notify CCD">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url"><![CDATA[${execution.getVariable("ccd-notification-url")}]]></camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="Content-Type">text/xml</camunda:entry>
- <camunda:entry key="Authorization"/>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("ccd-notification-payload")}]]></camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CCDResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="CCDResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </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="notifyCCD" targetRef="EndEvent_4"/>
- <bpmn2:serviceTask id="notifyCSI" camunda:class="" name="Notify CSI">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_csi_networkstatus_endpoint}</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:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">${csiSendManagedNetworkNotificationRequest}</camunda:inputParameter>
- <camunda:outputParameter name="csiSendManagedNetworkStatusNotificationResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="csiSendManagedNetworkStatusNotificationResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="notifyCSI" targetRef="EndEvent_3"/>
- <bpmn2:parallelGateway id="ParallelGateway_1">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_3"/>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ParallelGateway_1" targetRef="ScriptTask_1"/>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def sdnc= new SDNCAdapter()
-sdnc.toggleSuccessIndicator(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="toggleSuccess" targetRef="ExclusiveGateway_2"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Service Config Activate?" default="SequenceFlow_23">
- <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="Yes" sourceRef="ExclusiveGateway_2" targetRef="ParallelGateway_1">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("serviceConfigActivate")==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="No" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_1"/>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:boundaryEvent id="BoundaryEvent_2" name="" attachedToRef="notifyDB">
- <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_79" errorRef="Error_2"/>
- </bpmn2:boundaryEvent>
- <bpmn2:endEvent id="EndEvent_6">
- <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="BoundaryEvent_2" targetRef="EndEvent_6"/>
- <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="notifyDB" targetRef="EndEvent_2"/>
- </bpmn2:process>
- <bpmn2:message id="Message_1" name="sdncAdapterWorkflowRequest"/>
- <bpmn2:message id="Message_2" name="sdncAdapterCallbackRequest"/>
- <bpmn2:error id="Error_3" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmn2:signal id="Signal_1" name="InterimStatus"/>
- <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="Java Lang Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="sdncAdapter">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_33" bpmnElement="SDNCAdapter_Start">
- <dc:Bounds height="36.0" width="36.0" x="111.0" y="161.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="115.0" x="72.0" y="202.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_62" bpmnElement="invokeSDNCAdapter">
- <dc:Bounds height="80.0" width="100.0" x="342.0" y="139.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_29" bpmnElement="isResponseOK" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="519.0" y="153.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="106.0" x="569.0" y="182.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_64" bpmnElement="endEventFlow">
- <dc:Bounds height="36.0" width="36.0" x="1560.0" y="366.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="96.0" x="1595.0" y="373.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_65" bpmnElement="badResponseEndFlow">
- <dc:Bounds height="36.0" width="36.0" x="762.0" y="104.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="149.0" x="804.0" y="111.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="badSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_24">
- <di:waypoint xsi:type="dc:Point" x="544.0" y="153.0"/>
- <di:waypoint xsi:type="dc:Point" x="544.0" y="122.0"/>
- <di:waypoint xsi:type="dc:Point" x="600.0" y="122.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="164.0" x="441.0" y="99.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_33" targetElement="_BPMNShape_ScriptTask_3">
- <di:waypoint xsi:type="dc:Point" x="147.0" y="179.0"/>
- <di:waypoint xsi:type="dc:Point" x="194.0" y="179.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="171.0" y="179.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="goodSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_27">
- <di:waypoint xsi:type="dc:Point" x="544.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="544.0" y="246.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="172.0" x="459.0" y="208.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_68" bpmnElement="returnWorkflowResult">
- <dc:Bounds height="80.0" width="100.0" x="1104.0" y="237.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_3" bpmnElement="processMessage">
- <dc:Bounds height="80.0" width="100.0" x="194.0" y="139.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_3" targetElement="_BPMNShape_ServiceTask_62">
- <di:waypoint xsi:type="dc:Point" x="294.0" y="179.0"/>
- <di:waypoint xsi:type="dc:Point" x="342.0" y="179.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="30.0" x="300.0" y="153.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ServiceTask_68" targetElement="_BPMNShape_ExclusiveGateway_53">
- <di:waypoint xsi:type="dc:Point" x="1204.0" y="277.0"/>
- <di:waypoint xsi:type="dc:Point" x="1248.0" y="276.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="37.0" x="1211.0" y="251.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ServiceTask_62" targetElement="_BPMNShape_ExclusiveGateway_29">
- <di:waypoint xsi:type="dc:Point" x="442.0" y="179.0"/>
- <di:waypoint xsi:type="dc:Point" x="480.0" y="179.0"/>
- <di:waypoint xsi:type="dc:Point" x="480.0" y="178.0"/>
- <di:waypoint xsi:type="dc:Point" x="519.0" y="178.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="37.0" x="468.0" y="153.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_16" bpmnElement="IntermediateCatchEvent">
- <dc:Bounds height="36.0" width="36.0" x="764.0" y="259.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="76.0" x="714.0" y="294.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_11" bpmnElement="SubProcess" isExpanded="true">
- <dc:Bounds height="97.0" width="314.0" x="624.0" y="228.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_38" bpmnElement="StartEvent">
- <dc:Bounds height="36.0" width="36.0" x="660.0" y="259.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="70.0" x="627.0" y="294.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_90" bpmnElement="eEndEventSubprocess">
- <dc:Bounds height="36.0" width="36.0" x="865.0" y="259.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="138.0" x="805.0" y="294.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_SubProcess_11" targetElement="_BPMNShape_ExclusiveGateway_51">
- <di:waypoint xsi:type="dc:Point" x="938.0" y="276.0"/>
- <di:waypoint xsi:type="dc:Point" x="996.0" y="276.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="967.0" y="254.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_21" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="781.0" y="307.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="97.0" x="704.0" y="340.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_91" bpmnElement="endEventException">
- <dc:Bounds height="36.0" width="36.0" x="1488.0" y="74.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="114.0" x="1523.0" y="81.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="timeOut" sourceElement="_BPMNShape_BoundaryEvent_21" targetElement="_BPMNShape_ExclusiveGateway_51">
- <di:waypoint xsi:type="dc:Point" x="799.0" y="343.0"/>
- <di:waypoint xsi:type="dc:Point" x="799.0" y="365.0"/>
- <di:waypoint xsi:type="dc:Point" x="1021.0" y="365.0"/>
- <di:waypoint xsi:type="dc:Point" x="1021.0" y="301.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="63.0" x="874.0" y="340.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_24" bpmnElement="setBadResponse">
- <dc:Bounds height="80.0" width="100.0" x="600.0" y="82.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="Exception" sourceElement="_BPMNShape_ScriptTask_24" targetElement="_BPMNShape_EndEvent_65">
- <di:waypoint xsi:type="dc:Point" x="700.0" y="122.0"/>
- <di:waypoint xsi:type="dc:Point" x="762.0" y="122.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="64.0" x="699.0" y="99.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_25" bpmnElement="setTimeoutEx">
- <dc:Bounds height="80.0" width="100.0" x="1299.0" y="52.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="Error" sourceElement="_BPMNShape_ScriptTask_25" targetElement="_BPMNShape_EndEvent_91">
- <di:waypoint xsi:type="dc:Point" x="1399.0" y="92.0"/>
- <di:waypoint xsi:type="dc:Point" x="1488.0" y="92.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="1416.0" y="70.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateCatchEvent_16" targetElement="_BPMNShape_EndEvent_90">
- <di:waypoint xsi:type="dc:Point" x="800.0" y="277.0"/>
- <di:waypoint xsi:type="dc:Point" x="865.0" y="277.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="822.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_38" targetElement="_BPMNShape_IntermediateCatchEvent_16">
- <di:waypoint xsi:type="dc:Point" x="696.0" y="277.0"/>
- <di:waypoint xsi:type="dc:Point" x="764.0" y="277.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="718.0" y="259.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_51" bpmnElement="timeOutCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="996.0" y="251.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="81.0" x="982.0" y="228.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_53" bpmnElement="timeoutError" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1248.0" y="251.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="118.0" x="1300.0" y="266.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="noTimeoutError" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ExclusiveGateway_54">
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="301.0"/>
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="359.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="72.0" x="1280.0" y="324.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ScriptTask_25">
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="251.0"/>
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="92.0"/>
- <di:waypoint xsi:type="dc:Point" x="1299.0" y="92.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="82.0" x="1280.0" y="168.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1248.0" y="359.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="123.0" x="1127.0" y="373.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="Done" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_247">
- <di:waypoint xsi:type="dc:Point" x="1298.0" y="384.0"/>
- <di:waypoint xsi:type="dc:Point" x="1383.0" y="384.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="36.0" x="1316.0" y="384.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_27" bpmnElement="resetCallbackRequest">
- <dc:Bounds height="80.0" width="100.0" x="494.0" y="246.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_27" targetElement="_BPMNShape_SubProcess_11">
- <di:waypoint xsi:type="dc:Point" x="594.0" y="286.0"/>
- <di:waypoint xsi:type="dc:Point" x="609.0" y="286.0"/>
- <di:waypoint xsi:type="dc:Point" x="624.0" y="285.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="607.0" y="286.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ExclusiveGateway_51" targetElement="_BPMNShape_ServiceTask_68">
- <di:waypoint xsi:type="dc:Point" x="1046.0" y="276.0"/>
- <di:waypoint xsi:type="dc:Point" x="1075.0" y="276.0"/>
- <di:waypoint xsi:type="dc:Point" x="1075.0" y="277.0"/>
- <di:waypoint xsi:type="dc:Point" x="1104.0" y="277.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ParallelGateway_14">
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="409.0"/>
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="467.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="60.0" x="1273.0" y="423.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_55" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1248.0" y="663.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="145.0" x="1105.0" y="678.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_28" bpmnElement="ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="1173.0" y="858.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_ParallelGateway_12">
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="713.0"/>
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="770.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1273.0" y="720.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_89" bpmnElement="notifyCSI">
- <dc:Bounds height="80.0" width="100.0" x="1173.0" y="984.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_28" targetElement="_BPMNShape_ServiceTask_89">
- <di:waypoint xsi:type="dc:Point" x="1223.0" y="938.0"/>
- <di:waypoint xsi:type="dc:Point" x="1223.0" y="984.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1220.0" y="976.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_75" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="1345.0" y="858.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_12" bpmnElement="ParallelGateway_1">
- <dc:Bounds height="50.0" width="50.0" x="1248.0" y="770.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1273.0" y="825.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_100">
- <di:waypoint xsi:type="dc:Point" x="1248.0" y="795.0"/>
- <di:waypoint xsi:type="dc:Point" x="1105.0" y="795.0"/>
- <di:waypoint xsi:type="dc:Point" x="1105.0" y="872.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1136.0" y="807.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ScriptTask_75">
- <di:waypoint xsi:type="dc:Point" x="1298.0" y="795.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="795.0"/>
- <di:waypoint xsi:type="dc:Point" x="1395.0" y="858.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1376.0" y="807.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_90" bpmnElement="notifyDB">
- <dc:Bounds height="80.0" width="100.0" x="1345.0" y="984.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_75" targetElement="_BPMNShape_ServiceTask_90">
- <di:waypoint xsi:type="dc:Point" x="1395.0" y="938.0"/>
- <di:waypoint xsi:type="dc:Point" x="1395.0" y="984.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1392.0" y="967.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_14" bpmnElement="ParallelGateway_3">
- <dc:Bounds height="50.0" width="50.0" x="1248.0" y="467.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1273.0" y="522.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ScriptTask_255">
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="517.0"/>
- <di:waypoint xsi:type="dc:Point" x="1274.0" y="552.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1270.0" y="533.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_96" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1444.0" y="671.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1462.0" y="712.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_EndEvent_96">
- <di:waypoint xsi:type="dc:Point" x="1298.0" y="688.0"/>
- <di:waypoint xsi:type="dc:Point" x="1444.0" y="689.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1320.0" y="688.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_97" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1377.0" y="1117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1395.0" y="1158.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_98" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="1205.0" y="1117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1223.0" y="1158.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ServiceTask_89" targetElement="_BPMNShape_EndEvent_98">
- <di:waypoint xsi:type="dc:Point" x="1223.0" y="1064.0"/>
- <di:waypoint xsi:type="dc:Point" x="1223.0" y="1117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1220.0" y="1187.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ScriptTask_27">
- <di:waypoint xsi:type="dc:Point" x="1248.0" y="492.0"/>
- <di:waypoint xsi:type="dc:Point" x="544.0" y="492.0"/>
- <di:waypoint xsi:type="dc:Point" x="544.0" y="326.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="269.0" x="684.0" y="467.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_100" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1080.0" y="872.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1105.0" y="927.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_28">
- <di:waypoint xsi:type="dc:Point" x="1130.0" y="897.0"/>
- <di:waypoint xsi:type="dc:Point" x="1173.0" y="898.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1148.0" y="897.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_167" bpmnElement="ScriptTask_3">
- <dc:Bounds height="80.0" width="100.0" x="941.0" y="858.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_167">
- <di:waypoint xsi:type="dc:Point" x="1080.0" y="897.0"/>
- <di:waypoint xsi:type="dc:Point" x="1041.0" y="898.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1042.0" y="898.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_96" bpmnElement="notifyCCD">
- <dc:Bounds height="80.0" width="100.0" x="942.0" y="984.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_167" targetElement="_BPMNShape_ServiceTask_96">
- <di:waypoint xsi:type="dc:Point" x="991.0" y="938.0"/>
- <di:waypoint xsi:type="dc:Point" x="992.0" y="984.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="987.0" y="974.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_150" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="974.0" y="1117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="992.0" y="1158.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ServiceTask_96" targetElement="_BPMNShape_EndEvent_150">
- <di:waypoint xsi:type="dc:Point" x="991.0" y="1064.0"/>
- <di:waypoint xsi:type="dc:Point" x="991.0" y="1090.0"/>
- <di:waypoint xsi:type="dc:Point" x="992.0" y="1117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="990.0" y="1103.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_247" bpmnElement="toggleSuccessIndicator">
- <dc:Bounds height="80.0" width="100.0" x="1383.0" y="344.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_247" targetElement="_BPMNShape_EndEvent_64">
- <di:waypoint xsi:type="dc:Point" x="1483.0" y="384.0"/>
- <di:waypoint xsi:type="dc:Point" x="1560.0" y="384.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1499.0" y="384.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_19" bpmnElement="errorHandlingSubProcess" isExpanded="true">
- <dc:Bounds height="193.0" width="353.0" x="248.0" y="866.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="catchErrors">
- <dc:Bounds height="36.0" width="36.0" x="283.0" y="945.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="40.0" x="281.0" y="986.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_213" bpmnElement="EndEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="523.0" y="945.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="541.0" y="986.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_249" bpmnElement="assignError">
- <dc:Bounds height="80.0" width="100.0" x="367.0" y="923.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_249">
- <di:waypoint xsi:type="dc:Point" x="319.0" y="963.0"/>
- <di:waypoint xsi:type="dc:Point" x="367.0" y="963.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="346.0" y="963.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_249" targetElement="_BPMNShape_EndEvent_213">
- <di:waypoint xsi:type="dc:Point" x="467.0" y="963.0"/>
- <di:waypoint xsi:type="dc:Point" x="523.0" y="963.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="492.0" y="963.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="toggleSuccess">
- <dc:Bounds height="80.0" width="100.0" x="1224.0" y="552.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_ExclusiveGateway_55">
- <di:waypoint xsi:type="dc:Point" x="1274.0" y="632.0"/>
- <di:waypoint xsi:type="dc:Point" x="1274.0" y="646.0"/>
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="646.0"/>
- <di:waypoint xsi:type="dc:Point" x="1273.0" y="663.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1271.0" y="646.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_22" bpmnElement="BoundaryEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1427.0" y="1005.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_214" bpmnElement="EndEvent_6">
- <dc:Bounds height="36.0" width="36.0" x="1488.0" y="1005.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1506.0" y="1046.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_BoundaryEvent_22" targetElement="_BPMNShape_EndEvent_214">
- <di:waypoint xsi:type="dc:Point" x="1463.0" y="1023.0"/>
- <di:waypoint xsi:type="dc:Point" x="1488.0" y="1023.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ServiceTask_90" targetElement="_BPMNShape_EndEvent_97">
- <di:waypoint xsi:type="dc:Point" x="1395.0" y="1064.0"/>
- <di:waypoint xsi:type="dc:Point" x="1395.0" y="1117.0"/>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn
deleted file mode 100644
index 06aeafb926..0000000000
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn
+++ /dev/null
@@ -1,287 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="DoDeleteVfModule" name="DoDeleteVfModule" isExecutable="true">
- <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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&#xD;&#xA;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&#xD;&#xA;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="DoDVfMod_vfModuleFromAAI"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_42</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="VNFAdapterPrep"/>
- <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke&#xD;&#xA;SDNCAdapterV1" calledElement="sdncAdapter">
- <bpmn2:extensionElements>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
-def dvm = new DoDeleteVfModule()
-dvm.prepVNFAdapterRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1"/>
- <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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&#xD;&#xA;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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="InvokeVNFAdapterRestV1" targetRef="UpdateAAIVfModulePrep"/>
- <bpmn2:endEvent id="EndEvent_9">
- <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke&#xD;&#xA;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&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.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 com.att.bpm.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 com.att.bpm.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 com.att.bpm.scripts.*
-def dvm = new DoDeleteVfModule()
-dvm.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule"/>
- <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:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <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 height="36.0" width="36.0" x="34.0" y="57.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="52.0" y="98.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
- <dc:Bounds height="80.0" width="100.0" x="144.0" y="36.0"/>
- </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.0" y="75.0"/>
- <di:waypoint xsi:type="dc:Point" x="144.0" y="76.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="104.0" y="0.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">
- <dc:Bounds height="80.0" width="100.0" x="480.0" y="36.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="PrepareUpdateAAIVfModulePrep">
- <dc:Bounds height="80.0" width="100.0" x="315.0" y="36.0"/>
- </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.0" y="76.0"/>
- <di:waypoint xsi:type="dc:Point" x="315.0" y="76.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="269.0" y="0.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
- <dc:Bounds height="80.0" width="100.0" x="83.0" y="187.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
- <dc:Bounds height="80.0" width="100.0" x="216.0" y="188.0"/>
- </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="183.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="216.0" y="228.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="24.0" y="81.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
- <dc:Bounds height="80.0" width="100.0" x="347.0" y="187.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_CallActivity_13" targetElement="_BPMNShape_ScriptTask_171">
- <di:waypoint xsi:type="dc:Point" x="316.0" y="228.0"/>
- <di:waypoint xsi:type="dc:Point" x="331.0" y="228.0"/>
- <di:waypoint xsi:type="dc:Point" x="331.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="347.0" y="227.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="44.0" y="79.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
- <dc:Bounds height="80.0" width="100.0" x="479.0" y="187.0"/>
- </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="447.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="479.0" y="227.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="76.0" y="79.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
- <dc:Bounds height="80.0" width="100.0" x="84.0" y="343.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
- <dc:Bounds height="80.0" width="100.0" x="216.0" y="343.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
- <dc:Bounds height="80.0" width="100.0" x="480.0" y="343.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
- <dc:Bounds height="80.0" width="100.0" x="605.0" y="343.0"/>
- </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="579.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="623.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="623.0" y="308.0"/>
- <di:waypoint xsi:type="dc:Point" x="53.0" y="308.0"/>
- <di:waypoint xsi:type="dc:Point" x="53.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="84.0" y="383.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="596.0" y="139.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="184.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="200.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="200.0" y="384.0"/>
- <di:waypoint xsi:type="dc:Point" x="216.0" y="384.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="209.0" y="236.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="316.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="348.0" y="383.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="329.0" y="383.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="580.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="605.0" y="383.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="593.0" y="383.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
- <dc:Bounds height="36.0" width="36.0" x="738.0" y="365.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="756.0" y="406.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="705.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="738.0" y="383.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="730.0" y="383.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.0" y="76.0"/>
- <di:waypoint xsi:type="dc:Point" x="480.0" y="76.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="440.0" y="0.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="580.0" y="76.0"/>
- <di:waypoint xsi:type="dc:Point" x="620.0" y="76.0"/>
- <di:waypoint xsi:type="dc:Point" x="620.0" y="156.0"/>
- <di:waypoint xsi:type="dc:Point" x="48.0" y="156.0"/>
- <di:waypoint xsi:type="dc:Point" x="48.0" y="199.0"/>
- <di:waypoint xsi:type="dc:Point" x="48.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="83.0" y="227.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="596.0" y="0.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="validateSDNCResponse">
- <dc:Bounds height="80.0" width="100.0" x="348.0" y="343.0"/>
- </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="448.0" y="383.0"/>
- <di:waypoint xsi:type="dc:Point" x="480.0" y="383.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="453.0" y="383.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF b/bpmn/MSOInfrastructureBPMN/WebContent/META-INF/MANIFEST.MF
index 254272e1c0..5e9495128c 100644
--- a/bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF
+++ b/bpmn/MSOInfrastructureBPMN/WebContent/META-INF/MANIFEST.MF
@@ -1,3 +1,3 @@
-Manifest-Version: 1.0
-Class-Path:
-
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/bpmn/MSOGammaBPMN/pom.xml b/bpmn/MSOInfrastructureBPMN/pom.xml
index 26ea278c53..ca9ce57912 100644
--- a/bpmn/MSOGammaBPMN/pom.xml
+++ b/bpmn/MSOInfrastructureBPMN/pom.xml
@@ -1,325 +1,389 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>bpmn</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSOGammaBPMN</artifactId>
- <packaging>war</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- <failOnMissingWebXml>false</failOnMissingWebXml>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-codegen-plugin</artifactId>
- <version>2.5.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <additionalProjectnatures>
- <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
- </additionalProjectnatures>
- <sourceIncludes>
- <sourceInclude>**/*.groovy</sourceInclude>
- </sourceIncludes>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>compile</id>
- <phase>compile</phase>
- <configuration>
- <tasks>
- <mkdir dir="${basedir}/src/main/groovy" />
- <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
- <classpath refid="maven.compile.classpath" />
- </taskdef>
- <mkdir dir="${project.build.outputDirectory}" />
- <groovyc destdir="${project.build.outputDirectory}"
- srcdir="${basedir}/src/main/groovy/" listfiles="true">
- <classpath refid="maven.compile.classpath" />
- </groovyc>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>test-compile</id>
- <phase>test-compile</phase>
- <configuration>
- <tasks>
- <mkdir dir="${basedir}/src/test/groovy" />
- <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
- <classpath refid="maven.test.classpath" />
- </taskdef>
- <mkdir dir="${project.build.testOutputDirectory}" />
- <groovyc destdir="${project.build.testOutputDirectory}"
- srcdir="${basedir}/src/test/groovy/" listfiles="true">
- <classpath refid="maven.test.classpath" />
- </groovyc>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings
- only. It has no influence on the Maven build itself. -->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- org.apache.maven.plugins
- </groupId>
- <artifactId>
- maven-antrun-plugin
- </artifactId>
- <versionRange>
- [1.3,)
- </versionRange>
- <goals>
- <goal>run</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <dependencies>
- <dependency>
- <!-- process engine, in compile scope to include it in the war file -->
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine</artifactId>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- Using the `DefaultEjbProcessApplication` result in: `java.sql.SQLException:
- You cannot commit during a managed transaction!` -->
- <dependency>
- <!-- CDI integration, needs to be included in WAR, otherwise CDI can not
- work correctly -->
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine-cdi</artifactId>
- </dependency>
-
- <dependency>
- <!-- AssertJ Testing Library -->
- <groupId>org.camunda.bpm.extension</groupId>
- <artifactId>camunda-bpm-assert</artifactId>
- <version>1.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.10.19</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <!-- Optional Plugin for Camunda BPM Workbench -->
- <groupId>org.camunda.bpm.workbench</groupId>
- <artifactId>camunda-workbench-dist-embeddable</artifactId>
- <version>1.0.0-alpha8</version>
- <scope>test</scope>
- </dependency>
-
- <!-- Spin dataformat support, in compile scope to include it in the war
- file -->
- <dependency>
- <groupId>org.camunda.spin</groupId>
- <artifactId>camunda-spin-dataformat-all</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine-plugin-spin</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine-plugin-connect</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <!-- Bootstrap for styling via Webjars project -->
- <groupId>org.webjars</groupId>
- <artifactId>bootstrap</artifactId>
- <version>2.3.2</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-client</artifactId>
- <version>3.0.19.Final</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <!-- Needed for InMemoryH2Test -->
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.uuid</groupId>
- <artifactId>java-uuid-generator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.4</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSOCoreBPMN</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <!-- unit test utilities -->
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSOCoreBPMN</artifactId>
- <version>${project.version}</version>
- <classifier>test</classifier>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>2.0</version>
- </dependency>
- <!-- for encoding the url the same way A&AI does -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>4.3.2.RELEASE</version>
- </dependency>
-
- <dependency>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSORESTClient</artifactId>
- <version>${project.version}</version>
- </dependency>
-
-<!-- Took from MockServer modules after removing it to avoid class file for javax.servlet.ServletContextListener not found -->
- <dependency>
- <groupId>com.github.tomakehurst</groupId>
- <artifactId>wiremock</artifactId>
- <version>1.56</version>
- <classifier>standalone</classifier>
- <exclusions>
- <exclusion>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.skyscreamer</groupId>
- <artifactId>jsonassert</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.jayway.jsonpath</groupId>
- <artifactId>json-path</artifactId>
- </exclusion>
- <exclusion>
- <groupId>net.sf.jopt-simple</groupId>
- <artifactId>jopt-simple</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>MSOInfrastructureBPMN</artifactId>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>default-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.class</exclude>
+<!-- <exclude>META-INF/</exclude> -->
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
+ <type>jar</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>2.5.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <additionalProjectnatures>
+ <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
+ </additionalProjectnatures>
+ <sourceIncludes>
+ <sourceInclude>**/*.groovy</sourceInclude>
+ </sourceIncludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${basedir}/src/main/groovy" />
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
+ <classpath refid="maven.compile.classpath" />
+ </taskdef>
+ <mkdir dir="${project.build.outputDirectory}" />
+ <groovyc destdir="${project.build.outputDirectory}"
+ srcdir="${basedir}/src/main/groovy/" listfiles="true">
+ <classpath refid="maven.compile.classpath" />
+ </groovyc>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${basedir}/src/test/groovy" />
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
+ <classpath refid="maven.test.classpath" />
+ </taskdef>
+ <mkdir dir="${project.build.testOutputDirectory}" />
+ <groovyc destdir="${project.build.testOutputDirectory}"
+ srcdir="${basedir}/src/test/groovy/" listfiles="true">
+ <classpath refid="maven.test.classpath" />
+ </groovyc>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.apache.maven.plugins
+ </groupId>
+ <artifactId>
+ maven-antrun-plugin
+ </artifactId>
+ <versionRange>
+ [1.3,)
+ </versionRange>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <!-- process engine, in compile scope to include it in the war file -->
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine</artifactId>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- Using the `DefaultEjbProcessApplication` result in: `java.sql.SQLException:
+ You cannot commit during a managed transaction!` -->
+ <dependency>
+ <!-- CDI integration, needs to be included in WAR, otherwise CDI can not
+ work correctly -->
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-cdi</artifactId>
+ </dependency>
+
+ <dependency>
+ <!-- AssertJ Testing Library -->
+ <groupId>org.camunda.bpm.extension</groupId>
+ <artifactId>camunda-bpm-assert</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.10.19</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <!-- Optional Plugin for Camunda BPM Workbench -->
+ <groupId>org.camunda.bpm.workbench</groupId>
+ <artifactId>camunda-workbench-dist-embeddable</artifactId>
+ <version>1.0.0-alpha8</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Spin dataformat support, in compile scope to include it in the war
+ file -->
+ <dependency>
+ <groupId>org.camunda.spin</groupId>
+ <artifactId>camunda-spin-dataformat-all</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-plugin-spin</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine-plugin-connect</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <!-- Bootstrap for styling via Webjars project -->
+ <groupId>org.webjars</groupId>
+ <artifactId>bootstrap</artifactId>
+ <version>2.3.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-client</artifactId>
+ <version>3.0.19.Final</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <!-- Needed for InMemoryH2Test -->
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.uuid</groupId>
+ <artifactId>java-uuid-generator</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCoreBPMN</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCommonBPMN</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCommonBPMN</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <!-- unit test utilities -->
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOCoreBPMN</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <!-- for encoding the url the same way A&AI does -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>4.3.2.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOMockServer</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <classifier>classes</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSORESTClient</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.github.tomakehurst</groupId>
+ <artifactId>wiremock</artifactId>
+ <version>1.56</version>
+ <scope>test</scope>
+ <classifier>standalone</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.skyscreamer</groupId>
+ <artifactId>jsonassert</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.jayway.jsonpath</groupId>
+ <artifactId>json-path</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.sf.jopt-simple</groupId>
+ <artifactId>jopt-simple</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
</project> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy
new file mode 100644
index 0000000000..88e2396078
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericMacroServiceNetworkVnf.groovy
@@ -0,0 +1,752 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>CreateGenericMacroServiceNetworkVnf.bpmn</class> process.
+ *
+ */
+public class CreateGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="CREVAS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("createGenericMacroServiceNetworkVnfRequest", "")
+ execution.setVariable("globalSubscriberId", "")
+ execution.setVariable("serviceInstanceName", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable("CREVAS_NetworksCreatedCount", 0)
+ execution.setVariable("CREVAS_VnfsCreatedCount", 0)
+ execution.setVariable("productFamilyId", "")
+
+
+ //TODO
+ execution.setVariable("sdncVersion", "1702")
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // check for incoming json message/input
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(createGenericMacroServiceNetworkVnfRequest)
+ execution.setVariable("createGenericMacroServiceNetworkVnfRequest", createGenericMacroServiceNetworkVnfRequest);
+ println 'createGenericMacroServiceNetworkVnfRequest - ' + createGenericMacroServiceNetworkVnfRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ utils.log("DEBUG", " Generated new Service Instance: " + serviceInstanceId , isDebugEnabled)
+ } else {
+ utils.log("DEBUG", "Using provided Service Instance ID: " + serviceInstanceId , isDebugEnabled)
+ }
+
+ serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ String source = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ execution.setVariable("source", "VID")
+ } else {
+ execution.setVariable("source", source)
+ }
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "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(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
+
+ String suppressRollback = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String productFamilyId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("CREVAS_requestInfo", requestInfo)
+
+ utils.log("DEBUG", " ***** Completed preProcessRequest CreateGenericMacroServiceNetworkVnf Request ***** ", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareCreateServiceInstance(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+ String serviceModelInfo = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo")
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ String serviceInputParams = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestParameters")
+ execution.setVariable("serviceInputParams", serviceInputParams)
+
+ String serviceInstanceName = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.instanceName")
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+
+ utils.log("DEBUG", " ***** Completed prepareCreateServiceInstance of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareCreateService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ public void postProcessServiceInstanceCreate (Execution execution){
+ def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' +'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+
+ try {
+
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <serviceInstanceName>${serviceInstanceName}</serviceInstanceName>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+ execution.setVariable("CREVAS_setUpdateDbInstancePayload", payload)
+ utils.logAudit("CREVAS_setUpdateDbInstancePayload: " + payload)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ //println("CMSO_updateDBStatusToSuccessPayload --> " + execution.getVariable("CMSO_updateDBStatusToSuccessPayload"))
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+ }
+
+
+ public void callDBCatalog (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside callDBCatalog() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+
+ // get variable within incoming json
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest");
+
+ String catalog_db_endpoint = execution.getVariable("URN_mso_catalog_db_endpoint")
+ utils.log("DEBUG", "catalog_db_endpoint: "+catalog_db_endpoint, isDebugEnabled)
+
+ String serviceModelInvariantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelInvariantId")
+ String serviceModelVersion = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.modelInfo.modelVersion")
+ utils.log("DEBUG", "getting network list ", isDebugEnabled)
+
+ JSONArray networkList = catalogDbUtils.getAllNetworksByServiceModelInvariantUuidAndServiceModelVersion(catalog_db_endpoint, serviceModelInvariantId, serviceModelVersion)
+
+ //utils.log("DEBUG", "got network list: "+ networkList.toString(), isDebugEnabled)
+ execution.setVariable("networkList", networkList)
+ execution.setVariable("networkListString", networkList.toString())
+
+ networkList = execution.getVariable("networkList");
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ if (networkList != null && networkList.length() > 0) {
+
+ execution.setVariable("CREVAS_NetworksCount", networkList.length())
+ utils.log("DEBUG", "networks to create: "+ networkList.length(), isDebugEnabled)
+ } else {
+ execution.setVariable("CREVAS_NetworksCount", 0)
+ utils.log("DEBUG", "no networks to create based upon Catalog DB response", isDebugEnabled)
+ }
+
+ // VNFs
+ JSONArray vnfList = catalogDbUtils.getAllVnfsByServiceModelInvariantUuidAndServiceModelVersion(catalog_db_endpoint, serviceModelInvariantId, serviceModelVersion)
+ execution.setVariable("vnfList", vnfList)
+
+ String vnfModelInfoString = ""
+ if (vnfList != null && vnfList.length() > 0) {
+ execution.setVariable("CREVAS_VNFsCount", vnfList.length())
+ utils.log("DEBUG", "vnfs to create: "+ vnfList.length(), isDebugEnabled)
+ JSONObject vnfModelInfo = vnfList.getJSONObject(0).getJSONObject("modelInfo")
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ execution.setVariable("CREVAS_VNFsCount", 0)
+ utils.log("DEBUG", "no vnfs to create based upon Catalog DB response", isDebugEnabled)
+ }
+
+ execution.setVariable("vnfModelInfo", vnfModelInfoString)
+ //utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed callDBCatalog() of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. callDBCatalog() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareNetworkCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside preparenNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+// String disableRollback = execution.getVariable("disableRollback")
+// def backoutOnFailure = ""
+// if(disableRollback != null){
+// if ( disableRollback == true) {
+// backoutOnFailure = "false"
+// } else if ( disableRollback == false) {
+// backoutOnFailure = "true"
+// }
+// }
+ //failIfExists - optional
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+
+ JSONArray networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "array networkList: "+ networkList, isDebugEnabled)
+
+ if (networkList == null || networkList.length() < 1){
+ networkList = new JSONArray(execution.getVariable("networkListString"))
+ utils.log("DEBUG", "array from string networkList: "+ networkList, isDebugEnabled)
+ }
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ String networkModelInfoString = ""
+
+ if (networkList != null) {
+ utils.log("DEBUG", " getting model info for network # :" + networksCreatedCount, isDebugEnabled)
+ JSONObject networkModelInfo = networkList.getJSONObject(networksCreatedCount.intValue()).getJSONObject("modelInfo")
+ networkModelInfoString = networkModelInfo.toString()
+ } else {
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected number of networks to create - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ execution.setVariable("networkModelInfo", networkModelInfoString)
+ utils.log("DEBUG", " networkModelInfoString :" + networkModelInfoString, isDebugEnabled)
+
+// String networkModelInfo = execution.getVariable("networkModelInfo")
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+ utils.log("DEBUG", "vnfList: "+ vnfList, isDebugEnabled)
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ utils.log("DEBUG", "vnfModelInfo: "+ vnfModelInfo, isDebugEnabled)
+
+ networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed preparenNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareNetworkCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section -> increment count
+ // *******************************
+ public void validateNetworkCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ networksCreatedCount++
+
+ execution.setVariable("CREVAS_NetworksCreatedCount", networksCreatedCount)
+
+ execution.setVariable("DCRENI_rollbackData"+networksCreatedCount, execution.getVariable("DCRENI_rollbackData"))
+
+ utils.log("DEBUG", "networksCreatedCount: "+ networksCreatedCount, isDebugEnabled)
+ utils.log("DEBUG", "DCRENI_rollbackData N : "+ execution.getVariable("DCRENI_rollbackData"+networksCreatedCount), isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+ utils.log("DEBUG", "vnfList: "+ vnfList, isDebugEnabled)
+
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ utils.log("DEBUG", "vnfModelInfo: "+ vnfModelInfo, isDebugEnabled)
+
+ JSONArray networkList = execution.getVariable("networkList")
+ utils.log("DEBUG", "networkList: "+ networkList, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed validateNetworkCreate of CreateGenericMacroServiceNetworkVnf ***** "+" network # "+networksCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateNetworkCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareVnfAndModulesCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareVnfAndModulesCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ // String disableRollback = execution.getVariable("disableRollback")
+ // def backoutOnFailure = ""
+ // if(disableRollback != null){
+ // if ( disableRollback == true) {
+ // backoutOnFailure = "false"
+ // } else if ( disableRollback == false) {
+ // backoutOnFailure = "true"
+ // }
+ // }
+ //failIfExists - optional
+
+ String createGenericMacroServiceNetworkVnfRequest = execution.getVariable("createGenericMacroServiceNetworkVnfRequest")
+ String productFamilyId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG","productFamilyId: "+ productFamilyId, isDebugEnabled)
+
+ JSONArray vnfList = execution.getVariable("vnfList")
+
+ Integer vnfsCreatedCount = execution.getVariable("CREVAS_VnfsCreatedCount")
+ String vnfModelInfoString = null;
+
+ if (vnfList != null && vnfList.length() > 0 ) {
+ utils.log("DEBUG", "getting model info for vnf # " + vnfsCreatedCount, isDebugEnabled)
+ JSONObject vnfModelInfo1 = vnfList.getJSONObject(0).getJSONObject("modelInfo")
+ utils.log("DEBUG", "got 0 ", isDebugEnabled)
+ JSONObject vnfModelInfo = vnfList.getJSONObject(vnfsCreatedCount.intValue()).getJSONObject("modelInfo")
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ //TODO: vnfList does not contain data. Need to investigate why ... . Fro VIPR use model stored
+ vnfModelInfoString = execution.getVariable("vnfModelInfo")
+ }
+
+ utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(createGenericMacroServiceNetworkVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareVnfAndModulesCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareVnfAndModulesCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateVnfCreate of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer vnfsCreatedCount = execution.getVariable("CREVAS_VnfsCreatedCount")
+ vnfsCreatedCount++
+
+ execution.setVariable("CREVAS_VnfsCreatedCount", vnfsCreatedCount)
+
+ utils.log("DEBUG", " ***** Completed validateVnfCreate of CreateGenericMacroServiceNetworkVnf ***** "+" vnf # "+vnfsCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateVnfCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section -> decrement count
+ // *******************************
+ public void validateNetworkRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ Integer networksCreatedCount = execution.getVariable("CREVAS_NetworksCreatedCount")
+ networksCreatedCount--
+
+ execution.setVariable("CREVAS_NetworksCreatedCount", networksCreatedCount)
+
+ execution.setVariable("DCRENI_rollbackData", execution.getVariable("DCRENI_rollbackData"+networksCreatedCount))
+
+ utils.log("DEBUG", " ***** Completed validateNetworkRollback of CreateGenericMacroServiceNetworkVnf ***** "+" network # "+networksCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method validateNetworkRollback() - " + ex.getMessage()
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ execution.setVariable("CREVAS_NetworksCreatedCount", 0)
+ utils.log("ERROR", exceptionMessage, true)
+ }
+ }
+ // *******************************
+ // Build DB request Section
+ // *******************************
+// public void prepareDBRequest (Execution execution) {
+// def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+//
+// try {
+// utils.log("DEBUG", " ***** Inside prepareDBRequest of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+//
+// String requestId = execution.getVariable("CREVAS_requestId")
+// String statusMessage = "vIPR ATM Service Instance successfully created."
+// String serviceInstanceId = execution.getVariable("CREVAS_serviceInstanceId")
+//
+// //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.openecomp.mso/requestsdb">
+// <requestId>${requestId}</requestId>
+// <lastModifiedBy>BPMN</lastModifiedBy>
+// <statusMessage>${statusMessage}</statusMessage>
+// <responseBody></responseBody>
+// <requestStatus>COMPLETED</requestStatus>
+// <progress>100</progress>
+// <vnfOutputs/>
+// <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+// </ns:updateInfraRequest>
+// </soapenv:Body>
+// </soapenv:Envelope>"""
+//
+// String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+// execution.setVariable("CREVAS_createDBRequest", buildDeleteDBRequestAsString)
+// utils.logAudit(buildDeleteDBRequestAsString)
+//
+// utils.log("DEBUG", " ***** Completed prepareDBRequest of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+// } catch (Exception ex) {
+// // try error in method block
+// String exceptionMessage = "Bpmn error encountered in CreateGenericMacroServiceNetworkVnf flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+//
+// }
+//
+// }
+
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <status-message>Service Instance has been created successfully via macro orchestration</status-message>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <mso-bpel-name>BPMN macro create</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable("CREVAS_Success", true)
+ execution.setVariable("CREVAS_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void preProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ utils.log("DEBUG", "BPMN Error during preProcessRollback", isDebugEnabled)
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit preProcessRollback of CreateGenericMacroServiceNetworkVnf *** ", isDebugEnabled)
+ }
+
+ public void postProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessRollback of CreateGenericMacroServiceNetworkVnf ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Setting prevException to WorkflowException: ", isDebugEnabled)
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ } catch (BpmnError b) {
+ utils.log("DEBUG", "BPMN Error during postProcessRollback", isDebugEnabled)
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit postProcessRollback of CreateGenericMacroServiceNetworkVnf *** ", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " *** STARTED CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable("CREVAS_requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ //TODO. hmmm. there is no way to UPDATE error message.
+// String errorMessage = wfex.getErrorMessage()
+// boolean successIndicator = execution.getVariable("DCRESI_rollbackSuccessful")
+// if (successIndicator){
+// errorMessage = errorMessage + ". Rollback successful."
+// } else {
+// errorMessage = errorMessage + ". Rollback not completed."
+// }
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("CREVAS_falloutRequest", falloutRequest)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED CreateGenericMacroServiceNetworkVnf prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncError() of CreateServiceInstanceInfra ***** ", isDebugEnabled)
+
+ 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.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("CRESI_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("CRESI_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
new file mode 100644
index 0000000000..11de8d9819
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
@@ -0,0 +1,453 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>CreateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class CreateNetworkInstance extends AbstractServiceTaskProcessor {
+ String Prefix="CRENI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public InitializeProcessVariables(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of CreateNetworkInstance Request ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "Received 'suppressRollback': " + disableRollback , isDebugEnabled)
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ utils.log("DEBUG", " Set 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' TEST ONLY, sdncVersion = '1702'
+ utils.log("DEBUG", " 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ }
+
+ // 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String createNetworkRestRequest = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + createNetworkRestRequest, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, createNetworkRestRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateNetworkInstance flow. sendSyncResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void getNetworkModelInfo (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside getNetworkModelInfo() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // "networkModelInfo" is expected to be sent
+ String networkModelInfo = execution.getVariable("networkModelInfo")
+ utils.log("DEBUG", " networkModelInfo - " + networkModelInfo, isDebugEnabled)
+
+ // "serviceModelInfo" is expected to be sent
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+ utils.log("DEBUG", " serviceModelInfo - " + serviceModelInfo, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncError() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ 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) {
+ utils.log("DEBUG", " Bpmn error encountered in CreateNetworkInstance flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareDBRequestError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequestError() of CreateNetworkInstance ***** ", 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.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable(Prefix + "createDBRequest", dbRequest)
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+ utils.logAudit(dbRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareDBRequestError() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCompletion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareCompletion() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>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)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ utils.log("DEBUG", " ***** CreateNetworkInstance Success ***** ", isDebugEnabled)
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ utils.log("DEBUG", " ***** CreateNetworkInstance Failed in CompletionMsoProces flow!. ***** ", isDebugEnabled)
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processRollbackData (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside processRollbackData() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ //execution.getVariable("orchestrationStatus")
+ //execution.getVariable("networkId")
+ //execution.getVariable("networkName")
+ //networkOutputParams
+ //rollbackData
+ //rolledBack
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Bpmn error encountered in CreateNetworkInstance flow. callDBCatalog() - " + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+ 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.logAudit(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String errorException = " Bpmn error encountered in CreateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ utils.log("DEBUG", errorException, isDebugEnabled)
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ }
+
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ 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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy
new file mode 100644
index 0000000000..2205ffd696
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateServiceInstance.groovy
@@ -0,0 +1,262 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>CreateServiceInstance.bpmn</class> process.
+ * AlaCarte flow for 1702 ServiceInstance Create
+ *
+ */
+public class CreateServiceInstance extends AbstractServiceTaskProcessor {
+ String Prefix="CRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ utils.log("DEBUG", " *** preProcessRequest() *** ", isDebugEnabled)
+
+ try {
+
+ String siRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(siRequest)
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ utils.log("DEBUG", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ }
+ utils.log("DEBUG", "Generated new Service Instance:" + serviceInstanceId, isDebugEnabled)
+ 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"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ //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"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else
+ {
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ }
+
+ utils.log("DEBUG", "modelInfo" + serviceModelInfo, isDebugEnabled)
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+
+ //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()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ 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()
+ utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + createServiceRestRequest, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, createServiceRestRequest)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncError *** ", isDebugEnabled)
+
+ 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.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareCompletionRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <status-message>Service Instance was created successfully.</status-message>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <mso-bpel-name>CreateServiceInstance</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareFalloutRequest *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
+ 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ utils.log("DEBUG", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
index fa80c76e77..573deb4155 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
@@ -1,35 +1,42 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
import groovy.json.JsonSlurper
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
import org.apache.commons.lang3.*
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
-
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
/**
* Validates the request message and sets up the workflow.
* @param execution the execution
@@ -59,6 +66,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
def incomingRequest = execution.getVariable('bpmnRequest')
utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)
+ utils.logAudit("CreateVfModule Infra incoming Request: " + incomingRequest)
// check if request is xml or json
try {
@@ -82,7 +90,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
}
catch(groovy.json.JsonException je) {
utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
- workflowException(execution, "Invalid request format", 400)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
}
catch(Exception e) {
@@ -90,7 +98,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
//execution.setVariable("CVFMODVOL2_RESTFault", restFaultMessage)
//execution.setVariable("CVFMODVOL2_isDataOk", false)
utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
- workflowException(execution, restFaultMessage, 400)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
}
try {
@@ -126,10 +134,9 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
logDebug('Exited ' + method, isDebugLogEnabled)
} catch (BpmnError bpmnError) {
- buildErrorResponse(execution,bpmnError.getMessage(),"400")
throw bpmnError
} catch (Exception exception) {
- workflowException(execution, exception.getMessage(), 400)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
}
}
@@ -177,12 +184,13 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
sendWorkflowResponse(execution, 200, synchResponse)
+ utils.logAudit("CreateVfModule Infra Response: " + synchResponse)
logDebug('Exited ' + method, isDebugLogEnabled)
} catch (BpmnError e) {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -202,11 +210,23 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
utils.log("DEBUG", "requestInfo is: " + requestInfo, isDebugEnabled)
utils.log("DEBUG", "action is: " + action, isDebugEnabled)
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
String payload =
- """ <aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:ns8="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:ns8="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
${requestInfo}
</request-info>
<ns8:status-message>Vf Module has been created successfully.</ns8:status-message>
@@ -216,6 +236,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
payload = utils.formatXml(payload)
execution.setVariable("CVFMI_SuccessFlag", true)
execution.setVariable("CVFMI_msoCompletionRequest", payload)
+ utils.logAudit("CreateVfModuleInfra completion request: " + payload)
utils.log("DEBUG", "Outgoing MsoCompletionRequest: \n" + payload, isDebugEnabled)
}catch(Exception e){
@@ -247,7 +268,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
def prefix = execution.getVariable("prefix")
if (prefix == null) {
- createWorkflowException(execution, 1002, processKey + " prefix is null")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
}
try {
@@ -266,27 +287,28 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
}
if (request == null) {
- createWorkflowException(execution, 1002, processKey + " request is null")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
}
/*
- def requestId = execution.getVariable("att-mso-request-id")
+ def requestId = execution.getVariable("mso-request-id")
if (requestId == null) {
- createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
}
setVariable(execution, prefix + 'requestId', requestId)
- def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
if (serviceInstanceId == null) {
- createWorkflowException(execution, 1002, processKey + " request message has no att-mso-service-instance-id")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
}
utils.logContext(requestId, serviceInstanceId)
*/
+ utils.logAudit("CreateVfModule incoming request: " + request)
logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
logDebug('Exited ' + method, isDebugLogEnabled)
return request
@@ -294,7 +316,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, "Invalid Message")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
}
}
@@ -316,19 +338,31 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
String payload =
"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://com.att.mso/requestsdb">
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${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://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:aetgt="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"&gt;&lt;vnf-id&gt;${vnfId}&lt;/vnf-id&gt;&lt;vf-module-id&gt;${vfModuleId}&lt;/vf-module-id&gt;&lt;/vnf-outputs&gt;</vnfOutputs>
+ <vnfOutputs>&lt;vnf-outputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:aetgt="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"&gt;&lt;vnf-id&gt;${vnfId}&lt;/vnf-id&gt;&lt;vf-module-id&gt;${vfModuleId}&lt;/vf-module-id&gt;&lt;/vnf-outputs&gt;</vnfOutputs>
<vfModuleId>${vfModuleId}</vfModuleId>
</ns:updateInfraRequest>
</soapenv:Body>
@@ -337,7 +371,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
payload = utils.formatXml(payload)
execution.setVariable("CVFMI_updateInfraRequest", payload)
utils.log("DEBUG", "Outgoing UpdateInfraRequest: \n" + payload, isDebugEnabled)
-
+ utils.logAudit("CreateVfModuleInfra Outgoing UpdateInfra Request: " + payload)
}catch(Exception e){
utils.log("ERROR", "Exception Occured Processing prepareUpdateInfraRequest. Exception is:\n" + e, isDebugEnabled)
@@ -373,10 +407,10 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
}
String content = """
- <aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
- xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
- xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+ <aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
${requestInformation}
<aetgt:WorkflowException>
<aetgt:ErrorMessage>${encErrorResponseMsg}</aetgt:ErrorMessage>
@@ -388,6 +422,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
logDebug("CONTENT before translation: " + content, isDebugLogEnabled)
content = utils.formatXml(content)
logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ utils.logAudit("CreateVfModuleInfra FallOutHander Request: " + content)
execution.setVariable(resultVar, content)
logDebug('Exited ' + method, isDebugLogEnabled)
@@ -395,7 +430,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 2000, 'Internal Error')
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
}
}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
index 672bb34a78..289e185522 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
@@ -1,285 +1,304 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import groovy.json.JsonSlurper
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.lang3.*
-
-class CreateVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
-
- public static final String prefix='CVMVINFRAV1_'
-
- /**
- * Perform initial processing, such as request validation, initialization of variables, etc.
- * * @param execution
- */
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- preProcessRequest(execution, isDebugEnabled)
- }
-
-
- /**
- * Perform initial processing, such as request validation, initialization of variables, etc.
- * @param execution
- * @param isDebugEnabled
- */
- public void preProcessRequest (Execution execution, isDebugEnabled) {
-
- execution.setVariable("prefix",prefix)
- setSuccessIndicator(execution, false)
- execution.setVariable(prefix+'syncResponseSent', false)
-
- String createVolumeIncoming = validateRequest(execution, 'vnfId')
- utils.logAudit(createVolumeIncoming)
-
- try {
- def jsonSlurper = new JsonSlurper()
- Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
-
- def serviceInstanceId = execution.getVariable('serviceInstanceId')
- def vnfId = execution.getVariable('vnfId')
-
- def vidUtils = new VidUtils(this)
- createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', serviceInstanceId)
-
- execution.setVariable(prefix+'Request', createVolumeIncoming)
- execution.setVariable(prefix+'vnfId', vnfId)
- execution.setVariable(prefix+'isVidRequest', true)
-
- utils.log("DEBUG", "XML request:\n" + createVolumeIncoming, isDebugEnabled)
-
- }
- catch(groovy.json.JsonException je) {
- (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'Request is not a valid JSON document')
- }
-
- execution.setVariable(prefix+'source', utils.getNodeText1(createVolumeIncoming, "source"))
- execution.setVariable(prefix+'volumeGroupName', utils.getNodeText1(createVolumeIncoming, 'volume-group-name'))
- execution.setVariable(prefix+'volumeOutputs', utils.getNodeXml(createVolumeIncoming, 'volume-outputs', false))
-
- execution.setVariable(prefix+'serviceType', 'service-instance')
- execution.setVariable(prefix+'serviceInstanceId', utils.getNodeText1(createVolumeIncoming, "service-instance-id"))
-
- // Generate volume group id
- String volumeGroupId = UUID.randomUUID()
- utils.log("DEBUG", "Generated volume group id: " + volumeGroupId, isDebugEnabled)
-
- def testGroupId = execution.getVariable('test-volume-group-id')
- if (testGroupId != null && testGroupId.trim() != '') {
- volumeGroupId = testGroupId
- }
-
- execution.setVariable(prefix+'volumeGroupId', volumeGroupId)
-
- }
-
-
- public void sendSyncResponse (Execution execution, isDebugEnabled) {
- def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
- def requestId = execution.getVariable("att-mso-request-id")
- def serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- String syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", "Sync Response: " + "\n" + syncResponse, isDebugEnabled)
- sendWorkflowResponse(execution, 200, syncResponse)
-
- execution.setVariable(prefix+'syncResponseSent', true)
- }
-
-
- public void sendSyncError (Execution 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(Execution execution, int errorCode, errorMessage, isDebugEnabled) {
- utils.log("DEBUG", errorMessage, isDebugEnabled)
- (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
- }
-
-
- public void prepareDbInfraSuccessRequest(Execution execution, isDebugEnabled) {
- def dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
- def requestId = execution.getVariable('att-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://com.att.mso/requestsdb">
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <responseBody></responseBody>
- <requestStatus>${requestStatus}</requestStatus>
- <progress>${progress}</progress>
- <vnfOutputs>${dbVnfOutputs}</vnfOutputs>
- <volumeGroupId>${volumeGroupId}</volumeGroupId>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
- execution.setVariable(prefix+"createDBRequest", buildDeleteDBRequestAsString)
-
- utils.logAudit(buildDeleteDBRequestAsString)
- }
-
-
-
-
-
- public void postProcessResponse (Execution execution, isDebugEnabled) {
-
- def dbReturnCode = execution.getVariable(prefix+'dbReturnCode')
- def createDBResponse = execution.getVariable(prefix+'createDBResponse')
-
- utils.logAudit('DB return code: ' + dbReturnCode)
- utils.logAudit('DB response: ' + createDBResponse)
-
- def requestId = execution.getVariable("att-mso-request-id")
- def source = execution.getVariable(prefix+'source')
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${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)
-
- utils.logAudit(createDBResponse)
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable(prefix+'Success', true)
- execution.setVariable(prefix+'CompleteMsoProcessRequest', xmlMsoCompletionRequest)
- utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
-
- }
-
- public void prepareFalloutHandlerRequest(Execution execution, isDebugEnabled) {
-
- WorkflowException we = execution.getVariable('WorkflowException')
- def errorCode = we?.getErrorCode()
- def errorMessage = we?.getErrorMessage()
-
- def requestId = execution.getVariable("att-mso-request-id")
- def source = execution.getVariable(prefix+'source')
-
- String falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException>
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
-
- </aetgt:FalloutHandlerRequest>"""
-
- // Format Response
- String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
- utils.logAudit(xmlHandlerRequest)
-
- execution.setVariable(prefix+'FalloutHandlerRequest', xmlHandlerRequest)
- utils.log("ERROR", "Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
- }
-
-
- /**
- * Query AAI service instance
- * @param execution
- * @param isDebugEnabled
- */
- public void callRESTQueryAAIServiceInstance(Execution execution, isDebugEnabled) {
-
- def request = execution.getVariable(prefix+"Request")
- def serviceInstanceId = utils.getNodeText1(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
- utils.logAudit("AAI query service instance request: " + queryAAIRequest)
-
- APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
-
- String returnCode = response.getStatusCode()
- String aaiResponseAsString = response.getResponseBodyAsString()
- aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
-
- utils.logAudit("AAI query service instance return code: " + returnCode)
- utils.logAudit("AAI query service instance response: " + aaiResponseAsString)
-
- utils.log("DEBUG", "AAI query service instance return code: " + returnCode, isDebugEnabled)
- utils.log("DEBUG", "AAI query service instance response: " + aaiResponseAsString, isDebugEnabled)
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- if (returnCode=='200') {
- utils.log("DEBUG", 'Service instance ' + serviceInstanceId + ' found in AAI.', isDebugEnabled)
- } else {
- if (returnCode=='404') {
- def message = 'Service instance ' + serviceInstanceId + ' was not found in AAI. Return code: 404.'
- utils.log("DEBUG", message, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
- } else {
- WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
- throw new BpmnError("MSOWorkflowException")
- }
- }
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+
+import groovy.json.JsonSlurper
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.lang3.*
+
+class CreateVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+ public static final String prefix='CVMVINFRAV1_'
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+
+ /**
+ * Perform initial processing, such as request validation, initialization of variables, etc.
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void preProcessRequest (Execution execution, isDebugEnabled) {
+
+ execution.setVariable("prefix",prefix)
+ setSuccessIndicator(execution, false)
+ execution.setVariable(prefix+'syncResponseSent', false)
+
+ String createVolumeIncoming = validateRequest(execution, 'vnfId')
+ utils.logAudit(createVolumeIncoming)
+
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+
+ def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ def vnfId = execution.getVariable('vnfId')
+
+ def vidUtils = new VidUtils(this)
+ createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', serviceInstanceId)
+
+ execution.setVariable(prefix+'Request', createVolumeIncoming)
+ execution.setVariable(prefix+'vnfId', vnfId)
+ execution.setVariable(prefix+'isVidRequest', true)
+
+ utils.log("DEBUG", "XML request:\n" + createVolumeIncoming, isDebugEnabled)
+
+ }
+ catch(groovy.json.JsonException je) {
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'Request is not a valid JSON document')
+ }
+
+ execution.setVariable(prefix+'source', utils.getNodeText1(createVolumeIncoming, "source"))
+ execution.setVariable(prefix+'volumeGroupName', utils.getNodeText1(createVolumeIncoming, 'volume-group-name'))
+ execution.setVariable(prefix+'volumeOutputs', utils.getNodeXml(createVolumeIncoming, 'volume-outputs', false))
+
+ execution.setVariable(prefix+'serviceType', 'service-instance')
+ execution.setVariable(prefix+'serviceInstanceId', utils.getNodeText1(createVolumeIncoming, "service-instance-id"))
+
+ // Generate volume group id
+ String volumeGroupId = UUID.randomUUID()
+ utils.log("DEBUG", "Generated volume group id: " + volumeGroupId, isDebugEnabled)
+
+ def testGroupId = execution.getVariable('test-volume-group-id')
+ if (testGroupId != null && testGroupId.trim() != '') {
+ volumeGroupId = testGroupId
+ }
+
+ execution.setVariable(prefix+'volumeGroupId', volumeGroupId)
+
+ }
+
+
+ public void sendSyncResponse (Execution execution, isDebugEnabled) {
+ def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
+ def requestId = execution.getVariable("mso-request-id")
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", "Sync Response: " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 200, syncResponse)
+
+ execution.setVariable(prefix+'syncResponseSent', true)
+ }
+
+
+ public void sendSyncError (Execution 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(Execution execution, int errorCode, errorMessage, isDebugEnabled) {
+ utils.log("DEBUG", errorMessage, isDebugEnabled)
+ (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
+ }
+
+
+ public void prepareDbInfraSuccessRequest(Execution execution, isDebugEnabled) {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ def dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+ def requestId = execution.getVariable('mso-request-id')
+ def statusMessage = "VolumeGroup successfully created."
+ def requestStatus = "COMPLETED"
+ def progress = "100"
+
+ try {
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ /*
+ 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.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>${requestStatus}</requestStatus>
+ <progress>${progress}</progress>
+ <vnfOutputs>${dbVnfOutputs}</vnfOutputs>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable(prefix+"createDBRequest", buildDeleteDBRequestAsString)
+
+ utils.logAudit(buildDeleteDBRequestAsString)
+ }
+
+
+
+
+
+ public void postProcessResponse (Execution execution, isDebugEnabled) {
+
+ def dbReturnCode = execution.getVariable(prefix+'dbReturnCode')
+ def createDBResponse = execution.getVariable(prefix+'createDBResponse')
+
+ utils.logAudit('DB return code: ' + dbReturnCode)
+ utils.logAudit('DB response: ' + createDBResponse)
+
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable(prefix+'source')
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <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)
+
+ utils.logAudit(createDBResponse)
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable(prefix+'Success', true)
+ execution.setVariable(prefix+'CompleteMsoProcessRequest', xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ }
+
+ public void prepareFalloutHandlerRequest(Execution 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+
+ </aetgt:FalloutHandlerRequest>"""
+
+ // Format Response
+ String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+ utils.logAudit(xmlHandlerRequest)
+
+ execution.setVariable(prefix+'FalloutHandlerRequest', xmlHandlerRequest)
+ utils.log("ERROR", "Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
+ }
+
+
+ /**
+ * Query AAI service instance
+ * @param execution
+ * @param isDebugEnabled
+ */
+ public void callRESTQueryAAIServiceInstance(Execution execution, isDebugEnabled) {
+
+ def request = execution.getVariable(prefix+"Request")
+ def serviceInstanceId = utils.getNodeText1(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
+ utils.logAudit("AAI query service instance request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query service instance return code: " + returnCode)
+ utils.logAudit("AAI query service instance response: " + aaiResponseAsString)
+
+ utils.log("DEBUG", "AAI query service instance return code: " + returnCode, isDebugEnabled)
+ utils.log("DEBUG", "AAI query service instance response: " + aaiResponseAsString, isDebugEnabled)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ utils.log("DEBUG", 'Service instance ' + serviceInstanceId + ' found in AAI.', isDebugEnabled)
+ } else {
+ if (returnCode=='404') {
+ def message = 'Service instance ' + serviceInstanceId + ' was not found in AAI. Return code: 404.'
+ utils.log("DEBUG", message, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+ } else {
+ WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
index 05537ad71d..6168acde44 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
@@ -18,14 +18,20 @@
* ============LICENSE_END=========================================================
*/
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.infrastructure.scripts
import java.util.UUID;
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution;
+
import static org.apache.commons.lang3.StringUtils.*;
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.WorkflowException
import org.openecomp.mso.bpmn.core.json.JsonUtils;
@@ -47,6 +53,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
* request.
*
* @param - execution
+ *
*/
public void preProcessRequest(Execution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -63,7 +70,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
if(createVnfRequest != null){
- String requestId = execution.getVariable("att-mso-request-id")
+ String requestId = execution.getVariable("mso-request-id")
execution.setVariable("CREVI_requestId", requestId)
utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
@@ -90,6 +97,9 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
String suppressRollback = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.suppressRollback")
execution.setVariable("CREVI_suppressRollback", suppressRollback)
utils.log("DEBUG", "Incoming Suppress Rollback is: " + suppressRollback, isDebugEnabled)
+
+ def vnfModelInfo = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo")
+ execution.setVariable("CREVI_vnfModelInfo", vnfModelInfo)
String modelInvariantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelInvariantId")
execution.setVariable("CREVI_modelInvariantId", modelInvariantId)
@@ -98,10 +108,21 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
String modelVersion = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelVersion")
execution.setVariable("CREVI_modelVersion", modelVersion)
utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled)
+
+ String tenantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("CREVI_tenantId", tenantId)
+ utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled)
//For Completion Handler & Fallout Handler
String requestInfo =
- """<request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>CREATE</action>
<source>${source}</source>
@@ -127,6 +148,21 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
// Setting for Sub Flow Calls
execution.setVariable("CREVI_type", "generic-vnf")
execution.setVariable("GENGS_type", "service-instance")
+
+ String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("CREVI_sdncCallbackUrl", sdncCallbackUrl)
+
+ def vnfInputParameters = jsonUtil.getJsonValue(createVnfRequest, "requestParameters.userParams")
+ execution.setVariable("CREVI_vnfInputParameters", vnfInputParameters)
+
+
+ utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+ logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled)
}else{
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
@@ -239,6 +275,146 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
}
utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled)
}
+
+ public void preProcessSDNCAssignRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ def vnfId = execution.getVariable("CREVI_vnfId")
+ def serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
+ logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
+ utils.logAudit("NEW VNF ID: " + vnfId)
+
+ try{
+ //Build SDNC Request
+
+ String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("CREVI_assignSDNCRequest", assignSDNCRequest)
+ logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void preProcessSDNCActivateRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ try{
+ String vnfId = execution.getVariable("CREVI_vnfId")
+ String serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
+
+ String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
+
+ execution.setVariable("CREVI_activateSDNCRequest", activateSDNCRequest)
+ logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ }
+
+ public String buildSDNCRequest(Execution 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.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>VNFActivateRequest</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${svcInstId}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-name>${vnfName}</vnf-name>
+ <vnf-type>${vnfType}</vnf-type>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ <tenant>${tenantId}</tenant>
+ ${sdncVNFParamsXml}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.logAudit("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(Execution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ utils.logAudit("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ utils.logAudit("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
+
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
public void prepareCompletionHandlerRequest(Execution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
@@ -252,8 +428,8 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
requestInfo = utils.removeXmlPreamble(requestInfo)
String request =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
${requestInfo}
<status-message>Vnf has been created successfully.</status-message>
<vnfId>${vnfId}</vnfId>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy
new file mode 100644
index 0000000000..aad0693948
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DelServiceInstance.groovy
@@ -0,0 +1,353 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+
+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.runtime.Execution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+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 static org.apache.commons.lang3.StringUtils.*;
+
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>DelServiceInstance.bpmn</class> process.
+ *
+ */
+public class DelServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+
+ utils.log("DEBUG", " *** preProcessRequest Request *** ", isDebugEnabled)
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(siRequest)
+
+
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ utils.log("DEBUG", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
+
+ 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"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ } else
+ {
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ //utils.log("DEBUG", "modelInfo" + serviceModelInfo, isDebugEnabled)
+ }
+
+ //requestInfo
+ String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
+ if (isBlank(productFamilyId))
+ {
+ msg = "Input productFamilyId is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ //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"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ }
+
+ //requestParameters
+ String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ } else {
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ 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()
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ }
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncError *** ", isDebugEnabled)
+
+ 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.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareCompletionRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareCompletion *** ", isDebugEnabled)
+
+ try {
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>Service Instance was deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>DelServiceInstance</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ execution.setVariable("completionRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String msg = " Exception in prepareCompletion:" + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG", "*** Exit prepareCompletionRequest ***", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** prepareFalloutRequest *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Input Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String source = execution.getVariable("source")
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+ execution.setVariable("falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception prepareFalloutRequest:" + ex.getMessage(), isDebugEnabled)
+ 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable("falloutRequest", falloutRequest)
+ }
+ utils.log("DEBUG", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
+ }
+
+
+ // *******************************
+ // Build DB request Section
+ // *******************************
+ public void prepareDBRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteServiceInstance ***** ", isDebugEnabled)
+
+ 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.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${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)
+ utils.logAudit(buildDeleteDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+ public void prepareDBRequestError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+ 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 DeleteServiceInstanceInfra 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.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String buildDBRequestAsString = utils.formatXml(dbRequest)
+ execution.setVariable("DELSI_createDBInfraErrorRequest", buildDBRequestAsString)
+ utils.logAudit(buildDBRequestAsString)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy
new file mode 100644
index 0000000000..e49de0bc09
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteGenericMacroServiceNetworkVnf.groovy
@@ -0,0 +1,468 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>DeleteViprAtmService.bpmn</class> process.
+ *
+ */
+public class DeleteGenericMacroServiceNetworkVnf extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELVAS_"
+ 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>DeleteViprAtmService.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("deleteViprAtmServiceRequest", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable("DELVAS_vnfsDeletedCount", 0)
+ execution.setVariable("DELVAS_vnfsCount", 0)
+ execution.setVariable("DELVAS_networksCount", 0)
+ execution.setVariable("DELVAS_networksDeletedCount", 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ // check for incoming json message/input
+ String deleteViprAtmServiceRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(deleteViprAtmServiceRequest)
+ execution.setVariable("deleteViprAtmServiceRequest", deleteViprAtmServiceRequest);
+ println 'deleteViprAtmServiceRequest - ' + deleteViprAtmServiceRequest
+
+ // 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(deleteViprAtmServiceRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ execution.setVariable("source", "VID")
+ } else {
+ execution.setVariable("source", source)
+ }
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // global-customer-id is optional on Delete
+
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ execution.setVariable("globalCustomerId", globalSubscriberId)
+
+ String suppressRollback = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String productFamilyId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
+
+ // extract subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
+
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(deleteViprAtmServiceRequest, "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = "1702"
+ execution.setVariable("sdncVersion", sdncVersion)
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("DELVAS_requestInfo", requestInfo)
+
+ //Setting for Generic Sub Flows
+ execution.setVariable("GENGS_type", "service-instance")
+
+ utils.log("DEBUG", " ***** Completed preProcessRequest DeleteViprAtmService Request ***** ", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareServiceInstanceDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ // confirm if ServiceInstance was found
+ if ( !execution.getVariable("GENGS_FoundIndicator") )
+ {
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ // get variable within incoming json
+ String deleteViprAtmServiceRequest = execution.getVariable("deleteViprAtmServiceRequest");
+
+ // get SI extracted by GenericGetService
+ String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
+
+ utils.log("DEBUG", "serviceInstanceAaiRecord: "+serviceInstanceAaiRecord, isDebugEnabled)
+
+ String relationship = ""
+ try {
+ relationship = networkUtils.getFirstNodeXml(serviceInstanceAaiRecord, "relationship-list")
+ } catch (Exception ex) {
+ //no relationships found
+ }
+ utils.log("DEBUG", " relationship string - " + relationship, isDebugEnabled)
+
+ int vnfsCount = 0
+ int networksCount = 0
+
+ if (relationship != null && relationship.length() > 0){
+ relationship = relationship.trim().replace("tag0:","").replace(":tag0","")
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List relatedVnfIdList = networkUtils.getRelatedVnfIdList(relationship)
+ vnfsCount = relatedVnfIdList.size()
+ execution.setVariable("DELVAS_vnfsCount", vnfsCount)
+ utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
+ execution.setVariable("DELVAS_relatedVnfIdList", relatedVnfIdList)
+
+ // Check if Network TableREf is present, then build a List of network policy
+ List relatedNetworkIdList = networkUtils.getRelatedNetworkIdList(relationship)
+ networksCount = relatedNetworkIdList.size()
+ execution.setVariable("DELVAS_networksCount", networksCount)
+ utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
+ execution.setVariable("DELVAS_relatedNetworkIdList", relatedNetworkIdList)
+ } else {
+ execution.setVariable("DELVAS_vnfsCount", 0)
+ utils.log("DEBUG", " DELVAS_vnfsCount : " + vnfsCount, isDebugEnabled)
+ execution.setVariable("DELVAS_networksCount", 0)
+ utils.log("DEBUG", " DELVAS_networksCount : " + networksCount, isDebugEnabled)
+ }
+
+ utils.log("DEBUG", " ***** Completed prepareServiceInstanceDelete() of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. prepareServiceInstanceDelete() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareVnfAndModulesDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
+
+ List vnfList = execution.getVariable("DELVAS_relatedVnfIdList")
+ Integer vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
+ String vnfModelInfoString = ""
+ String vnfId = ""
+ if (vnfList.size() > 0 ) {
+ vnfId = vnfList.get(vnfsDeletedCount.intValue())
+ }
+
+ execution.setVariable("vnfId", vnfId)
+ utils.log("DEBUG", "need to delete vnfId:" + vnfId, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareVnfAndModulesDelete of DeleteServiceInstanceMacro ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceMacro flow. Unexpected Error from method prepareVnfAndModulesDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateVnfDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ String vnfsDeletedCount = execution.getVariable("DELVAS_vnfsDeletedCount")
+ vnfsDeletedCount++
+
+ execution.setVariable("DELVAS_vnfsDeletedCount", vnfsDeletedCount)
+
+ utils.log("DEBUG", " ***** Completed validateVnfDelete of DeleteViprAtmService ***** "+" vnf # "+vnfsDeletedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateVnfDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareNetworkDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ List networkList = execution.getVariable("DELVAS_relatedNetworkIdList")
+ Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
+
+ String networkId = ""
+ if (networkList.size() > 0) {
+ networkId = networkList.get(networksDeletedCount.intValue())
+ }
+
+ execution.setVariable("networkId", networkId)
+ utils.log("DEBUG", "need to delete networkId:" + networkId, isDebugEnabled)
+
+ utils.log("DEBUG", " ***** Completed prepareNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = q"Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method prepareNetworkDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Network request Section
+ // *******************************
+ public void validateNetworkDelete (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ Integer networksDeletedCount = execution.getVariable("DELVAS_networksDeletedCount")
+ networksDeletedCount++
+
+ execution.setVariable("DELVAS_networksDeletedCount", networksDeletedCount)
+
+ utils.log("DEBUG", " ***** Completed validateNetworkDelete of DeleteViprAtmService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteViprAtmService flow. Unexpected Error from method validateNetworkDelete() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteViprAtmService ***** ", isDebugEnabled)
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("msoRequestId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:status-message>vIPR ATM 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)
+
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable("DELVAS_Success", true)
+ execution.setVariable("DELVAS_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** STARTED DeleteViprAtmService prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable("DELVAS_requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable("DELVAS_falloutRequest", falloutRequest)
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DeleteViprAtmService prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteViprAtmService prepareFalloutRequest Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DeleteViprAtmService prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " ***** Inside sendSyncError() of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+ 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.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("DELVAS_unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ execution.setVariable("DELVAS_unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
new file mode 100644
index 0000000000..9e341dafbc
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
@@ -0,0 +1,417 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import java.util.UUID;
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+import groovy.xml.XmlUtil
+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()
+
+
+ public InitializeProcessVariables(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + groovyClassName + " ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "Received 'suppressRollback': " + disableRollback , isDebugEnabled)
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ utils.log("DEBUG", " Set 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' test ONLY, sdncVersion = '1702'
+ utils.log("DEBUG", " 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ }
+
+ // 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void getNetworkModelInfo (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside getNetworkModelInfo() of DeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // "networkModelInfo" is expected to be sent
+ String networkModelInfo = execution.getVariable("networkModelInfo")
+ utils.log("DEBUG", " networkModelInfo - " + networkModelInfo, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse() of DeleteNetworkInstance ***** ", isDebugEnabled)
+
+ 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()
+
+ utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestRequest, isDebugEnabled)
+
+ sendWorkflowResponse(execution, 202, deleteNetworkRestRequest)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DeleteNetworkInstance, sendSyncResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCompletion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareCompletion() of CreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>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)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in CreateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void prepareDBRequestError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteNetworkInstance ***** ", 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.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <progress></progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:aetgt="http://org.openecomp/mso/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)
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance, prepareDBRequestError() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse() of DeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ utils.log("DEBUG", " ***** DeleteNetworkInstance Success ***** ", isDebugEnabled)
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ utils.log("DEBUG", " ***** DeleteNetworkInstance Failed in CompletionMsoProces flow!. ***** ", isDebugEnabled)
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DeleteNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+ String dbReturnCode = execution.getVariable(Prefix + "dbReturnCode")
+ utils.log("DEBUG", " ***** DB Update Response Code : " + dbReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + execution.getVariable(Prefix + "deleteDBResponse"), isDebugEnabled)
+
+ 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.logAudit(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstance, buildErrorResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELEtE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${exceptionMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>9999</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+ }
+ }
+
+
+ public void sendSyncError (Execution 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()
+
+ utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestError, isDebugEnabled)
+
+ sendWorkflowResponse(execution, 500, deleteNetworkRestError)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed - DeleteNetworkInstance, sendSyncError(): " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method of " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
index bf5e62d2cc..f8b3b4739f 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.infrastructure.scripts
import groovy.util.Node
import groovy.util.XmlParser;
@@ -32,14 +32,18 @@ import org.camunda.bpm.engine.runtime.Execution
import groovy.json.JsonSlurper
import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
/**
* Initialize the flow's variables.
*
@@ -80,6 +84,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
def incomingRequest = execution.getVariable('bpmnRequest')
utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)
+ utils.logAudit("DeleteVfModule Infra incoming Request: " + incomingRequest)
// check if request is xml or json
try {
@@ -88,7 +93,16 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
def serviceInstanceId = execution.getVariable('serviceInstanceId')
+ utils.log("DEBUG", "serviceInstanceId is: " + serviceInstanceId, isDebugLogEnabled)
def vnfId = execution.getVariable('vnfId')
+ utils.log("DEBUG", "vnfId is: " + vnfId, isDebugLogEnabled)
+ def cloudConfiguration = jsonUtil.getJsonValue(incomingRequest, "requestDetails.cloudConfiguration")
+ execution.setVariable("cloudConfiguration", cloudConfiguration)
+ utils.log("DEBUG", "CloudConfiguration is: " + cloudConfiguration, isDebugLogEnabled)
+ def vfModuleModelInfo = jsonUtil.getJsonValue(incomingRequest, "requestDetails.modelInfo")
+
+ execution.setVariable("vfModuleModelInfo", vfModuleModelInfo)
+ utils.log("DEBUG", "VfModuleModelInfo is: " + vfModuleModelInfo, isDebugLogEnabled)
def vidUtils = new VidUtils(this)
@@ -96,6 +110,19 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
utils.log("DEBUG", " Request in XML format: " + requestInXmlFormat, isDebugLogEnabled)
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
execution.setVariable(prefix + 'Request', requestInXmlFormat)
execution.setVariable(prefix+'vnfId', vnfId)
execution.setVariable("isVidRequest", "true")
@@ -103,13 +130,13 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
}
catch(groovy.json.JsonException je) {
utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
- workflowException(execution, "Invalid request format", 400)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
}
catch(Exception e) {
String restFaultMessage = e.getMessage()
utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
- workflowException(execution, restFaultMessage, 400)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
}
@@ -117,6 +144,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
String request = validateRequest(execution)
execution.setVariable('DeleteVfModuleRequest', request)
+ utils.logAudit("DeleteVfModuleInfra Request: " + request)
def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
execution.setVariable('DELVfModI_requestInfo', requestInfo)
@@ -127,6 +155,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
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'))
@@ -138,7 +167,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
}
}
@@ -171,6 +200,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
def vfModuleId = execution.getVariable('DELVfModI_vfModuleId')
String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+ utils.logAudit("DeleteVfModuleInfra Synch Response: " + synchResponse)
sendWorkflowResponse(execution, 200, synchResponse)
logDebug('Exited ' + method, isDebugLogEnabled)
@@ -178,7 +208,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -203,7 +233,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage())
}
}
@@ -228,7 +258,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
String updateInfraRequest = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:req="http://com.att.mso/requestsdb">
+ xmlns:req="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<req:updateInfraRequest>
@@ -243,6 +273,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
updateInfraRequest = utils.formatXml(updateInfraRequest)
execution.setVariable('DELVfModI_updateInfraRequest', updateInfraRequest)
+ utils.logAudit("DeleteAAIVfModuleInfra Update Request: " + updateInfraRequest)
logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
logDebug('Exited ' + method, isDebugLogEnabled)
@@ -250,7 +281,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in prepInfraRequest(): ' + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepInfraRequest(): ' + e.getMessage())
}
}
@@ -274,10 +305,10 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
def action = utils.getNodeText1(requestInfo, "action")
String content =
- """ <aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:ns8="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:ns8="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
${requestInfo}
</request-info>
<ns8:status-message>Vf Module has been deleted successfully.</ns8:status-message>
@@ -286,6 +317,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
content = utils.formatXml(content)
logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ utils.logAudit("DeleteVfModule Infra Completion Handler Request: " + content)
execution.setVariable(resultVar, content)
logDebug('Exited ' + method, isDebugLogEnabled)
@@ -293,7 +325,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 2000, 'Internal Error')
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
}
}
@@ -324,10 +356,10 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
}
String content = """
- <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
- xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
- xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
${requestInfo}
<sdncadapterworkflow:WorkflowException>
<sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
@@ -336,6 +368,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
</sdncadapterworkflow:FalloutHandlerRequest>
"""
content = utils.formatXml(content)
+ utils.logAudit("DeleteVfModuleInfra Fallout Handler Request: " + content)
logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
execution.setVariable(resultVar, content)
@@ -344,7 +377,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 2000, 'Internal Error')
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
}
}
}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
index bfbaf680c6..7bda7b4fe3 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -1,545 +1,560 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import groovy.json.JsonSlurper
-import java.util.concurrent.ExecutionException;
-import org.springframework.web.util.UriUtils
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-/**
- * This groovy class supports the <class>DeleteVfModuleVolume.bpmn</class> process.
- */
-public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
-
- private XmlParser xmlParser = new XmlParser()
- /**
- * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
- * @param execution
- */
- public InitializeProcessVariables(Execution 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 (Execution 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 (Execution execution, isDebugLogEnabled) {
-
- InitializeProcessVariables(execution)
-
- String createVolumeIncoming = validateRequest(execution)
- utils.logAudit(createVolumeIncoming)
-
- // check if request is xml or json
- try {
- def jsonSlurper = new JsonSlurper()
- Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
- utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
-
- 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) {
- utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
- // 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("att-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', getRequiredNodeText(execution, 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.getNodeText1(request, 'aic-cloud-region'))
-
- logDebug('Request: ' + createVolumeIncoming, isDebugLogEnabled)
- }
-
- public void sendSyncResponse (Execution execution, isDebugEnabled) {
-
- String volumeRequest = execution.getVariable("DELVfModVol_volumeRequest")
- utils.log("DEBUG", " DELVfModVol_volumeRequest - " + "\n" + volumeRequest, isDebugEnabled)
- // 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 (Execution 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 (Execution execution, isDebugEnabled) {
-
- String cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
-
- String aai_endpoint = execution.getVariable("URN_aai_endpoint")
- AaiUtil aaiUtil = new AaiUtil(this)
- String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
- String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
- utils.logAudit(queryCloudRegionRequest)
- execution.setVariable("DELVfModVol_queryCloudRegionRequest", queryCloudRegionRequest)
- utils.log("DEBUG", " DELVfModVol_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
-
- 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 {
- utils.log("DEBUG", "AAI Query Cloud Region Unsuccessful.", isDebugEnabled)
- execution.setVariable("DELVfModVol_isCloudRegionGood", false)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable("DELVfModVol_queryCloudRegionReturnCode"))
- }
-
- utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("DELVfModVol_isCloudRegionGood"), isDebugEnabled)
- }
-
- /**
- * Query volume group by id
- * @param execution
- */
- public void queryAAIForVolumeGroup(Execution 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")
-
- utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
- logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
-
- APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
-
- String returnCode = response.getStatusCode()
- String aaiResponseAsString = response.getResponseBodyAsString()
- aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
-
- utils.logAudit("AAI query volume group by id return code: " + returnCode)
- utils.logAudit("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)){
- utils.log("DEBUG", 'Volume Group ' + volumeGroupId + ' currently in use', isDebugLogEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
- }
-
- def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
- if (volumeGroupTenantId == null) {
- utils.log("DEBUG", "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}", isDebugLogEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
- }
-
- execution.setVariable('DELVfModVol_volumeGroupTenantId', volumeGroupTenantId)
- logDebug('Received Tenant Id ' + volumeGroupTenantId + ' from AAI for Volume Group with Volume Group Id ' + volumeGroupId , isDebugLogEnabled)
- }
- else {
- if (returnCode=='404') {
- utils.log("DEBUG", "Volume Group ${volumeGroupId} not found in AAI", isDebugLogEnabled)
- 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(Execution 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 = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
- def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
- if ('true'.equals(useQualifiedHostName)) {
- notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
- }
-
- String vnfAdapterRestRequest = """
- <deleteVolumeGroupRequest>
- <cloudSiteId>${cloudRegion}</cloudSiteId>
- <tenantId>${tenantId}</tenantId>
- <volumeGroupId>${volumeGroupId}</volumeGroupId>
- <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
- <skipAAI>true</skipAAI>
- <msoRequest>
- <requestId>${requestId}</requestId>
- <serviceInstanceId>${serviceId}</serviceInstanceId>
- </msoRequest>
- <messageId>${messageId}</messageId>
- <notificationUrl>${notificationUrl}</notificationUrl>
- </deleteVolumeGroupRequest>
- """
- vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
- execution.setVariable('DELVfModVol_deleteVnfARequest', vnfAdapterRestRequest)
- logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
- }
-
-
- public void deleteVolGrpId(Execution 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')
- }
-
- utils.logAudit('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
- utils.log("DEBUG", "Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest, isDebugEnabled)
-
- APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
-
- String returnCode = response.getStatusCode()
- String aaiResponseAsString = response.getResponseBodyAsString()
- aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
-
- utils.logAudit("AAI delete volume group return code: " + returnCode)
- utils.logAudit("AAI delete volume group response: " + aaiResponseAsString)
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- if (returnCode=='200' || (returnCode == '204')) {
- utils.log("DEBUG", "Volume group $groupId deleted.", isDebugEnabled)
- } 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 (Execution execution, isDebugLogEnabled) {
-
- WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
-
- 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()).replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
- 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://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>${statusMessage}</statusMessage>
- <requestStatus>${requestStatus}</requestStatus>
- <progress>${progress}</progress>
- <vnfOutputs>${volOutputs}</vnfOutputs>
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- updateInfraRequest = utils.formatXml(updateInfraRequest)
- execution.setVariable('DELVfModVol_updateInfraRequest', updateInfraRequest)
- logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
-
- }
-
-
- public void prepareCompletionHandlerRequest (Execution execution, isDebugLogEnabled) {
- def requestId = execution.getVariable("att-mso-request-id")
- def source = execution.getVariable("DELVfModVol_source")
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${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)
- utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugLogEnabled)
-
- }
-
-
-
- public void prepareFalloutHandler (Execution 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://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>DELETE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:WorkflowException>
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- // Format Response
- String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
- utils.logAudit(xmlHandlerRequest)
-
- execution.setVariable("DELVfModVol_FalloutHandlerRequest", xmlHandlerRequest)
- utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
-
- }
-
-
- /**
- * 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(Execution 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
-
- logError('Error in DeleteVfModuleVolume: ' + errorMessage)
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- exceptionUtil.buildWorkflowException(execution, 5000, errorMessage)
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.json.JsonSlurper
+
+import java.util.concurrent.ExecutionException;
+
+import org.springframework.web.util.UriUtils
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+
+/**
+ * This groovy class supports the <class>DeleteVfModuleVolume.bpmn</class> process.
+ */
+public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+ private XmlParser xmlParser = new XmlParser()
+ /**
+ * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution 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 (Execution 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 (Execution execution, isDebugLogEnabled) {
+
+ InitializeProcessVariables(execution)
+
+ String createVolumeIncoming = validateRequest(execution)
+ utils.logAudit(createVolumeIncoming)
+
+ // check if request is xml or json
+ try {
+ def jsonSlurper = new JsonSlurper()
+ Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+ utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
+
+ 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) {
+ utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+ // 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.getNodeText1(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.getNodeText1(request, 'aic-cloud-region'))
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ logDebug('Request: ' + createVolumeIncoming, isDebugLogEnabled)
+ }
+
+ public void sendSyncResponse (Execution execution, isDebugEnabled) {
+
+ String volumeRequest = execution.getVariable("DELVfModVol_volumeRequest")
+ utils.log("DEBUG", " DELVfModVol_volumeRequest - " + "\n" + volumeRequest, isDebugEnabled)
+ // 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 (Execution 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 (Execution execution, isDebugEnabled) {
+
+ String cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable("DELVfModVol_queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", " DELVfModVol_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ 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 {
+ utils.log("DEBUG", "AAI Query Cloud Region Unsuccessful.", isDebugEnabled)
+ execution.setVariable("DELVfModVol_isCloudRegionGood", false)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable("DELVfModVol_queryCloudRegionReturnCode"))
+ }
+
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("DELVfModVol_isCloudRegionGood"), isDebugEnabled)
+ }
+
+ /**
+ * Query volume group by id
+ * @param execution
+ */
+ public void queryAAIForVolumeGroup(Execution 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")
+
+ utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query volume group by id return code: " + returnCode)
+ utils.logAudit("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)){
+ utils.log("DEBUG", 'Volume Group ' + volumeGroupId + ' currently in use', isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
+ }
+
+ def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+ if (volumeGroupTenantId == null) {
+ utils.log("DEBUG", "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+ }
+
+ execution.setVariable('DELVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+ logDebug('Received Tenant Id ' + volumeGroupTenantId + ' from AAI for Volume Group with Volume Group Id ' + volumeGroupId , isDebugLogEnabled)
+ }
+ else {
+ if (returnCode=='404') {
+ utils.log("DEBUG", "Volume Group ${volumeGroupId} not found in AAI", isDebugLogEnabled)
+ 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(Execution 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 = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <deleteVolumeGroupRequest>
+ <cloudSiteId>${cloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </deleteVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DELVfModVol_deleteVnfARequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+ }
+
+
+ public void deleteVolGrpId(Execution 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')
+ }
+
+ utils.logAudit('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+ utils.log("DEBUG", "Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest, isDebugEnabled)
+
+ APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI delete volume group return code: " + returnCode)
+ utils.logAudit("AAI delete volume group response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ if (returnCode=='200' || (returnCode == '204')) {
+ utils.log("DEBUG", "Volume group $groupId deleted.", isDebugEnabled)
+ } 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 (Execution execution, isDebugLogEnabled) {
+
+ WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+
+ 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()).replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ 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.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <requestStatus>${requestStatus}</requestStatus>
+ <progress>${progress}</progress>
+ <vnfOutputs>${volOutputs}</vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('DELVfModVol_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ }
+
+
+ public void prepareCompletionHandlerRequest (Execution execution, isDebugLogEnabled) {
+ def requestId = execution.getVariable("mso-request-id")
+ def source = execution.getVariable("DELVfModVol_source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${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)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugLogEnabled)
+
+ }
+
+
+
+ public void prepareFalloutHandler (Execution 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>DELETE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ // Format Response
+ String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+ utils.logAudit(xmlHandlerRequest)
+
+ execution.setVariable("DELVfModVol_FalloutHandlerRequest", xmlHandlerRequest)
+ utils.log("ERROR", " Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
+
+ }
+
+
+ /**
+ * 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(Execution 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
+
+ logError('Error in DeleteVfModuleVolume: ' + errorMessage)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ exceptionUtil.buildWorkflowException(execution, 5000, errorMessage)
+
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
index e53df32ef2..b97686e2d3 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.infrastructure.scripts
import javax.xml.parsers.DocumentBuilder
@@ -27,15 +27,16 @@ import javax.xml.parsers.DocumentBuilderFactory
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
-
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.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.WorkflowException
import org.openecomp.mso.bpmn.core.json.JsonUtils;
@@ -74,7 +75,7 @@ class DeleteVnfInfra extends AbstractServiceTaskProcessor {
if(deleteVnfRequest != null){
- String requestId = execution.getVariable("att-mso-request-id")
+ String requestId = execution.getVariable("mso-request-id")
execution.setVariable("DELVI_requestId", requestId)
String serviceInstanceId = execution.getVariable("serviceInstanceId")
@@ -88,10 +89,21 @@ class DeleteVnfInfra extends AbstractServiceTaskProcessor {
String source = jsonUtil.getJsonValue(deleteVnfRequest, "requestDetails.requestInfo.source")
execution.setVariable("DELVI_source", source)
utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "Incoming cascadeDelete is: " + cascadeDelete, isDebugEnabled)
//For Completion Handler & Fallout Handler
String requestInfo =
- """<request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>DELETE</action>
<source>${source}</source>
@@ -142,51 +154,6 @@ class DeleteVnfInfra extends AbstractServiceTaskProcessor {
utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra SendSyncResponse Process ***", isDebugEnabled)
}
- public void processGetVnfResponse(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- execution.setVariable("prefix",Prefix)
- utils.log("DEBUG", " *** STARTED DeleteVnfInfra processGetVnfResponse Process *** ", isDebugEnabled)
- try {
- String vnf = execution.getVariable("DELVI_genericVnf")
- String resourceVersion = utils.getNodeText1(vnf, "resource-version")
- execution.setVariable("DELVI_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") || e.equals("vserver")){
- utils.log("DEBUG", "Generic Vnf still has relationship to OpenStack.", isDebugEnabled)
- execution.setVariable("DELVI_vnfInUse", true)
- }else{
- utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
- }
- }
- }
- }
-
- if(utils.nodeExists(vnf, "vf-module")){
- execution.setVariable("DELVI_vnfInUse", true)
- utils.log("DEBUG", "Generic Vnf still has vf-modules.", isDebugEnabled)
- }
-
-
- } catch (Exception ex) {
- utils.log("DEBUG", "Error Occured in DeleteVnfInfra processGetVnfResponse Process " + ex.getMessage(), isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra processGetVnfResponse Process")
-
- }
- utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra processGetVnfResponse Process ***", isDebugEnabled)
- }
-
public void prepareCompletionHandlerRequest(Execution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
execution.setVariable("prefix",Prefix)
@@ -199,8 +166,8 @@ class DeleteVnfInfra extends AbstractServiceTaskProcessor {
String vnfId = execution.getVariable("DELVI_vnfId")
String request =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
${requestInfo}
<status-message>Vnf has been deleted successfully.</status-message>
<vnfId>${vnfId}</vnfId>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
new file mode 100644
index 0000000000..2d5ddf0d0c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
@@ -0,0 +1,1732 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+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 DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
+ 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(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled)
+
+ 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())
+ utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+ networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest)
+
+ } catch (Exception ex) {
+ String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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)
+ utils.logAudit(networkRequest)
+ execution.setVariable(Prefix + "networkRequest", networkRequest)
+ utils.log("DEBUG", Prefix + "networkRequest - " + '\n' + networkRequest, isDebugEnabled)
+
+ // validate 'backout-on-failure' to override 'URN_mso_rollback'
+ boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
+ execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
+ utils.log("DEBUG", Prefix + "rollbackEnabled - " + rollbackEnabled, isDebugEnabled)
+
+ String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+ execution.setVariable(Prefix + "networkInputs", networkInputs)
+ utils.log("DEBUG", Prefix + "networkInputs - " + '\n' + networkInputs, isDebugEnabled)
+
+ // prepare messageId
+ String messageId = execution.getVariable("testMessageId") // for testing
+ if (messageId == null || messageId == "") {
+ messageId = UUID.randomUUID()
+ utils.log("DEBUG", Prefix + "messageId, random generated: " + messageId, isDebugEnabled)
+ } else {
+ utils.log("DEBUG", Prefix + "messageId, pre-assigned: " + messageId, isDebugEnabled)
+ }
+ execution.setVariable(Prefix + "messageId", messageId)
+
+ String source = utils.getNodeText1(networkRequest, "source")
+ execution.setVariable(Prefix + "source", source)
+ utils.log("DEBUG", Prefix + "source - " + source, isDebugEnabled)
+
+ // validate cloud region
+ String lcpCloudRegionId = utils.getNodeText1(networkRequest, "aic-cloud-region")
+ if ((lcpCloudRegionId == null) || (lcpCloudRegionId == "") || (lcpCloudRegionId == "null")) {
+ String dataErrorMessage = "Missing value/element: 'lcpCloudRegionId' or 'cloudConfiguration' or 'aic-cloud-region'."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // validate service instance id
+ String serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id")
+ if ((serviceInstanceId == null) || (serviceInstanceId == "") || (serviceInstanceId == "null")) {
+ String dataErrorMessage = "Missing value/element: 'serviceInstanceId'."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ 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()
+ utils.log("DEBUG", dataErrorMessage, , isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // Set variables for Generic Get Sub Flow use
+ execution.setVariable(Prefix + "serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", Prefix + "serviceInstanceId - " + serviceInstanceId, isDebugEnabled)
+
+ execution.setVariable("GENGS_type", "service-instance")
+ utils.log("DEBUG", "GENGS_type - " + "service-instance", isDebugEnabled)
+ utils.log("DEBUG", " Url for SDNC adapter: " + execution.getVariable("URN_mso_adapters_sdnc_endpoint"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // build 'networkOutputs'
+ String networkId = utils.getNodeText1(networkRequest, "network-id")
+ if ((networkId == null) || (networkId == "null")) {
+ networkId = ""
+ }
+ String networkName = utils.getNodeText1(networkRequest, "network-name")
+ if ((networkName == null) || (networkName == "null")) {
+ networkName = ""
+ }
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${networkId}</network-id>
+ <network-name>${networkName}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ utils.log("DEBUG", Prefix + "networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+ 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkName (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkName() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ // get variables
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String networkName = utils.getNodeText1(networkInputs, "network-name")
+ networkName = UriUtils.encode(networkName,"UTF-8")
+ String messageId = execution.getVariable("messageId")
+
+ // Prepare AA&I url with network-name
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryAAINameRequest = "${aai_endpoint}${aai_uri}" + "?network-name=" + networkName
+ utils.logAudit(queryAAINameRequest)
+ execution.setVariable(Prefix + "queryNameAAIRequest", queryAAINameRequest)
+ utils.log("DEBUG", Prefix + "queryNameAAIRequest - " + "\n" + queryAAINameRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryAAINameRequest);
+
+ try {
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiNameReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI Query Name Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ utils.log("DEBUG", " ***** AAI Query Name Response : " +'\n'+ aaiResponseAsString, isDebugEnabled)
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNameAAIResponse", aaiResponseAsString)
+ execution.setVariable(Prefix + "isAAIqueryNameGood", true)
+ String orchestrationStatus = ""
+ try {
+ // response is NOT empty
+ orchestrationStatus = utils.getNodeText1(aaiResponseAsString, "orchestration-status")
+ execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus.toUpperCase())
+ utils.log("DEBUG", Prefix + "orchestrationStatus - " + orchestrationStatus.toUpperCase(), isDebugEnabled)
+ execution.setVariable("orchestrationStatus", orchestrationStatus)
+
+ } catch (Exception ex) {
+ // response is empty
+ execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus)
+ utils.log("DEBUG", Prefix + "orchestrationStatus - " + orchestrationStatus, isDebugEnabled)
+ }
+
+ } else {
+ if (returnCode=='404') {
+ utils.log("DEBUG", " QueryAAINetworkName return code = '404' (Not Found). Proceed with the Create !!! ", isDebugEnabled)
+
+ } else {
+ // aai all errors
+ String dataErrorMessage = "Unexpected Error Response from QueryAAINetworkName - " + returnCode
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ }
+
+ utils.log("DEBUG", Prefix + "isAAIqueryNameGood? : " + execution.getVariable(Prefix + "isAAIqueryNameGood"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow - callRESTQueryAAINetworkName() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAICloudRegion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
+ cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", Prefix + "queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ 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")
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable(Prefix + "isCloudRegionGood"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkId(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkId = ""
+ String assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
+ if (execution.getVariable("sdncVersion") == "1702") {
+ String networkResponseInformation = ""
+ try {
+ networkResponseInformation = utils.getNodeXml(assignSDNCResponse, "network-response-information", false).replace("tag0:","").replace(":tag0","")
+ networkId = utils.getNodeText1(networkResponseInformation, "instance-id")
+ } catch (Exception ex) {
+ String dataErrorMessage = " SNDC Response network validation for 'instance-id' (network-id) failed: Empty <network-response-information>"
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ networkId = utils.getNodeText1(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."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ } else {
+ utils.log("DEBUG", " SNDC Response network validation for 'instance-id' (network-id)' is good: " + networkId, isDebugEnabled)
+ }
+
+
+ execution.setVariable(Prefix + "networkId", networkId)
+ String networkName = utils.getNodeText1(assignSDNCResponse, "network-name")
+ execution.setVariable(Prefix + "networkName", networkName)
+
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+ utils.logAudit(queryIdAAIRequest)
+ execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest)
+ utils.log("DEBUG", Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryIdAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiIdReturnCode", returnCode)
+
+ utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryIdAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String netId = utils.getNodeText1(aaiResponseAsString, "network-id")
+ execution.setVariable(Prefix + "networkId", netId)
+ String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
+ execution.setVariable(Prefix + "networkName", netName)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
+ utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTReQueryAAINetworkId(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkId = execution.getVariable(Prefix + "networkId")
+ String netId = networkId
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+ utils.logAudit(requeryIdAAIRequest)
+ execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest)
+ utils.log("DEBUG", Prefix + "requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(requeryIdAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "requeryIdAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${netId}</network-id>
+ <network-name>${netName}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
+ utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkVpnBinding(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ 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","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", Prefix + "vpnCount - " + vpnCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (vpnCount > 0) {
+ execution.setVariable(Prefix + "vpnBindings", vpnBindingUri)
+ utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled)
+
+ 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)
+ } else {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i]
+ }
+
+ } 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
+ }
+
+ utils.logAudit(queryVpnBindingAAIRequest)
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
+ utils.log("DEBUG", Prefix + "queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryVpnBindingAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String routeTarget = ""
+ if (utils.nodeExists(aaiResponseAsString, "global-route-target")) {
+ routeTarget = utils.getNodeText1(aaiResponseAsString, "global-route-target")
+ routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "routeCollection", routeTargets)
+ utils.log("DEBUG", Prefix + "routeCollection - " + '\n' + routeTargets, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(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/>")
+ utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkPolicy(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ 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","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", Prefix + "networkPolicyCount - " + networkPolicyCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkPolicyCount > 0) {
+ execution.setVariable(Prefix + "networkPolicyUriList", networkPolicyUriList)
+ utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled)
+
+ 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)
+ } else {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i]
+ }
+ } 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
+
+ }
+
+
+ utils.logAudit(queryNetworkPolicyAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
+ utils.log("DEBUG", Prefix + "queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryNetworkPolicyAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String networkPolicy = ""
+ if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
+ networkPolicy = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn")
+ networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "networkCollection", networkPolicies)
+ utils.log("DEBUG", Prefix + "networkCollection - " + '\n' + networkPolicies, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(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/>")
+ utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkTableRef(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ 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","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", Prefix + "networkTableRefCount - " + networkTableRefCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkTableRefCount > 0) {
+ execution.setVariable(Prefix + "networkTableRefUriList", networkTableRefUriList)
+ utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled)
+
+ // 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)
+ } else {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i]
+ }
+ } 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
+
+ }
+
+
+ utils.logAudit(queryNetworkTableRefAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
+ utils.log("DEBUG", Prefix + "queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryNetworkTableRefAAIRequest);
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String networkTableRef = ""
+ if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
+ networkTableRef = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn")
+ networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "tableRefCollection", networkTableRefs)
+ utils.log("DEBUG", Prefix + "tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(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/>")
+ utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void callRESTUpdateContrailAAINetwork(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork() of DoCreateNetworkInstance ***** " , isDebugEnabled)
+
+ 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")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+
+ utils.logAudit(updateContrailAAIUrlRequest)
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
+ utils.log("DEBUG", Prefix + "updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled)
+
+ //Prepare payload (PUT)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion)
+ String payloadXml = utils.formatXml(payload)
+ utils.logAudit(payloadXml)
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest", payloadXml)
+ utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payloadXml)
+
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled)
+ String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiUpdateContrailResponseAsString)
+ execution.setVariable(Prefix + "updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
+ utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled)
+ // 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)
+ }
+ utils.log("DEBUG", Prefix + "isPONR" + ": " + execution.getVariable(Prefix + "isPONR"), isDebugEnabled)
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", errorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCreateNetworkRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareCreateNetworkRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ 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:", "")
+ utils.logAudit(buildDeleteNetworkRequestAsString)
+
+ execution.setVariable(Prefix + "createNetworkRequest", buildDeleteNetworkRequestAsString)
+ utils.log("DEBUG", Prefix + "createNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareCreateNetworkRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ 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)
+ utils.logAudit(sndcTopologyCreateRequesAsString)
+ execution.setVariable(Prefix + "assignSDNCRequest", sndcTopologyCreateRequesAsString)
+ utils.log("DEBUG", Prefix + "assignSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSDNCRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ 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)
+ utils.logAudit(sndcTopologyCreateRequesAsString)
+ execution.setVariable(Prefix + "assignSDNCRequest", sndcTopologyCreateRequesAsString)
+ utils.log("DEBUG", Prefix + "assignSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCActivateRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCActivateRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ 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", "ActivateNetworkInstance", cloudRegionId, networkId, null)
+
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ utils.logAudit(sndcTopologyCreateRequesAsString)
+ execution.setVariable(Prefix + "activateSDNCRequest", sndcTopologyCreateRequesAsString)
+ utils.log("DEBUG", Prefix + "activateSDNCRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCActivateRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateCreateNetworkResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateNetworkResponse() of DoCreateNetworkInstance *****", isDebugEnabled)
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "createNetworkResponse")
+ if (networkResponse==null) {
+ networkResponse="" // reset
+ }
+
+ utils.log("DEBUG", " Network Adapter create responseCode: " + returnCode, isDebugEnabled)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ utils.logAudit(networkResponse)
+ execution.setVariable(Prefix + "createNetworkResponse", networkResponse)
+ utils.log("DEBUG", " Network Adapter create Success Response - " + "\n" + networkResponse, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
+
+ } 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.getNodeText1(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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void validateSDNCResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateSDNCResponse() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ 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 = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "assignSDNCResponse"))
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").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)
+ utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void validateRpcSDNCActivateResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRpcSDNCActivateResponse() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ 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 = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "activateSDNCResponse"))
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").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)
+ utils.log("DEBUG", "Successfully Validated Rpc SDNC Activate Response", isDebugEnabled)
+
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated Rpc SDNC Activate Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+
+ public void prepareSDNCRollbackRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ 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)
+ utils.log("DEBUG", " Preparing request for SDNC Topology 'rollback-NetworkActivateRequest' rollback . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRollbackRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCRollbackRequest() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ 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)
+ utils.log("DEBUG", " Preparing request for SDNC Topology 'unassign-DeleteNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCRollbackRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCActivateRollback(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCActivateRollback() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ 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)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'deactivate-DeleteNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRpcSDNCActivateRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRollbackData() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled)
+
+ execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException"))
+ utils.log("DEBUG", "** WorkflowException : " + execution.getVariable("WorkflowException"), isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void postProcessResponse(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ 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)
+
+ utils.log("DEBUG", " ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"), isDebugEnabled)
+ // 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)
+ utils.log("DEBUG", " ***** postProcessResponse(), GOOD !!!", isDebugEnabled)
+ } 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.
+ utils.log("DEBUG", " ***** workflowException: " + execution.getVariable("workflowException"), isDebugEnabled)
+ 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
+ utils.log("DEBUG", " ***** postProcessResponse(), BAD !!!", isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ } catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+
+ }
+
+
+
+ }
+
+ public void prepareSuccessRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSuccessRollbackData() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("sdncVersion") == '1702') {
+ 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)
+
+ utils.log("DEBUG", "** 'rollbackData' for Full Rollback : " + rollbackData, isDebugEnabled)
+ execution.setVariable("WorkflowException", null)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void setExceptionFlag(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside setExceptionFlag() of DoCreateNetworkInstance ***** ", isDebugEnabled)
+
+ 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"))
+ }
+ utils.log("DEBUG", Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+
+ } catch(Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ 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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
new file mode 100644
index 0000000000..5b9cebc46b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
@@ -0,0 +1,387 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+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 {
+ 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(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "'rollbackData': " + '\n' + execution.getVariable("rollbackData"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ 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()
+ utils.log("DEBUG", dataErrorMessage , isDebugEnabled)
+ 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"))
+ }
+ utils.log("DEBUG", "*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+ 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)
+
+ }
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callPONetworkAdapter (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callPONetworkAdapter() of " + className + " ***** ", isDebugEnabled)
+
+ try {
+ String poUrl = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+ String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
+ String networkId = utils.getNodeText1(rollbackSDNCRequest, "network-id")
+
+ String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
+
+ String urlRollbackPoNetwork = poUrl+ "/" + networkId + "/rollback"
+ utils.log("DEBUG", "'urlRollbackPoNetwork': " + urlRollbackPoNetwork, isDebugEnabled)
+ 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)
+
+ utils.log("DEBUG", " Network Adapter rollback responseCode: " + responseCode, isDebugEnabled)
+ utils.log("DEBUG", " Network Adapter rollback responseBody: " + responseBody, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Exception Encountered in callPONetworkAdapter() of DoCreateNetworkInstanceRollback flow - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void validateRollbackResponses (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRollbackResponses() of DoCreateNetworkInstanceRollback ***** ", isDebugEnabled)
+
+ 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")
+ utils.log("DEBUG", " NetworkRollback Code - " + rollbackNetworkReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " NetworkRollback Response - " + rollbackNetworkResponse, isDebugEnabled)
+ 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 = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
+ rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText1(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. "
+ }
+ utils.log("DEBUG", " SDNC assign rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC assign rollback Response - " + rollbackSDNCResponse, isDebugEnabled)
+ }
+
+ // 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 = sdncAdapterUtils.decodeXML(rollbackActivateSDNCResponse)
+ rollbackActivateSDNCResponse = rollbackActivateSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackActivateSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackActivateSDNCResponse, "response-code")) {
+ rollbackActivateSDNCReturnInnerCode = utils.getNodeText1(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. "
+ }
+ utils.log("DEBUG", " SDNC activate rollback Code - " + rollbackActivateSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC activate rollback Response - " + rollbackActivateSDNCResponse, isDebugEnabled)
+ }
+
+
+ String statusMessage = ""
+ int errorCode = 7000
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+ 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
+ utils.log("DEBUG", "Final DoCreateNetworkInstanceRollback status message: " + statusMessage, isDebugEnabled)
+ 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. "
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ 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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
new file mode 100644
index 0000000000..e6276a8852
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -0,0 +1,549 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+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;
+
+/**
+ * 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 - Deferred/TODO
+ * @param - sdncVersion ("1610")
+ *
+ * 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 DoCreateServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DCRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ utils.log("DEBUG"," ***** preProcessRequest *****", isDebugEnabled)
+
+ 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
+
+ //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData & SDNC assignToplology
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ //requestDetails.modelInfo. for AAI PUT servieInstanceData & SDNC assignTopology
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+
+ //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"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(serviceModelInfo)) {
+ msg = "Input serviceModelInfo is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ if (isBlank(subscriptionServiceType)) {
+ msg = "Input subscriptionServiceType is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ 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"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+
+ String personaModelId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId")
+ String personaModelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+
+ if (personaModelId == null) {
+ personaModelId = ""
+ }
+ if (personaModelVersion == null) {
+ personaModelVersion = ""
+ }
+ if (serviceInstanceName == null) {
+ execution.setVariable("serviceInstanceName", "")
+ serviceInstanceName = ""
+ }
+
+ //AAI PUT
+ 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>${serviceInstanceName}</service-instance-name>
+ <orchestration-status>active</orchestration-status>
+ <persona-model-id>${personaModelId}</persona-model-id>
+ <persona-model-version>${personaModelVersion}</persona-model-version>
+ </service-instance>""".trim()
+
+ execution.setVariable("serviceInstanceData", serviceInstanceData)
+ utils.logAudit(serviceInstanceData)
+ utils.log("DEBUG", " 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData, isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ //TODO: Will be able to replace with call to GenericGetService
+ public void getAAICustomerById (Execution 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
+ utils.log("DEBUG"," ***** getAAICustomerById ***** globalCustomerId:" + globalCustomerId, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ 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
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ String getAAICustomerUrl = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8")
+
+ utils.logAudit(getAAICustomerUrl)
+ utils.log("DEBUG", "getAAICustomerById Url:" + getAAICustomerUrl, isDebugEnabled)
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getAAICustomerUrl)
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ msg = "getAAICustomerById ResponseCode:" + returnCode + " ResponseString:" + aaiResponseAsString
+ utils.log("DEBUG",msg, isDebugEnabled)
+ utils.logAudit(msg)
+
+ if (returnCode=='200') {
+ // Customer found by ID. FLow to proceed.
+ utils.log("DEBUG",msg, isDebugEnabled)
+
+ //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"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+
+ } else {
+ if (aaiResponseAsString.contains("RESTFault")) {
+ utils.log("ERROR", aaiResponseAsString)
+ WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+ execution.setVariable("WorkflowException", workflowException)
+ throw new BpmnError("MSOWorkflowException")
+
+ } else {
+ // aai all errors
+ msg = "Error in getAAICustomerById ResponseCode:" + returnCode
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in getAAICustomerById. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *****Exit getAAICustomerById *****", isDebugEnabled)
+
+ }
+
+ public void postProcessAAIGET(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ String msg = ""
+
+ try {
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
+ if(succInAAI != true){
+ utils.log("DEBUG","Error getting Service-instance from AAI", + 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("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ else
+ {
+ boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
+ if(foundInAAI == true){
+ utils.log("DEBUG","Found Service-instance in AAI", isDebugEnabled)
+ msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
+ }
+
+ public void postProcessAAIPUT(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIPUT ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
+ if(succInAAI != true){
+ utils.log("DEBUG","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", "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()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIPUT *** ", isDebugEnabled)
+ }
+
+ public void preProcessSDNCAssignRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ String msg = ""
+ utils.log("DEBUG"," ***** preProcessSDNCAssignRequest *****", isDebugEnabled)
+
+ 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 modelInvariantId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId")
+ def modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+ def modelUUId = jsonUtil.getJsonValue(serviceModelInfo, "modelVersionId")
+ def modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName")
+ def sdncRequestId = UUID.randomUUID().toString()
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUUId == null) {
+ modelUUId = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+
+ String sdncAssignRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${sdncRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>CreateServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${subscriptionServiceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantId}</model-invariant-uuid>
+ <model-uuid>${modelUUId}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${serviceInstanceName}</service-instance-name>
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.log("DEBUG","sdncAssignRequest:\n" + sdncAssignRequest, isDebugEnabled)
+ sdncAssignRequest = utils.formatXml(sdncAssignRequest)
+ execution.setVariable("sdncAssignRequest", sdncAssignRequest)
+ utils.logAudit("sdncAssignRequest: " + sdncAssignRequest)
+
+ def sdncRequestId2 = UUID.randomUUID().toString()
+ String sdncRollbackRequest = sdncAssignRequest.replace(">assign<", ">delete<").replace(">CreateServiceInstance<", ">DeleteServiceInstance<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("SERVICEINSTANCE", "sdncRollbackRequest", sdncRollbackRequest)
+ execution.setVariable("rollbackData", rollbackData)
+
+ utils.log("DEBUG","sdncRollbackRequest:\n" + sdncRollbackRequest, isDebugEnabled)
+ utils.log("DEBUG","rollbackData:\n" + rollbackData.toString(), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCAssignRequest. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *****Exit preProcessSDNCAssignRequest *****", isDebugEnabled)
+ }
+
+ public void postProcessSDNCAssign (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessSDNCAssign ***** ", isDebugEnabled)
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ String response = execution.getVariable("sdncAdapterResponse")
+ utils.logAudit("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ utils.log("DEBUG","Good response from SDNC Adapter for service-instance topology assign: \n" + response, isDebugEnabled)
+
+ def rollbackData = execution.getVariable("rollbackData")
+ rollbackData.put("SERVICEINSTANCE", "rollbackSDNC", "true")
+ execution.setVariable("rollbackData", rollbackData)
+
+ }else{
+ utils.log("DEBUG","Bad Response from SDNC Adapter for service-instance assign", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNCAssign. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessSDNCAssign *** ", isDebugEnabled)
+ }
+
+ public void postProcessAAIGET2(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIGET2 ***** ", isDebugEnabled)
+ String msg = ""
+
+ try {
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
+ if(succInAAI != true){
+ utils.log("DEBUG","Error getting Service-instance from AAI in postProcessAAIGET2", + 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 postProcessAAIGET2 GENGS_SuccessIndicator:" + succInAAI
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ else
+ {
+ boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
+ if(foundInAAI == true){
+ String aaiService = execution.getVariable("GENGS_service")
+ if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "service-instance-name"))) {
+ execution.setVariable("serviceInstanceName", utils.getNodeText1(aaiService, "service-instance-name"))
+ utils.log("DEBUG","Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"), isDebugEnabled)
+ }
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoCreateServiceInstance.postProcessAAIGET2 " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIGET2 *** ", isDebugEnabled)
+ }
+
+ public void preProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessRollback ***** ", isDebugEnabled)
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ utils.log("DEBUG", "BPMN Error during preProcessRollback", isDebugEnabled)
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit preProcessRollback *** ", isDebugEnabled)
+ }
+
+ public void postProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessRollback ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Setting prevException to WorkflowException: ", isDebugEnabled)
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ execution.setVariable("rollbackData", null)
+ } catch (BpmnError b) {
+ utils.log("DEBUG", "BPMN Error during postProcessRollback", isDebugEnabled)
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit postProcessRollback *** ", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
new file mode 100644
index 0000000000..1e6541e226
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
@@ -0,0 +1,231 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+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;
+/**
+ * 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{
+
+ String Prefix="DCRESIRB_"
+
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ String msg = ""
+ utils.log("DEBUG"," ***** preProcessRequest *****", isDebugEnabled)
+ execution.setVariable("rollbackAAI",false)
+ execution.setVariable("rollbackSDNC",false)
+
+ try {
+ def rollbackData = execution.getVariable("rollbackData")
+ utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
+
+ 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 sdncRollbackRequest = rollbackData.get("SERVICEINSTANCE", "sdncRollbackRequest")
+ execution.setVariable("sdncRollbackRequest", sdncRollbackRequest)
+ }
+ 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()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void validateSDNCResponse(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** validateSDNCResponse ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ String response = execution.getVariable("sdncAdapterResponse")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ utils.log("DEBUG", "SDNC Adapter for service-instance delete for rollback successful. response", isDebugEnabled)
+ }else{
+ execution.setVariable("rolledBack", false)
+ execution.setVariable("rollbackError", "Error Response from SDNC Adapter for service-instance delete for rollback")
+ utils.log("DEBUG","Error Response from SDNC Adapter for service-instance delete for rollback", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in Create ServiceInstance Rollback validateSDNCResponse " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit validateSDNCResponse ***** ", isDebugEnabled)
+ }
+
+ public void postProcessRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessRequest ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ execution.setVariable("rollbackData", null)
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean rollbackAAI = execution.getVariable("rollbackAAI")
+ boolean rollbackSDNC = execution.getVariable("rollbackSDNC")
+ if (rollbackAAI == true || rollbackSDNC == true)
+ {
+ execution.setVariable("rolledBack", true)
+ }
+ if (rollbackAAI == true)
+ {
+ boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
+ if(succInAAI != true){
+ 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")
+ utils.log("DEBUG","Error deleting service-instance in AAI for rollback", + serviceInstanceId, isDebugEnabled)
+ }
+ }
+ utils.log("DEBUG","*** Exit postProcessRequest ***", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ } catch (Exception ex) {
+ msg = "Exception in Create ServiceInstance Rollback postProcessRequest. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+
+ }
+
+ public void processRollbackException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** processRollbackException ***** ", isDebugEnabled)
+ try{
+ utils.log("DEBUG", "Caught an Exception in DoCreateServiceInstanceRollback", isDebugEnabled)
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught exception in ServiceInstance Create Rollback")
+ execution.setVariable("WorkflowException", null)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "BPMN Error during processRollbackExceptions Method: ", isDebugEnabled)
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processRollbackExceptions Method: " + e.getMessage(), isDebugEnabled)
+ }
+
+ utils.log("DEBUG", " Exit processRollbackException", isDebugEnabled)
+ }
+
+ public void processRollbackJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** processRollbackJavaException ***** ", isDebugEnabled)
+ try{
+ execution.setVariable("rollbackData", null)
+ execution.setVariable("rollbackError", "Caught Java exception in ServiceInstance Create Rollback")
+ utils.log("DEBUG", "Caught Exception in processRollbackJavaException", isDebugEnabled)
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception in processRollbackJavaException " + e.getMessage(), isDebugEnabled)
+ }
+ utils.log("DEBUG", "***** Exit processRollbackJavaException *****", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index 8293bfa9e3..269cb808c4 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -17,38 +17,42 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
-package com.att.bpm.scripts;
-
+
+package org.openecomp.mso.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.runtime.Execution
-import org.apache.commons.lang3.*
-
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-
-import org.apache.commons.codec.binary.Base64
-import org.springframework.web.util.UriUtils
-
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.rest.APIResponse
import org.openecomp.mso.rest.RESTClient
import org.openecomp.mso.rest.RESTConfig
-
-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 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
+
+
public class DoCreateVfModule extends VfModuleBase {
String Prefix="DCVFM_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
/**
* Validates the request message and sets up the workflow.
@@ -62,213 +66,383 @@ public class DoCreateVfModule extends VfModuleBase {
logDebug('Entered ' + method, isDebugLogEnabled)
execution.setVariable('prefix', Prefix)
-try{
- String request = execution.getVariable("DoCreateVfModuleRequest")
- utils.logAudit("DoCreateVfModule request: " + request)
-
- def rollbackData = execution.getVariable("RollbackData")
- if (rollbackData == null) {
- rollbackData = new RollbackData()
- }
+ try{
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
- execution.setVariable ("CreateAAIVfModuleRequest", request)
- execution.setVariable("DCVFM_vnfParamsExistFlag", false)
- //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)
- logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
- //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)
- logDebug("vnfType: " + vnfType, isDebugLogEnabled)
- //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)
- logDebug("vnfName: " + vnfName, isDebugLogEnabled)
- //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)
- logDebug("vnfId: " + vnfId, isDebugLogEnabled)
- //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)
- logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
- //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)
- logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
- //vfModuleId
- def vfModuleId = ""
- if (utils.nodeExists(request, "vf-module-id")) {
- vfModuleId = utils.getNodeText(request, "vf-module-id")
- }
- execution.setVariable("DCVFM_vfModuleId", vfModuleId)
- logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
- def requestId = ""
- if (utils.nodeExists(request, "request-id")) {
- requestId = utils.getNodeText(request, "request-id")
- }
- execution.setVariable("DCVFM_requestId", requestId)
- logDebug("requestId: " + requestId, isDebugLogEnabled)
- //serviceId
- def serviceId = ""
- if (utils.nodeExists(request, "service-id")) {
- serviceId = utils.getNodeText(request, "service-id")
- }
- execution.setVariable("DCVFM_serviceId", serviceId)
- logDebug("serviceId: " + serviceId, isDebugLogEnabled)
- //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)
- logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
- //source
- def source = ""
- if (utils.nodeExists(request, "source")) {
- source = utils.getNodeText(request, "source")
- }
- execution.setVariable("DCVFM_source", source)
- rollbackData.put("VFMODULE", "source", source)
- logDebug("source: " + source, isDebugLogEnabled)
- //backoutOnFailure
- NetworkUtils networkUtils = new NetworkUtils()
- def backoutOnFailure = networkUtils.isRollbackEnabled(execution,request)
- execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
- logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
- //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)
- logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+ 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")
+ logDebug("serviceModelInfo: " + serviceModelInfo, isDebugLogEnabled)
+ 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)
+ logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
+ //vnfType
+ def vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DCVFM_vnfType", vnfType)
+ rollbackData.put("VFMODULE", "vnftype", vnfType)
+ logDebug("vnfType: " + vnfType, isDebugLogEnabled)
+ //vnfName
+ def vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DCVFM_vnfName", vnfName)
+ rollbackData.put("VFMODULE", "vnfname", vnfName)
+ logDebug("vnfName: " + vnfName, isDebugLogEnabled)
+ //vnfId
+ def vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DCVFM_vnfId", vnfId)
+ rollbackData.put("VFMODULE", "vnfid", vnfId)
+ logDebug("vnfId: " + vnfId, isDebugLogEnabled)
+ //vfModuleName
+ def vfModuleName = execution.getVariable("vfModuleName")
+ execution.setVariable("DCVFM_vfModuleName", vfModuleName)
+ rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
+ logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
+ execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
+ rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
+ logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationUuid")
+ execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid)
+ rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid)
+ logDebug("modelCustomizationUuid: " + modelCustomizationUuid, isDebugLogEnabled)
+ //vfModuleId
+ def vfModuleId = execution.getVariable("vfModuleId")
+ execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+ logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
+ def requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("DCVFM_requestId", requestId)
+ logDebug("requestId: " + requestId, isDebugLogEnabled)
+ // 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)
+ logDebug("serviceId: " + serviceId, isDebugLogEnabled)
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
+ rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
+ logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
+ //source - HARDCODED
+ def source = "VID"
+ execution.setVariable("DCVFM_source", source)
+ rollbackData.put("VFMODULE", "source", source)
+ logDebug("source: " + source, isDebugLogEnabled)
+ //backoutOnFailure
+ def disableRollback = execution.getVariable("disableRollback")
+ def backoutOnFailure = true
+ if (disableRollback != null && disableRollback.equals("true")) {
+ backoutOnFailure = false
+ }
+ execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
+ logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
+ //isBaseVfModule
+ def isBaseVfModule = execution.getVariable("isBaseVfModule")
+ execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
+ logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
+ //personaModelId
+ execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantId"))
+ //personaModelVersion
+ execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelVersion"))
+ //vfModuleLabel
+ def vfModuleLabel = execution.getVariable("vfModuleLabel")
+ if (vfModuleLabel != null) {
+ execution.setVariable("DCVFM_vfModuleLabel", vfModuleLabel)
+ logDebug("vfModuleLabel: " + vfModuleLabel, isDebugLogEnabled)
+ }
+ //Get or Generate UUID
+ String uuid = execution.getVariable("DCVFM_uuid")
+ if(uuid == null){
+ uuid = UUID.randomUUID()
+ logDebug("Generated messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }else{
+ logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }
+ //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)
+ logDebug("globalSubsrciberId: " + globalSubscriberId, isDebugLogEnabled)
+ 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)
+ logDebug("usePreload: " + usePreload, isDebugLogEnabled)
- //asdcServiceModelVersion
- def asdcServiceModelVersion = ""
- if (utils.nodeExists(request, "asdc-service-model-version")) {
- asdcServiceModelVersion = utils.getNodeText(request, "asdc-service-model-version")
- }
- execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
- logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
-
- //Get or Generate UUID
- String uuid = execution.getVariable("DCVFM_uuid")
- if(uuid == null){
- uuid = UUID.randomUUID()
- logDebug("Generated messageId (UUID) is: " + uuid, isDebugLogEnabled)
- }else{
- logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled)
- }
- 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", "")
- 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")
-
- String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
- def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
- }
- execution.setVariable("DCVFM_sdncCallbackUrl", sdncCallbackUrl)
- utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
- logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugLogEnabled)
- String vnfCallbackUrl = (String) execution.getVariable('URN_mso_workflow_vnfadapter_rest_callback')
- if (vnfCallbackUrl == null || vnfCallbackUrl.trim().isEmpty()) {
- def msg = 'Required variable \'URN_mso_workflow_vnfadapter_rest_callback\' is missing'
- logError(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
+ else {
+ // The info is inside the request - DEAD CODE
+ utils.logAudit("DoCreateVfModule request: " + request)
- // Process the parameters
+ //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)
+ logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
+ //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)
+ logDebug("vnfType: " + vnfType, isDebugLogEnabled)
+ //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)
+ logDebug("vnfName: " + vnfName, isDebugLogEnabled)
+ //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)
+ logDebug("vnfId: " + vnfId, isDebugLogEnabled)
+ //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)
+ logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
+ //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)
+ logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
+ //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)
+ logDebug("modelCustomizationUuid: " + modelCustomizationUuid, isDebugLogEnabled)
+ //vfModuleId
+ def vfModuleId = ""
+ if (utils.nodeExists(request, "vf-module-id")) {
+ vfModuleId = utils.getNodeText(request, "vf-module-id")
+ }
+ execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+ logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
+ def requestId = ""
+ if (utils.nodeExists(request, "request-id")) {
+ requestId = utils.getNodeText(request, "request-id")
+ }
+ execution.setVariable("DCVFM_requestId", requestId)
+ logDebug("requestId: " + requestId, isDebugLogEnabled)
+ //serviceId
+ def serviceId = ""
+ if (utils.nodeExists(request, "service-id")) {
+ serviceId = utils.getNodeText(request, "service-id")
+ }
+ execution.setVariable("DCVFM_serviceId", serviceId)
+ logDebug("serviceId: " + serviceId, isDebugLogEnabled)
+ //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)
+ logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
+ //source
+ def source = ""
+ if (utils.nodeExists(request, "source")) {
+ source = utils.getNodeText(request, "source")
+ }
+ execution.setVariable("DCVFM_source", source)
+ rollbackData.put("VFMODULE", "source", source)
+ logDebug("source: " + source, isDebugLogEnabled)
+ //backoutOnFailure
+ NetworkUtils networkUtils = new NetworkUtils()
+ def backoutOnFailure = networkUtils.isRollbackEnabled(execution,request)
+ execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
+ logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
+ //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)
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
- String vnfParamsChildNodes = utils.getChildNodes(request, "vnf-params")
- if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
- utils.log("DEBUG", "Request contains NO VNF Params", isDebugLogEnabled)
- }else{
- utils.log("DEBUG", "Request does contain VNF Params", isDebugLogEnabled)
- 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)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = ""
+ if (utils.nodeExists(request, "asdc-service-model-version")) {
+ asdcServiceModelVersion = utils.getNodeText(request, "asdc-service-model-version")
+ }
+ execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
+ logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
+
+ //personaModelId
+ def personaModelId = ""
+ if (utils.nodeExists(request, "persona-model-id")) {
+ personaModelId = utils.getNodeText(request, "persona-model-id")
}
- execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
+ execution.setVariable("DCVFM_personaModelId", personaModelId)
+ logDebug("personaModelId: " + personaModelId, isDebugLogEnabled)
+
+ //personaModelVersion
+ def personaModelVersion = ""
+ if (utils.nodeExists(request, "persona-model-version")) {
+ personaModelVersion = utils.getNodeText(request, "persona-model-version")
+ }
+ execution.setVariable("DCVFM_personaModelVersion", personaModelVersion)
+ logDebug("personaModelVersion: " + personaModelVersion, isDebugLogEnabled)
+
+ // Process the parameters
+
+ String vnfParamsChildNodes = utils.getChildNodes(request, "vnf-params")
+ if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
+ utils.log("DEBUG", "Request contains NO VNF Params", isDebugLogEnabled)
+ }else{
+ utils.log("DEBUG", "Request does contain VNF Params", isDebugLogEnabled)
+ 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)
+ }
}
- execution.setVariable("RollbackData", rollbackData)
-}catch(BpmnError b){
+ //Get or Generate UUID
+ String uuid = execution.getVariable("DCVFM_uuid")
+ if(uuid == null){
+ uuid = UUID.randomUUID()
+ logDebug("Generated messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }else{
+ logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }
+ // Get sdncVersion, default to empty
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = ""
+ }
+ logDebug("sdncVersion: " + sdncVersion, isDebugLogEnabled)
+ 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")
+
+ String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("DCVFM_sdncCallbackUrl", sdncCallbackUrl)
+ utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+ logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugLogEnabled)
+
+
+ execution.setVariable("RollbackData", rollbackData)
+ }catch(BpmnError b){
throw b
-}catch(Exception e){
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
-}
+ }catch(Exception e){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+ }
logDebug('Exited ' + method, isDebugLogEnabled)
}
@@ -299,7 +473,7 @@ try{
logDebug('Entered ' + method, isDebugLogEnabled)
try {
- buildResponse(execution, "", 200)
+ sendWorkflowResponse(execution, 200, "")
logDebug('Exited ' + method, isDebugLogEnabled)
} catch (BpmnError e) {
throw e;
@@ -340,6 +514,9 @@ try{
String vfModuleId = utils.getNodeText1(createResponse, 'vf-module-id')
execution.setVariable('DCVFM_vfModuleId', vfModuleId)
logDebug("vfModuleId is: " + vfModuleId, isDebugLogEnabled)
+ String vfModuleIndex= utils.getNodeText1(createResponse, 'vf-module-index')
+ execution.setVariable('DCVFM_vfModuleIndex', vfModuleIndex)
+ logDebug("vfModuleIndex is: " + vfModuleIndex, isDebugLogEnabled)
rollbackData.put("VFMODULE", "vnfid", vnfId)
rollbackData.put("VFMODULE", "vfmoduleid", vfModuleId)
rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true")
@@ -375,11 +552,9 @@ try{
String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
- String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
utils.logAudit("AAI endPoint: " + endPoint)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
try {
RESTConfig config = new RESTConfig(endPoint);
def responseData = ''
@@ -389,11 +564,6 @@ try{
addHeader('X-FromAppId', 'MSO').
addHeader('Content-Type', 'application/xml').
addHeader('Accept','application/xml');
-
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
APIResponse response = client.httpGet()
utils.logAudit("createVfModule - invoking httpGet() to AAI")
@@ -485,30 +655,24 @@ try{
logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
}
- public void preProcessSDNCGetRequest(Execution execution){
+ public void preProcessSDNCGetRequest(Execution execution, String element){
def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ String sdncVersion = execution.getVariable("DCVFM_sdncVersion")
execution.setVariable("prefix", Prefix)
utils.log("DEBUG", " ======== STARTED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled)
try{
- String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
- utils.logAudit("DCVFM_assignSDNCAdapterResponse is: \n" + response)
-
- String data = utils.getNodeXml(response, "response-data")
- data = data.replaceAll("&lt;", "<")
- data = data.replaceAll("&gt;", ">")
- String vnfId = utils.getNodeText1(data, "vnf-id")
- def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
def serviceInstanceId = execution.getVariable('DCVFM_serviceInstanceId')
-
+
String uuid = execution.getVariable('testReqId') // for junits
if(uuid==null){
- uuid = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
}
-
- String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId
+
def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
utils.logAudit("callbackUrl:" + callbackUrl)
-
+
+ def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
+
def svcInstId = ""
if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
svcInstId = vfModuleId
@@ -516,14 +680,43 @@ try{
else {
svcInstId = serviceInstanceId
}
+ // 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.getNodeText1(vnfQueryResponse, "selflink")
+ utils.log("DEBUG", "VNF - service operation: " + serviceOperation, isDebugLogEnabled)
+ }
+ else if (element.equals("vfmodule")) {
+ String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+ utils.logAudit("DCVFM_assignSDNCAdapterResponse is: \n" + response)
+
+ if (!sdncVersion.equals("1707")) {
+ serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId
+ utils.log("DEBUG", "VF Module with sdncVersion before 1707 - service operation: " + serviceOperation, isDebugLogEnabled)
+ }
+ else {
+ String data = utils.getNodeXml(response, "response-data")
+ data = data.replaceAll("&lt;", "<")
+ data = data.replaceAll("&gt;", ">")
+ utils.log("DEBUG", "responseData: " + data, isDebugLogEnabled)
+ serviceOperation = utils.getNodeText1(data, "object-path")
+ utils.log("DEBUG", "VF Module with sdncVersion of 1707 - service operation: " + serviceOperation, isDebugLogEnabled)
+ }
+ }
//!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE
sleep(5000)
String SDNCGetRequest =
- """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
- xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
<sdncadapter:RequestHeader>
<sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
<sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
@@ -574,6 +767,8 @@ try{
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
@@ -592,11 +787,13 @@ try{
def asdcServiceModelVersion = execution.getVariable("DCVFM_asdcServiceModelVersion")
//volumeGroupStackId
def volumeGroupStackId = execution.getVariable("DCVFM_volumeGroupStackId")
+ //modelCustomizationUuid
+ def modelCustomizationUuid = execution.getVariable("DCVFM_modelCustomizationUuid")
- def messageId = execution.getVariable('att-mso-request-id') + '-' +
+ def messageId = execution.getVariable('mso-request-id') + '-' +
System.currentTimeMillis()
- def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
utils.logAudit("notificationUrl: " + notificationUrl)
@@ -606,34 +803,14 @@ try{
notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
}
- String vnfParams
- if(execution.getVariable("DCVFM_vnfParamsExistFlag") == true){
- StringBuilder sbParams = new StringBuilder()
- Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
-
- for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
- String paramsXml
- String paramName = entry.getKey();
- String paramValue = entry.getValue()
- paramsXml =
- """ <entry>
- <key>${paramName}</key>
- <value>${paramValue}</value>
- </entry>
- """
-
- vnfParams = sbParams.append(paramsXml)
- }
- }else{
- vnfParams = ""
- }
-
+ Map<String, String> vnfParamsMap = execution.getVariable("DCVFM_vnfParamsMap")
+
//Get SDNC Response Data for VnfSubCreate Request
String sdncGetResponse = execution.getVariable('DCVFM_getSDNCAdapterResponse')
utils.logAudit("sdncGetResponse: " + sdncGetResponse)
- String vfModuleParams = buildVfModuleParams(vnfParams, sdncGetResponse, vnfId, vnfName,
- vfModuleId, vfModuleName)
+ String vfModuleParams = buildVfModuleParams(vnfParamsMap, sdncGetResponse, vnfId, vnfName,
+ vfModuleId, vfModuleName, vfModuleIndex)
def svcInstId = ""
if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
@@ -643,7 +820,6 @@ try{
svcInstId = serviceInstanceId
}
-
def createVnfARequest = """
<createVfModuleRequest>
<cloudSiteId>${cloudSiteId}</cloudSiteId>
@@ -655,6 +831,7 @@ try{
<vnfType>${vnfType}</vnfType>
<vfModuleType>${vfModuleModelName}</vfModuleType>
<vnfVersion>${asdcServiceModelVersion}</vnfVersion>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
<requestType></requestType>
<volumeGroupId>${volumeGroupId}</volumeGroupId>
<volumeGroupStackId>${volumeGroupStackId}</volumeGroupStackId>
@@ -722,16 +899,16 @@ try{
/*
- def requestId = execution.getVariable("att-mso-request-id")
+ def requestId = execution.getVariable("mso-request-id")
if (requestId == null) {
- createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
}
- def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
if (serviceInstanceId == null) {
- createWorkflowException(execution, 1002, processKey + " request message has no att-mso-service-instance-id")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
}
utils.logContext(requestId, serviceInstanceId)
@@ -793,7 +970,7 @@ try{
String uuid = execution.getVariable('testReqId') // for junits
if(uuid==null){
- uuid = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
}
def callbackURL = execution.getVariable("DCVFM_sdncCallbackUrl")
def requestId = execution.getVariable("DCVFM_requestId")
@@ -808,6 +985,21 @@ try{
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 = "<modelCustomizationUuid>" + modelCustomizationUuid + "</modelCustomizationUuid>"
+ }
String sdncVNFParamsXml = ""
@@ -816,11 +1008,15 @@ try{
}else{
sdncVNFParamsXml = ""
}
-
- String sdncRequest =
- """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
- xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+
+ String sdncRequest = ""
+
+ if (!sdncVersion.equals("1707")) {
+
+ sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
<sdncadapter:RequestHeader>
<sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
<sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
@@ -850,10 +1046,114 @@ try{
<generic-vnf-type>${vnfType}</generic-vnf-type>
<aic-cloud-region>${cloudSiteId}</aic-cloud-region>
<tenant>${tenantId}</tenant>
+ ${modelCustomizationUuidString}
+ <use-preload>${usePreloadToSDNC}</use-preload>
${sdncVNFParamsXml}
</vnf-request-information>
</sdncadapterworkflow:SDNCRequestData>
</sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ }
+ else {
+
+ sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>CreateVfModuleInstance</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${serviceId}</subscription-service-type>
+ ${serviceEcompModelInformation}
+ <service-instance-id>${svcInstId}</service-instance-id>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <vnf-request-information>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ </vnf-request-information>
+ <vnf-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-type>${vnfType}</vnf-type>
+ ${vnfEcompModelInformation}
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <vf-module-type>${vfModuleModelName}</vf-module-type>
+ ${vfModuleEcompModelInformation}
+ </vf-module-information>
+ <vf-module-request-input>
+ <request-version>${sdncVersion}</request-version>
+ <vf-module-name>${vfModuleName}</vf-module-name>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ ${sdncVNFParamsXml}
+ </vf-module-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+
+ /*
+ sdncRequest =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>CreateVfModuleInstance</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <service-type>${serviceId}</service-type>
+ ${serviceEcompModelInformation}
+ <service-instance-id>${svcInstId}</service-instance-id>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-type>${vnfType}</vnf-type>
+ ${vnfEcompModelInformation}
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <vf-module-type>${vfModuleModelName}</vf-module-type>
+ ${vfModuleEcompModelInformation}
+ </vf-module-information>
+ <vf-module-request-input>
+ <request-version>${sdncVersion}</request-version>
+ <vf-module-name>${vfModuleName}</vf-module-name>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ ${sdncVNFParamsXml}
+ </vf-module-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+ */
+
+ }
utils.logAudit("sdncRequest: " + sdncRequest)
return sdncRequest
@@ -927,6 +1227,7 @@ try{
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) {
@@ -937,8 +1238,27 @@ try{
logDebug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn, isDebugLogEnabled)
execution.setVariable("DCVFM_contrailServiceInstanceFqdn", contrailServiceInstanceFqdn)
}
+ else if (key.endsWith("contrail_network_policy_fqdn")) {
+ String contrailNetworkPolicyFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn, isDebugLogEnabled)
+ contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
+ }
+ else if (key.equals("oam_management_v4_address")) {
+ String oamManagementV4Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV4Address: " + oamManagementV4Address, isDebugLogEnabled)
+ execution.setVariable("DCVFM_oamManagementV4Address", oamManagementV4Address)
+ }
+ else if (key.equals("oam_management_v6_address")) {
+ String oamManagementV6Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV6Address: " + oamManagementV6Address, isDebugLogEnabled)
+ execution.setVariable("DCVFM_oamManagementV6Address", oamManagementV6Address)
+ }
+
}
}
+ if (!contrailNetworkPolicyFqdnList.isEmpty()) {
+ execution.setVariable("DCVFM_contrailNetworkPolicyFqdnList", contrailNetworkPolicyFqdnList)
+ }
}
}else{
logDebug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.", isDebugLogEnabled)
@@ -1073,7 +1393,7 @@ try{
String uuid = execution.getVariable('testReqId') // for junits
if(uuid==null){
- uuid = execution.getVariable("att-mso-request-id") + "-" + System.currentTimeMillis()
+ uuid = execution.getVariable("mso-request-id") + "-" + System.currentTimeMillis()
}
String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vnfId
@@ -1081,9 +1401,9 @@ try{
utils.logAudit("callbackUrl: " + callbackUrl)
String SDNCGetRequest =
- """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
- xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
<sdncadapter:RequestHeader>
<sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
<sdncadapter:SvcAction>query</sdncadapter:SvcAction>
@@ -1216,6 +1536,7 @@ try{
}
/**
+ *
*This method occurs when an MSOWorkflowException is caught. It logs the
*variables and ensures that the "WorkflowException" Variable is set.
*
@@ -1276,6 +1597,245 @@ try{
}
+ public void createNetworkPoliciesInAAI(Execution execution) {
+ def method = getClass().getSimpleName() + '.createNetworkPoliciesInAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED createNetworkPoliciesInAAI ======== ", isDebugLogEnabled)
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable("DCVFM_contrailNetworkPolicyFqdnList")
+ int fqdnCount = fqdnList.size()
+ def rollbackData = execution.getVariable("RollbackData")
+
+ execution.setVariable("DCVFM_networkPolicyFqdnCount", fqdnCount)
+ logDebug("DCVFM_networkPolicyFqdnCount - " + fqdnCount, isDebugLogEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ 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")
+ utils.logAudit("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+
+ 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)
+ logDebug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugLogEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ // This network policy FQDN already exists in AAI
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable("DCVFM_queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ logDebug(" QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugLogEnabled)
+
+ } else {
+ if (returnCode == 404) {
+ // This network policy FQDN is not in AAI yet. Add it now
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ logDebug("This network policy FQDN is not in AAI yet: " + fqdn, isDebugLogEnabled)
+ utils.logAudit("Network policy FQDN is not in AAI yet")
+ // Add the network policy with this FQDN to AAI
+ def networkPolicyId = UUID.randomUUID().toString()
+ logDebug("Adding network-policy with network-policy-id " + networkPolicyId, isDebugLogEnabled)
+
+ String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ logDebug('AAI namespace is: ' + aaiNamespace, isDebugLogEnabled)
+ String payload = """<network-policy xmlns="${aaiNamespace}">
+ <network-policy-id>${networkPolicyId}</network-policy-id>
+ <network-policy-fqdn>${fqdn}</network-policy-fqdn>
+ <heat-stack-id>${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")
+ utils.logAudit("AAI request endpoint: " + addNetworkPolicyAAIRequest)
+ logDebug("AAI request endpoint: " + addNetworkPolicyAAIRequest, isDebugLogEnabled)
+
+ 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");
+ logDebug("invoking PUT call to AAI with payload:"+System.lineSeparator()+payload, isDebugLogEnabled)
+ utils.logAudit("Sending PUT call to AAI with Endpoint /n" + addNetworkPolicyAAIRequest + " with payload /n" + payload)
+ APIResponse responsePut = clientPut.httpPut(payload)
+ int returnCodePut = responsePut.getStatusCode()
+ execution.setVariable("DCVFM_aaiAddNetworkPolicyReturnCode", returnCodePut)
+ logDebug(" ***** AAI add network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodePut, isDebugLogEnabled)
+
+ String aaiResponseAsStringPut = responsePut.getResponseBodyAsString()
+ if (isOneOf(returnCodePut, 200, 201)) {
+ logDebug("The return code from adding network policy is: " + returnCodePut, isDebugLogEnabled)
+ // This network policy was created in AAI successfully
+ utils.logAudit(aaiResponseAsStringPut)
+ execution.setVariable("DCVFM_addNetworkPolicyAAIResponse", aaiResponseAsStringPut)
+ logDebug(" AddAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsStringPut, isDebugLogEnabled)
+ 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
+ logDebug(putErrorMessage, isDebugLogEnabled)
+ 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
+ logDebug(dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+
+ } else {
+ logDebug("No contrail network policies to query/create", isDebugLogEnabled)
-}
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateVfModule flow. createNetworkPoliciesInAAI() - " + ex.getMessage()
+ logDebug(exceptionMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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>${vnfId}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DCVM_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.postProcessUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in postProcessUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
index 76347d55a6..8ca749d1ec 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
@@ -1,34 +1,33 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-import java.io.Serializable;
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
@@ -73,9 +72,27 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
execution.setVariable("DCVFMR_cloudSiteId", cloudSiteId)
String heatStackId = rollbackData.get("VFMODULE", "heatstackid")
execution.setVariable("DCVFMR_heatStackId", heatStackId)
- String requestId = rollbackData.get("VFMODULE", "attmsorequestid")
+ String requestId = rollbackData.get("VFMODULE", "msorequestid")
execution.setVariable("DCVFMR_requestId", requestId)
- //String serviceInstanceId = rollbackData.get("VFMODULE", "attmsoserviceinstanceid")
+ List createdNetworkPolicyFqdnList = []
+ int i = 0
+ while (i < 100) {
+ String fqdn = rollbackData.get("VFMODULE", "contrailNetworkPolicyFqdn" + i)
+ if (fqdn == null) {
+ break
+ }
+ createdNetworkPolicyFqdnList.add(fqdn)
+ logDebug("got fqdn # " + i + ": " + fqdn, isDebugEnabled)
+ 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"))
@@ -83,6 +100,8 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
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>
@@ -91,6 +110,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
<orchestration-status>pending-delete</orchestration-status>
</PrepareUpdateAAIVfModuleRequest>""" as String
utils.log("DEBUG", "PrepareUpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("DoCreateVfModuleRollback PrepareUpdateAAIVfModule Request: " + request)
execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
}
@@ -99,7 +119,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
public void prepSDNCAdapterRequest(Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
-
+
def callbackUrl = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
String source = execution.getVariable("DCVFMR_source")
@@ -113,12 +133,12 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
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 {
- serviceInstandIdToSdnc = vfModuleId
+ serviceInstanceIdToSdnc = vfModuleId
}
def doSDNCActivateRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestActivate")
@@ -139,9 +159,9 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
return
- String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
- xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+ String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
<sdncadapter:RequestHeader>
<sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
<sdncadapter:SvcInstanceId>${vfModuleId}</sdncadapter:SvcInstanceId>
@@ -178,6 +198,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
</sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
utils.log("DEBUG", "sdncAdapterWorkflowRequest: " + request, isDebugEnabled)
+ utils.logAudit("DoCreateVfModuleRollback sdncAdapterWorkflow Request: " + request)
execution.setVariable("sdncAdapterWorkflowRequest", request)
}
@@ -193,9 +214,9 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
String vfModuleStackId = execution.getVariable("DCVFMR_heatStackId")
String tenantId = execution.getVariable("DCVFMR_tenantId")
- def messageId = execution.getVariable('att-mso-request-id') + '-' +
+ def messageId = execution.getVariable('mso-request-id') + '-' +
System.currentTimeMillis()
- def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
if ('true'.equals(useQualifiedHostName)) {
notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
@@ -219,6 +240,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
""" as String
utils.log("DEBUG", "vnfAdapterRestV1Request: " + request, isDebugEnabled)
+ utils.logAudit("PrepareUpdateAAIVfModule vnfAdapterRestV1 Request: " + request)
execution.setVariable("vnfAdapterRestV1Request", request)
}
@@ -236,6 +258,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
<orchestration-status>deleted</orchestration-status>
</UpdateAAIVfModuleRequest>""" as String
utils.log("DEBUG", "UpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("UpdateAAIVfModule Request: " + request)
execution.setVariable("UpdateAAIVfModuleRequest", request)
}
@@ -251,6 +274,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
<vf-module-id>${vfModuleId}</vf-module-id>
</DeleteAAIVfModuleRequest>""" as String
utils.log("DEBUG", "DeleteAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("DeleteAAIVfModule Request: " + request)
execution.setVariable("DeleteAAIVfModuleRequest", request)
}
@@ -281,4 +305,183 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
throw new BpmnError("MSOWorkflowException")
}
}
+
+ public void deleteNetworkPoliciesFromAAI(Execution execution) {
+ def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED deleteNetworkPoliciesFromAAI ======== ", isDebugLogEnabled)
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable(Prefix + "createdNetworkPolicyFqdnList")
+ if (fqdnList == null) {
+ logDebug("No network policies to delete", isDebugLogEnabled)
+ return
+ }
+ int fqdnCount = fqdnList.size()
+
+ execution.setVariable(Prefix + "networkPolicyFqdnCount", fqdnCount)
+ logDebug("networkPolicyFqdnCount - " + fqdnCount, isDebugLogEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ 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")
+ utils.logAudit("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+ logDebug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest, isDebugLogEnabled)
+
+ def aaiRequestId = UUID.randomUUID().toString()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyByFqdnAAIRequest)
+ int returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQueryNetworkPolicyByFqdnReturnCode", returnCode)
+ logDebug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugLogEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ // This network policy FQDN exists in AAI - need to delete it now
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ logDebug("QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugLogEnabled)
+ // Retrieve the network policy id for this FQDN
+ def networkPolicyId = utils.getNodeText1(aaiResponseAsString, "network-policy-id")
+ logDebug("Deleting network-policy with network-policy-id " + networkPolicyId, isDebugLogEnabled)
+
+ // Retrieve the resource version for this network policy
+ def resourceVersion = utils.getNodeText1(aaiResponseAsString, "resource-version")
+ logDebug("Deleting network-policy with resource-version " + resourceVersion, isDebugLogEnabled)
+
+ String delNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8") +
+ "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+
+ utils.logAudit("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+ logDebug("AAI request endpoint: " + delNetworkPolicyAAIRequest, isDebugLogEnabled)
+
+ def aaiRequestIdDel = UUID.randomUUID().toString()
+ logDebug("invoking DELETE call to AAI", isDebugLogEnabled)
+ utils.logAudit("Sending DELETE call to AAI with Endpoint /n" + delNetworkPolicyAAIRequest)
+
+ APIResponse responseDel = aaiUriUtil.executeAAIDeleteCall(execution, delNetworkPolicyAAIRequest)
+
+ int returnCodeDel = responseDel.getStatusCode()
+ execution.setVariable(Prefix + "aaiDeleteNetworkPolicyReturnCode", returnCodeDel)
+ logDebug(" ***** AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodeDel, isDebugLogEnabled)
+
+ if (isOneOf(returnCodeDel, 200, 201, 204)) {
+ logDebug("The return code from deleting network policy is: " + returnCodeDel, isDebugLogEnabled)
+ // This network policy was deleted from AAI successfully
+ logDebug(" DelAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : ", isDebugLogEnabled)
+
+ } else {
+ // aai all errors
+ String delErrorMessage = "Unable to delete network-policy to AAI deleteNetworkPoliciesFromAAI - " + returnCodeDel
+ logDebug(delErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, delErrorMessage)
+ }
+ } else if (returnCode == 404) {
+ // This network policy FQDN is not in AAI. No need to delete.
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ logDebug("This network policy FQDN is not in AAI: " + fqdn, isDebugLogEnabled)
+ utils.logAudit("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
+ logDebug(dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+
+
+ } // end loop
+
+
+ } else {
+ logDebug("No contrail network policies to query/create", isDebugLogEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoCreateVfModuleRollback flow. deleteNetworkPoliciesFromAAI() - " + ex.getMessage()
+ logDebug(exceptionMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void preProcessUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessUpdateAAIGenericVnf((' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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>${vnfId}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable(Prefix + 'updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessUpdateAAIGenericVnf((): ' + e.getMessage())
+ }
+ }
}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy
index 12a21c6eba..f54fa5c88b 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1.groovy
@@ -18,25 +18,20 @@
* ============LICENSE_END=========================================================
*/
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.infrastructure.scripts
-import static org.camunda.spin.Spin.XML;
-import groovy.json.JsonSlurper
-import groovy.lang.GroovyInterceptable;
-import groovy.xml.XmlUtil
-import org.springframework.web.util.UriUtils
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-import java.util.UUID;
+import static org.camunda.spin.Spin.XML
+import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
class DoCreateVfModuleVolumeV1 extends VfModuleBase {
@@ -63,7 +58,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
execution.setVariable(prefix+'SuccessIndicator', false)
- // INPUT: DoCreateVfModuleVolumeV1Request, att-mso-request-id, volume-group-id, vnf-id, is-vid-request
+ // INPUT: DoCreateVfModuleVolumeV1Request, mso-request-id, volume-group-id, vnf-id, is-vid-request
// OUTPUT: DCVFMODVOLV1_SuccessIndicator. WorkflowException
def volumeRequest = getVariable(execution, 'DoCreateVfModuleVolumeV1Request')
@@ -86,12 +81,12 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
(new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'DoCreateVfModuleVolumeV1 received null volume-group-id.')
}
- def requestId = execution.getVariable("att-mso-request-id")
+ def requestId = execution.getVariable("mso-request-id")
if (requestId == null || requestId == "") {
requestId = utils.getNodeText1(volumeRequest, "request-id")
}
- //def serviceId = execution.getVariable("att-mso-service-instance-id")
+ //def serviceId = execution.getVariable("mso-service-instance-id")
//if (serviceId == null || serviceId == "") {
def serviceId = utils.getNodeText1(volumeRequest, "service-id")
//}
@@ -240,6 +235,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
def volumeRequest = execution.getVariable(prefix+'Request')
def vnfId = execution.getVariable('vnf-id')
def volumeName = utils.getNodeText(volumeRequest, "volume-group-name")
+ def modelCustomizationId = getNodeTextForce(volumeRequest, "model-customization-id")
def cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
def groupId = execution.getVariable('volume-group-id')
@@ -259,7 +255,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
def tenantId = utils.getNodeText(volumeRequest, "tenant-id")
NetworkUtils networkUtils = new NetworkUtils()
- String payload = networkUtils.createCloudRegionVolumeRequest(groupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace)
+ String payload = networkUtils.createCloudRegionVolumeRequest(groupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace, modelCustomizationId)
String payloadXml = utils.formatXml(payload)
utils.logAudit(payloadXml)
@@ -306,7 +302,8 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
def aaiGenericVnfResponse = execution.getVariable(prefix+'AAIQueryGenericVfnResponse')
def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
def vnfName = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-name')
-
+ def modelCustomizationId = getNodeTextForce(volumeRequest, "model-customization-id")
+
String messageId = UUID.randomUUID()
utils.log("DEBUG", "messageId to be used is generated: " + messageId, isDebugEnabled)
@@ -324,7 +321,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
utils.log("DEBUG", "volumeGroupParams: "+ volumeGroupParams, isDebugEnabled)
String volumeGroupId = execution.getVariable('volume-group-id')
- def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
if ('true'.equals(useQualifiedHostName)) {
notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
@@ -347,6 +344,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
<vnfType>${vnfType}</vnfType>
<vnfVersion>${vnfVersion}</vnfVersion>
<vfModuleType>${vnfModuleType}</vfModuleType>
+ <modelCustomizationUuid>${modelCustomizationId}</modelCustomizationUuid>
<volumeGroupParams>
<entry>
<key>vnf_id</key>
@@ -380,6 +378,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
String vnfSubCreateWorkflowRequestAsString = utils.formatXml(vnfSubCreateWorkflowRequest)
utils.logAudit(vnfSubCreateWorkflowRequestAsString)
+ utils.log('DEBUG', vnfSubCreateWorkflowRequestAsString, isDebugEnabled)
execution.setVariable(prefix+"createVnfARequest", vnfSubCreateWorkflowRequestAsString)
// build rollback request for use later if needed
@@ -418,6 +417,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
// get variables
String requeryAAIVolGrpNameResponse = execution.getVariable(prefix+"queryAAIVolGrpNameResponse")
String volumeGroupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+ String modelCustomizationId = getNodeTextForce(requeryAAIVolGrpNameResponse, "vf-module-persona-model-customization-id")
String cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
AaiUtil aaiUtil = new AaiUtil(this)
@@ -442,7 +442,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
}
NetworkUtils networkUtils = new NetworkUtils()
- String payload = networkUtils.updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, vnfId, namespace)
+ String payload = networkUtils.updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, vnfId, namespace, modelCustomizationId)
String payloadXml = utils.formatXml(payload)
//execution.setVariable(prefix+"updateCreatedAAIVolumeGrpNamePayloadRequest", payloadXml)
@@ -591,7 +591,7 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId>
<lastModifiedBy>BPMN</lastModifiedBy>
<statusMessage>${statusMessage}</statusMessage>
@@ -626,9 +626,9 @@ class DoCreateVfModuleVolumeV1 extends VfModuleBase {
String requestId = execution.getVariable(prefix+'requestId')
String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>CREATE</action>
<source>${source}</source>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy
new file mode 100644
index 0000000000..55d56a6194
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -0,0 +1,458 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+
+
+/**
+ * This class supports the DoCreateVnf building block subflow
+ * with the creation of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoCreateVnf extends AbstractServiceTaskProcessor {
+
+ 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(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ // DISABLE SDNC INTERACTION FOR NOW
+ execution.setVariable("SDNCInteractionEnabled", false)
+
+
+ /*******************/
+ try{
+ // Get Variables
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("DoCVNF_requestId", requestId)
+ execution.setVariable("mso-request-id", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DoCVNF_serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DoCVNF_vnfType", vnfType)
+ utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+ String vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DoCVNF_vnfName", vnfName)
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ String serviceId = execution.getVariable("productFamilyId")
+ execution.setVariable("DoCVNF_serviceId", serviceId)
+ utils.log("DEBUG", "Incoming Service Id is: " + serviceId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("DoCVNF_source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ String suppressRollback = execution.getVariable("disableRollback")
+ execution.setVariable("DoCVNF_suppressRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String modelInvariantId = jsonUtil.getJsonValue(vnfModelInfo, "modelInvariantId")
+ execution.setVariable("DoCVNF_modelInvariantId", modelInvariantId)
+ utils.log("DEBUG", "Incoming Invariant Id is: " + modelInvariantId, isDebugEnabled)
+
+ String modelVersionId = jsonUtil.getJsonValue(vnfModelInfo, "modelVersionId")
+ if (modelVersionId == null) {
+ modelVersionId = ""
+ }
+ execution.setVariable("DoCVNF_modelVersionId", modelVersionId)
+ utils.log("DEBUG", "Incoming Version Id is: " + modelVersionId, isDebugEnabled)
+
+ String modelVersion = jsonUtil.getJsonValue(vnfModelInfo, "modelVersion")
+ execution.setVariable("DoCVNF_modelVersion", modelVersion)
+ utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled)
+
+ String modelName = jsonUtil.getJsonValue(vnfModelInfo, "modelName")
+ execution.setVariable("DoCVNF_modelName", modelName)
+ utils.log("DEBUG", "Incoming Model Name is: " + modelName, isDebugEnabled)
+
+ String modelCustomizationId = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationId")
+ if (modelCustomizationId == null) {
+ modelCustomizationId = ""
+ }
+ execution.setVariable("DoCVNF_modelCustomizationId", modelCustomizationId)
+ utils.log("DEBUG", "Incoming Model Customization Id is: " + modelCustomizationId, isDebugEnabled)
+
+ String cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
+ execution.setVariable("DoCVNF_cloudSiteId", cloudSiteId)
+ utils.log("DEBUG", "Incoming Cloud Site Id is: " + cloudSiteId, isDebugEnabled)
+
+ String tenantId = jsonUtil.getJsonValue(cloudConfiguration, "tenantId")
+ execution.setVariable("DoCVNF_tenantId", tenantId)
+ utils.log("DEBUG", "Incoming Tenant Id is: " + tenantId, isDebugEnabled)
+
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if (globalSubscriberId == null) {
+ globalSubscriberId = ""
+ }
+ execution.setVariable("DoCVNF_globalSubscriberId", globalSubscriberId)
+ utils.log("DEBUG", "Incoming Global Subscriber Id is: " + globalSubscriberId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ if (sdncVersion == null) {
+ sdncVersion = "1702"
+ }
+ execution.setVariable("DoCVNF_sdncVersion", sdncVersion)
+ utils.log("DEBUG", "Incoming Sdnc Version is: " + sdncVersion, isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable("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()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ }
+ 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) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+ execution.setVariable("DoCVNF_sdncCallbackUrl", sdncCallbackUrl)
+ utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+ logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugEnabled)
+
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ execution.setVariable("RollbackData", rollbackData)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnf PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void prepareCreateGenericVnf (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PrepareCreateGenericVnf Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ def vnfName = execution.getVariable("DoCVNF_vnfName")
+ def vnfType = execution.getVariable("DoCVNF_vnfType")
+ def serviceId = execution.getVariable("DoCVNF_serviceId")
+ def orchStatus = execution.getVariable("DoCVNF_orchStatus")
+ def modelInvariantId = execution.getVariable("DoCVNF_modelInvariantId")
+ def modelVersion = execution.getVariable("DoCVNF_modelVersion")
+ def modelCustomizationId = execution.getVariable("DoCVNF_modelCustomizationId")
+ // TODO: 1702 Variable
+ def equipmentRole = execution.getVariable("DoCVNF_equipmentRole")
+
+ //Get Service Instance Info
+ def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+ String siRelatedLink = execution.getVariable("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)
+
+ //Get Namespace
+ AaiUtil aaiUtil = new AaiUtil(this)
+ def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+ String namespace = aaiUtil.getNamespaceFromUri(aai_uri)
+
+ String payload =
+ """<generic-vnf xmlns="${namespace}">
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-name>${vnfName}</vnf-name>
+ <service-id>${serviceId}</service-id>
+ <vnf-type>${vnfType}</vnf-type>
+ <prov-status>PREPROV</prov-status>
+ <orchestration-status>${orchStatus}</orchestration-status>
+ <persona-model-id>${modelInvariantId}</persona-model-id>
+ <persona-model-version>${modelVersion}</persona-model-version>
+ <persona-model-customization-id>${modelCustomizationId}</persona-model-customization-id>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>${siRelatedLink}</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>${globalCustId}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>${serviceType}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${serviceInstanceId}</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </generic-vnf>"""
+
+ execution.setVariable("DoCVNF_genericVnfPayload", payload)
+
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnf PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PrepareCreateGenericVnf Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PrepareCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+ public void postProcessCreateGenericVnf (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnf PostProcessCreateGenericVnf Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ def rollbackData = execution.getVariable("RollbackData")
+ rollbackData.put("VNF", "vnfId", vnfId)
+ execution.setVariable("RollbackData", rollbackData)
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnf PostProcessCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PostProcessCreateGenericVnf Process")
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnf PostProcessCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+
+ public void preProcessSDNCAssignRequest(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ def vnfId = execution.getVariable("DoCVNF_vnfId")
+ def serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+ logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
+ utils.logAudit("NEW VNF ID: " + vnfId)
+
+ try{
+ //Build SDNC Request
+
+ String assignSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "assign")
+
+ assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+ execution.setVariable("DoCVNF_assignSDNCRequest", assignSDNCRequest)
+ logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCAssignRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void preProcessSDNCActivateRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ try{
+ String vnfId = execution.getVariable("DoCVNF_vnfId")
+ String serviceInstanceId = execution.getVariable("DoCVNF_serviceInstanceId")
+
+ String activateSDNCRequest = buildSDNCRequest(execution, serviceInstanceId, "activate")
+
+ execution.setVariable("DoCVNF_activateSDNCRequest", activateSDNCRequest)
+ logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled)
+ utils.logAudit("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+
+ }catch(Exception e){
+ log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+ }
+
+ public String buildSDNCRequest(Execution 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("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")
+ 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.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>CreateVnfInstance</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${serviceId}</subscription-service-type>
+ ${serviceEcompModelInformation}
+ <service-instance-id>${svcInstId}</service-instance-id>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <vnf-information>
+ <vnf-id>${vnfId}</vnf-id>
+ <vnf-type>${vnfType}</vnf-type>
+ ${vnfEcompModelInformation}
+ </vnf-information>
+ <vnf-request-input>
+ <request-version>${sdncVersion}</request-version>
+ <vnf-name></vnf-name>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ ${sdncVNFParamsXml}
+ </vnf-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.logAudit("sdncRequest: " + sdncRequest)
+ return sdncRequest
+ }
+
+ public void validateSDNCResponse(Execution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ utils.logAudit("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ utils.logAudit("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
+
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
new file mode 100644
index 0000000000..861da52397
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
@@ -0,0 +1,285 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+
+/**
+* This class supports the macro VID Flow
+* with the creation of a generic vnf and related VF modules.
+*/
+class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
+
+ 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(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModules PreProcessRequest Process*** ", isDebugEnabled)
+
+ try{
+ // Get Variables
+
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("mso-request-id", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfType = execution.getVariable("vnfType")
+ utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+ String vnfName = execution.getVariable("vnfName")
+ execution.setVariable("CREVI_vnfName", vnfName)
+ utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+ String productFamilyId = execution.getVariable("productFamilyId")
+ utils.log("DEBUG", "Incoming Product Family Id is: " + productFamilyId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ String disableRollback = execution.getVariable("disableRollback")
+ utils.log("DEBUG", "Incoming Disable Rollback is: " + disableRollback, isDebugEnabled)
+
+ String asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ utils.log("DEBUG", "Incoming asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugEnabled)
+
+ String vnfId = execution.getVariable("testVnfId") // for junits
+ if(isBlank(vnfId)){
+ vnfId = execution.getVariable("vnfId")
+ if (isBlank(vnfId)) {
+ vnfId = UUID.randomUUID().toString()
+ utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+ }
+ }
+ execution.setVariable("vnfId", vnfId)
+
+ def rollbackData = execution.getVariable("RollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+
+ execution.setVariable("numOfCreatedAddOnModules", 0)
+
+ rollbackData.put("VNFANDMODULES", "numOfCreatedAddOnModules", 0)
+ execution.setVariable("RollbackData", rollbackData)
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnfAndModules PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void queryCatalogDB (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModules QueryCatalogDB Process *** ", isDebugEnabled)
+ try {
+ //Get Vnf Info
+ String vnfModelInfo = execution.getVariable("vnfModelInfo")
+ String vnfModelCustomizationUuid = jsonUtil.getJsonValueForKey(vnfModelInfo, "modelCustomizationId")
+ utils.log("DEBUG", "querying Catalog DB by vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
+ String catalogDbEndpoint = execution.getVariable("URN_mso_catalog_db_endpoint")
+
+ JSONArray vnfs = cutils.getAllVnfsByVnfModelCustomizationUuid(catalogDbEndpoint,
+ vnfModelCustomizationUuid)
+ utils.log("DEBUG", "obtained VNF list")
+ // Only one match here
+ JSONObject vnf = vnfs[0]
+ JSONArray vfModules = vnf.getJSONArray("vfModules")
+ JSONArray addOnModules = new JSONArray()
+
+ // Set up base Vf Module info
+ for (int i = 0; i < vfModules.length(); i++) {
+ utils.log("DEBUG", "handling VF Module ")
+ JSONObject vfModule = vfModules[i]
+ String isBase = jsonUtil.getJsonValueForKey(vfModule, "isBase")
+ if (isBase.equals("true")) {
+ JSONObject baseVfModuleModelInfoObject = vfModule.getJSONObject("modelInfo")
+ String baseVfModuleModelInfo = baseVfModuleModelInfoObject.toString()
+ execution.setVariable("baseVfModuleModelInfo", baseVfModuleModelInfo)
+ String baseVfModuleLabel = jsonUtil.getJsonValueForKey(vfModule, "vfModuleLabel")
+ execution.setVariable("baseVfModuleLabel", baseVfModuleLabel)
+ String basePersonaModelId = jsonUtil.getJsonValueForKey(baseVfModuleModelInfoObject, "modelInvariantId")
+ execution.setVariable("basePersonaModelId", basePersonaModelId)
+ }
+ else {
+ addOnModules.add(vfModules[i])
+ }
+ }
+
+ execution.setVariable("addOnModules", addOnModules)
+ execution.setVariable("addOnModulesToDeploy", addOnModules.length())
+ execution.setVariable("addOnModulesDeployed", 0)
+
+ }catch(Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoCreateVnfAndModules QueryCatalogDB Process " + ex.getMessage(), isDebugEnabled)
+ 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)
+ utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled)
+ }
+
+ public void preProcessAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessAddOnModule ======== ", isDebugLogEnabled)
+
+ 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, "modelInvariantId")
+ execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ String addOnInitialCount = jsonUtil.getJsonValueForKey(addOnModule, "initialCount")
+ execution.setVariable("initialCount", addOnInitialCount)
+
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void validateBaseModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED validateBaseModule ======== ", isDebugLogEnabled)
+
+ 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)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing validateBaseModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during validateBaseModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED validateBaseModule ======== ", isDebugLogEnabled)
+ }
+
+ public void validateAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED validateAddOnModule ======== ", isDebugLogEnabled)
+
+ 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){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ public void finishProcessingInitialCountDeployment(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED finishProcessingInitialCountDeployment ======== ", isDebugLogEnabled)
+
+ try {
+ int addOnModulesDeployed = execution.getVariable("addOnModulesDeployed")
+ execution.setVariable("addOnModulesDeployed", addOnModulesDeployed + 1)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
new file mode 100644
index 0000000000..7b9bed3f7a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
@@ -0,0 +1,153 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+/**
+ * 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 {
+
+ String Prefix="DCVAMR_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+
+ /**
+ * This method gets and validates the incoming
+ * request.
+ *
+ * @param - execution
+ *
+ */
+ public void preProcessRequest(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoCreateVnfAndModulesRollback PreProcessRequest Process*** ", isDebugEnabled)
+
+ try{
+ // Get Rollback Variables
+
+ def rollbackData = execution.getVariable("RollbackData")
+ utils.log("DEBUG", "Incoming RollbackData is: " + rollbackData.toString(), isDebugEnabled)
+ String vnfId = rollbackData.get("VNF", "vnfId")
+ utils.log("DEBUG", "Rollback vnfId is: " + vnfId, isDebugEnabled)
+ execution.setVariable("DCVAMR_vnfId", vnfId)
+
+ 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)
+ }
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnfAndModulesRollback PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnfAndModulesRollback PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnfAndModulesRollback PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+
+ public void preProcessCreateVfModuleRollback(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+
+ try {
+
+ def rollbackData = execution.getVariable("RollbackData")
+
+ def vfModuleRollbackData = new RollbackData()
+
+ def numOfModulesToDelete = execution.getVariable("DCVAMR_numOfModulesToDelete")
+ logDebug("numOfModulesToDelete: " + numOfModulesToDelete, isDebugLogEnabled)
+ def moduleMap = null
+
+ if (numOfModulesToDelete > 1) {
+ int addOnModuleIndex = numOfModulesToDelete - 1
+ moduleMap = rollbackData.get("VFMODULE_ADDON_" + addOnModuleIndex)
+ logDebug("Removing ADDON VF module # " + addOnModuleIndex, isDebugLogEnabled)
+ }
+ else {
+ moduleMap = rollbackData.get("VFMODULE_BASE")
+ logDebug("Removing BASE VF module", isDebugLogEnabled)
+ }
+ moduleMap.each{ k, v -> vfModuleRollbackData.put("VFMODULE", "${k}","${v}") }
+ execution.setVariable("DCVAMR_RollbackData", vfModuleRollbackData)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessCreateVfModuleRollback. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessCreateVfModuleRollback Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+ }
+
+
+ public void postProcessCreateVfModuleRollback(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED postProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+
+ try {
+ def numOfModulesToDelete = execution.getVariable("DCVAMR_numOfModulesToDelete")
+ execution.setVariable("DCVAMR_numOfModulesToDelete", numOfModulesToDelete - 1)
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing postProcessCreateVfModuleRollback. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during postProcessCreateVfModuleRollback Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED postProcessCreateVfModuleRollback ======== ", isDebugLogEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
new file mode 100644
index 0000000000..76a86ff516
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -0,0 +1,1080 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
+ 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(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + groovyClassName + " Request ***** ", isDebugEnabled)
+
+ // 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())
+ utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+ deleteNetwork = vidUtils.createXmlNetworkRequestInfra(execution, deleteNetwork)
+
+ } catch (Exception ex) {
+ String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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)
+ utils.logAudit(deleteNetwork)
+ execution.setVariable(Prefix + "networkRequest", deleteNetwork)
+ utils.log("DEBUG", Prefix + "networkRequest - " + '\n' + deleteNetwork, isDebugEnabled)
+
+ // validate 'backout-on-failure' to override 'URN_mso_rollback'
+ boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, deleteNetwork)
+ execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
+ utils.log("DEBUG", Prefix + "rollbackEnabled - " + rollbackEnabled, isDebugEnabled)
+
+ 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()
+ utils.log("DEBUG", Prefix + "messageId, random generated: " + messageId, isDebugEnabled)
+ } else {
+ utils.log("DEBUG", Prefix + "messageId, pre-assigned: " + messageId, isDebugEnabled)
+ }
+ execution.setVariable(Prefix + "messageId", messageId)
+
+ String source = utils.getNodeText1(deleteNetwork, "source")
+ execution.setVariable(Prefix + "source", source)
+ utils.log("DEBUG", Prefix + "source - " + source, isDebugEnabled)
+
+ String networkId = ""
+ if (utils.nodeExists(networkInputs, "network-id")) {
+ networkId = utils.getNodeText1(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."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ 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.getNodeText1(networkInputs, "aic-cloud-region")
+ if (lcpCloudRegion == 'null') {
+ lcpCloudRegion = null
+ }
+ }
+ execution.setVariable(Prefix + "lcpCloudRegion", lcpCloudRegion)
+ utils.log("DEBUG", "lcpCloudRegion : " + lcpCloudRegion, isDebugEnabled)
+
+ String tenantId = null
+ if (utils.nodeExists(networkInputs, "tenant-id")) {
+ tenantId = utils.getNodeText1(networkInputs, "tenant-id")
+ if (tenantId == 'null') {
+ tenantId = null
+ }
+
+ }
+ execution.setVariable(Prefix + "tenantId", tenantId)
+ utils.log("DEBUG", "tenantId : " + tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+ execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, , isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DoDeleteNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void callRESTQueryAAI (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAI() of DoDoDeleteNetworkInstance ***** " , isDebugEnabled)
+
+ // get variables
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String networkId = utils.getNodeText(networkInputs, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+ utils.logAudit(queryAAIRequest)
+ execution.setVariable(Prefix + "queryAAIRequest", queryAAIRequest)
+ utils.log("DEBUG", Prefix + "AAIRequest - " + "\n" + queryAAIRequest, isDebugEnabled)
+
+ RESTConfig config = new RESTConfig(queryAAIRequest);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ Boolean isVfRelationshipExist = false
+ try {
+ RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+ .addHeader("X-FromAppId", "MSO")
+ .addHeader("Content-Type", "application/xml")
+ .addHeader("Accept","application/xml");
+ APIResponse response = client.get()
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiReturnCode", returnCode)
+
+ utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryAAIResponse", aaiResponseAsString)
+
+ if (returnCode=='200' || returnCode=='204') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "isAAIGood", true)
+ utils.log("DEBUG", " AAI Query Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+ // 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)
+ utils.log("DEBUG", " Get AAI getCloudRegion() : " + lcpCloudRegion, isDebugEnabled)
+ }
+ if (execution.getVariable(Prefix + "tenantId") == null ) {
+ String tenantId = networkUtils.getTenantId(aaiResponseAsString)
+ execution.setVariable(Prefix + "tenantId", tenantId)
+ utils.log("DEBUG", " Get AAI getTenantId() : " + tenantId, isDebugEnabled)
+ }
+
+ }
+ }
+ utils.log("DEBUG", Prefix + "isVfRelationshipExist - " + isVfRelationshipExist, isDebugEnabled)
+
+ } else {
+ execution.setVariable(Prefix + "isAAIGood", false)
+ if (returnCode=='404' || aaiResponseAsString == "" || aaiResponseAsString == null) {
+ // not found // empty aai response
+ execution.setVariable(Prefix + "isSilentSuccess", true)
+ utils.log("DEBUG", " AAI Query is Silent Success", isDebugEnabled)
+
+ } 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ utils.log("DEBUG", " AAI Query call, isAAIGood? : " + execution.getVariable(Prefix + "isAAIGood"), isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Exception Encountered in DoDeleteNetworkInstance, callRESTQueryAAI() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAICloudRegion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of DoDeleteNetworkInstance ***** " , isDebugEnabled)
+
+ 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 = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", Prefix + "queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ 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")
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareNetworkRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareNetworkRequest of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+ 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.getNodeText1(queryAAIResponse, "network-type")
+ String networkId = utils.getNodeText1(queryAAIResponse, "network-id")
+ String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
+
+ String networkStackId = ""
+ networkStackId = utils.getNodeText1(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.getNodeText1(networkModelInfo, "modelCustomizationUuid")
+ }
+
+ String deleteNetworkRequest = """
+ <deleteNetworkRequest>
+ <cloudSiteId>${cloudSiteId}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <networkId>${networkId}</networkId>
+ <networkStackId>${networkStackId}</networkStackId>
+ <networkType>${networkType}</networkType>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </deleteNetworkRequest>
+ """.trim()
+
+ utils.log("DEBUG", Prefix + "deleteNetworkRequest - " + "\n" + deleteNetworkRequest, isDebugEnabled)
+ // Format Response
+ String buildDeleteNetworkRequestAsString = utils.formatXml(deleteNetworkRequest)
+ utils.logAudit(buildDeleteNetworkRequestAsString)
+ utils.log("DEBUG", Prefix + "deleteNetworkRequestAsString - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
+
+ String restURL = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+ execution.setVariable("URN_mso_adapters_network_rest_endpoint", restURL + "/" + networkId)
+ utils.log("DEBUG", "URN_mso_adapters_network_rest_endpoint - " + "\n" + restURL + "/" + networkId, isDebugEnabled)
+
+ execution.setVariable(Prefix + "deleteNetworkRequest", buildDeleteNetworkRequestAsString)
+ utils.log("DEBUG", Prefix + "deleteNetworkRequest - " + "\n" + buildDeleteNetworkRequestAsString, isDebugEnabled)
+ }
+ catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareNetworkRequest(). Unexpected Response from AAI - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugEnabled)
+
+ try {
+
+ String vnfAdapterUrl = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+ 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()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+
+ public void prepareSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRequest of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText1(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)
+
+ utils.log("DEBUG", Prefix + "requestId " + requestId, isDebugEnabled)
+ 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)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "deleteSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCRequest of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText1(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)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "deleteSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void prepareRpcSDNCDeactivate(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCDeactivate() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText1(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)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology deactivate - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCActivateRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateNetworkResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateNetworkResponse of DoDeleteNetworkInstance *****", isDebugEnabled)
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "deleteNetworkResponse")
+
+ utils.log("DEBUG", " Network Adapter responseCode: " + returnCode, isDebugEnabled)
+ utils.log("DEBUG", "Network Adapter Response - " + "\n" + networkResponse, isDebugEnabled)
+ utils.logAudit(networkResponse)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ utils.log("DEBUG", " Network Adapter Response is successful - " + "\n" + networkResponse, isDebugEnabled)
+
+ // prepare rollback data
+ String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+ if ((rollbackData == null) || (rollbackData.isEmpty())) {
+ utils.log("DEBUG", " Network Adapter 'rollback' data is not Sent: " + "\n" + networkResponse, isDebugEnabled)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", "")
+ } else {
+ String rollbackNetwork =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
+ ${rollbackData}
+ </NetworkAdapter:rollbackNetwork>"""
+ String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+ execution.setVariable(Prefix + "rollbackNetworkRequest", rollbackNetworkXml)
+ utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
+ }
+
+
+ } 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.getNodeText1(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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void validateSDNCResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateSDNCResponse of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ 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 = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "deleteSDNCResponse"))
+ deleteSDNCResponseDecodeXml = deleteSDNCResponseDecodeXml.replace("&", "&amp;").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)
+ utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void validateRpcSDNCDeactivateResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRpcSDNCDeactivateResponse() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ 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 = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "deactivateSDNCResponse"))
+ assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").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)
+ utils.log("DEBUG", "Successfully Validated Rpc SDNC Activate Response", isDebugEnabled)
+
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated Rpc SDNC Deactivate Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+ public void prepareRpcSDNCDeactivateRollback(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCDeactivateRollback() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String deactivateSDNCResponse = execution.getVariable(Prefix + "deactivateSDNCResponse")
+ String networkId = utils.getNodeText1(deactivateSDNCResponse, "network-id")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+ // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyRollbackRpcRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "activate", "ActivateNetworkInstance", cloudRegionId, networkId, null)
+ String sndcTopologyRollbackRpcRequestAsString = utils.formatXml(sndcTopologyRollbackRpcRequest)
+ execution.setVariable(Prefix + "rollbackDeactivateSDNCRequest", sndcTopologyRollbackRpcRequestAsString)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'activate-ActivateNetworkInstance' rollback . . . - " + "\n" + sndcTopologyRollbackRpcRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCDeactivateRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRollbackData() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled)
+
+ execution.setVariable("WorkflowException", execution.getVariable("WorkflowException"))
+ utils.log("DEBUG", "** WorkflowException : " + execution.getVariable("WorkflowException"), isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ utils.log("DEBUG", " ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"), isDebugEnabled)
+ 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.
+ utils.log("DEBUG", " ***** workflowException: " + execution.getVariable("workflowException"), isDebugEnabled)
+ 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
+ utils.log("DEBUG", " ***** postProcessResponse(), BAD !!!", isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+
+ }
+
+ } catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+
+ }
+
+ }
+
+ public void prepareSuccessRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSuccessRollbackData() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("sdncVersion") == '1702') {
+ 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)
+
+ utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled)
+ execution.setVariable("WorkflowException", null)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRpcSDNCUnassignRollback(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRpcSDNCUnassignRollbac() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String deleteSDNCResponse = execution.getVariable(Prefix + "deleteSDNCResponse")
+ String networkId = utils.getNodeText1(deleteSDNCResponse, "network-id")
+ if (networkId == 'null') {networkId = ""}
+ String serviceInstanceId = utils.getNodeText1(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)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "rollbackSDNCRequest" + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'assign-CreateNetworkInstance' rollback . . . - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoDeleteNetworkInstance flow. prepareRpcSDNCUnassignRollback() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRollback of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String deleteNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+ String networkId = ""
+ if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+ }
+ if (networkId == 'null') {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText1(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)
+ utils.logAudit(sndcTopologyDeleteRequesAsString)
+ execution.setVariable(Prefix + "rollbackSDNCRequest", sndcTopologyDeleteRequesAsString)
+ utils.log("DEBUG", Prefix + "rollbackSDNCRequest - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+ utils.log("DEBUG", " Preparing request for RPC SDNC Topology 'rollback-DisconnectNetworkRequest' rollback . . . - " + "\n" + sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ // caught exception
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRollback() - " + ex.getMessage()
+ logError(exceptionMessage)
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void setExceptionFlag(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside setExceptionFlag() of DoDeleteNetworkInstance ***** ", isDebugEnabled)
+
+ 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"))
+ }
+ utils.log("DEBUG", Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+
+ } catch(Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method of " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
new file mode 100644
index 0000000000..58c6f68bb3
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
@@ -0,0 +1,335 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>DoCreateNetworkInstanceRollback.bpmn</class> process.
+ *
+ */
+public class DoDeleteNetworkInstanceRollback extends AbstractServiceTaskProcessor {
+ 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(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "'rollbackData': " + '\n' + execution.getVariable("rollbackData"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ 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()
+ utils.log("DEBUG", dataErrorMessage , isDebugEnabled)
+ 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"))
+ }
+ utils.log("DEBUG", "*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+ 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)
+
+ }
+
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void validateRollbackResponses (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRollbackResponses() of DoDeleteNetworkInstanceRollback ***** ", isDebugEnabled)
+
+ 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 = sdncAdapterUtils.decodeXML(rollbackDeactivateSDNCResponse)
+ rollbackDeactivateSDNCResponse = rollbackDeactivateSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackDeactivateSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackDeactivateSDNCResponse, "response-code")) {
+ rollbackDeactivateSDNCReturnInnerCode = utils.getNodeText1(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. "
+ }
+ utils.log("DEBUG", " SDNC deactivate rollback Code - " + rollbackDeactivateSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC deactivate rollback Response - " + rollbackDeactivateSDNCResponse, isDebugEnabled)
+ }
+
+ // 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 = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
+ rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText1(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. "
+ }
+ utils.log("DEBUG", " SDNC assign rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC assign rollback Response - " + rollbackSDNCResponse, isDebugEnabled)
+ }
+
+ // 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."
+ }
+
+ utils.log("DEBUG", " NetworkRollback Code - " + rollbackNetworkReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " NetworkRollback Response - " + rollbackNetworkResponse, isDebugEnabled)
+ }
+
+ String statusMessage = ""
+ int errorCode = 7000
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+ 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
+ utils.log("DEBUG", "Final DoDeleteNetworkInstanceRollback status message: " + statusMessage, isDebugEnabled)
+ 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. "
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ 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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
new file mode 100644
index 0000000000..6daec69b9d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -0,0 +1,420 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.camunda.bpm.engine.delegate.BpmnError
+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
+
+/**
+ * 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 - sdncVersion
+ * @param - failNotFound - TODO
+ * @param - serviceInputParams - TODO
+ *
+ * Outputs:
+ * @param - WorkflowException
+ *
+ * Rollback - Deferred
+ */
+public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix="DDELSI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** 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 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"
+ utils.log("DEBUG", 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("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
+ utils.log("DEBUG","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void preProcessSDNCDelete (Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** preProcessSDNCDelete *****", isDebugEnabled)
+ String msg = ""
+
+ try {
+ /*
+ String uuid = execution.getVariable('testReqId') // for junits
+ if(uuid==null){
+ uuid = execution.getVariable("msoRequestId") + "-" + System.currentTimeMillis()
+ }
+ */
+ 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 modelInvariantId = ""
+ def modelVersion = ""
+ def modelUUId = ""
+ def modelName = ""
+ if (!isBlank(serviceModelInfo))
+ {
+ modelInvariantId = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantId")
+ modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion")
+ modelUUId = jsonUtil.getJsonValue(serviceModelInfo, "modelVersionId")
+ modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName")
+
+ if (modelInvariantId == null) {
+ modelInvariantId = ""
+ }
+ if (modelVersion == null) {
+ modelVersion = ""
+ }
+ if (modelUUId == null) {
+ modelUUId = ""
+ }
+ if (modelName == null) {
+ modelName = ""
+ }
+ }
+ if (serviceInstanceName == null) {
+ serviceInstanceName = ""
+ }
+ if (serviceId == null) {
+ serviceId = ""
+ }
+
+ def sdncRequestId = UUID.randomUUID().toString()
+
+ String sdncDelete =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${sdncRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>service-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ <request-action>DeleteServiceInstance</request-action>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <subscription-service-type>${subscriptionServiceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantId}</model-invariant-uuid>
+ <model-uuid>${modelUUId}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id>${globalSubscriberId}</global-customer-id>
+ </service-information>
+ <service-request-input>
+ <service-instance-name>${serviceInstanceName}</service-instance-name>
+ </service-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.log("DEBUG","sdncDelete:\n" + sdncDelete, isDebugEnabled)
+ sdncDelete = utils.formatXml(sdncDelete)
+ execution.setVariable("sdncDelete", sdncDelete)
+ utils.logAudit("sdncDelete: " + sdncDelete)
+
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
+ }
+ utils.log("DEBUG"," *****Exit preProcessSDNCDelete *****", isDebugEnabled)
+ }
+
+ public void postProcessSDNCDelete(Execution execution) {
+
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessSDNCDelete ***** ", isDebugEnabled)
+ String msg = ""
+
+ try {
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+ String response = execution.getVariable("sdncAdapterResponse")
+ utils.logAudit("SDNCResponse: " + response)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+ utils.log("DEBUG","Good response from SDNC Adapter for service-instance topology assign: \n" + response, isDebugEnabled)
+
+ }else{
+ msg = "Bad Response from SDNC Adapter for service-instance delete"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessSDNCDelete. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception Occured in preProcessSDNCDelete.\n" + ex.getMessage())
+ }
+ utils.log("DEBUG"," *** Exit postProcessSDNCDelete *** ", isDebugEnabled)
+ }
+
+ public void postProcessAAIGET(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIGET ***** ", isDebugEnabled)
+ String msg = ""
+
+ try {
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
+
+ if(foundInAAI == true){
+ utils.log("DEBUG","Found Service-instance in AAI", isDebugEnabled)
+
+ //Extract GlobalSubscriberId
+ String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
+ if (isBlank(siRelatedLink))
+ {
+ msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ else
+ {
+ utils.log("DEBUG","Found Service-instance in AAI. link: " + siRelatedLink, isDebugEnabled)
+ 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 serviceType = execution.getVariable("subscriptionServiceType")
+ if(isBlank(serviceType)){
+ int serviceStart = siRelatedLink.indexOf("service-subscription/")
+ int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+ String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+ serviceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
+ execution.setVariable("subscriptionServiceType", serviceType)
+ }
+
+ if (isBlank(globalSubscriberId) || isBlank(serviceType))
+ {
+ msg = "Could not retrive global-customer-id & service-type from AAI to delete id:" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ }
+
+ String siData = execution.getVariable("GENGS_service")
+ utils.log("DEBUG", "SI Data", isDebugEnabled)
+ if (isBlank(siData))
+ {
+ msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ else
+ {
+ utils.log("DEBUG", "SI Data" + siData, isDebugEnabled)
+ //Confirm there are no related service instances (vnf/network or volume)
+ if (utils.nodeExists(siData, "relationship-list")) {
+ utils.log("DEBUG", "SI Data relationship-list exists:", isDebugEnabled)
+ 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")){
+ utils.log("DEBUG", "ServiceInstance still has relationship(s) to generic-vnfs or l3-networks", isDebugEnabled)
+ execution.setVariable("siInUse", true)
+ //there are relationship dependencies to this Service Instance
+ msg = " Stopped deleting Service Instance, it has dependencies. Service instance id: " + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }else{
+ utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+ }
+ }
+ }
+ }
+ }
+ }else{
+ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
+ if(succInAAI != true){
+ utils.log("DEBUG","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("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ utils.log("DEBUG","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
+ }
+
+ public void postProcessAAIDEL(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG"," ***** postProcessAAIDEL ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ boolean succInAAI = execution.getVariable("GENDS_SuccessIndicator")
+ if(succInAAI != true){
+ msg = "Error deleting Service-instance in AAI" + serviceInstanceId
+ utils.log("DEBUG", msg, isDebugEnabled)
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ utils.logAudit("workflowException: " + workflowException)
+ if(workflowException != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+ }
+ else
+ {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
+ }
+ }
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ msg = "Exception in DoDeleteServiceInstance.postProcessAAIDEL. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," *** Exit postProcessAAIDEL *** ", isDebugEnabled)
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
new file mode 100644
index 0000000000..cd9c798c09
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -0,0 +1,603 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.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.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModule
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+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")
+*
+* Outputs:
+* @param - WorkflowException
+*
+*/
+public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
+
+ def Prefix="DoDVfMod_"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void initProcessVariables(Execution 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(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ 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)
+
+ }
+ else {
+
+ utils.logAudit("DoDeleteVfModule Request: " + xml)
+
+ utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
+
+ vnfId = utils.getNodeText1(xml,"vnf-id")
+ execution.setVariable("vnfId", vnfId)
+ vfModuleId = utils.getNodeText1(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.getNodeText1(xml, "request-id")
+ }
+ execution.setVariable("requestId", requestId)
+ String source = utils.getNodeText1(xml, "source")
+ execution.setVariable("source", source)
+ String serviceId = utils.getNodeText1(xml, "service-id")
+ execution.setVariable("serviceId", serviceId)
+ String tenantId = utils.getNodeText1(xml, "tenant-id")
+ execution.setVariable("tenantId", tenantId)
+
+ String serviceInstanceIdToSdnc = ""
+ if (xml.contains("service-instance-id")) {
+ serviceInstanceIdToSdnc = utils.getNodeText1(xml, "service-instance-id")
+ } else {
+ serviceInstanceIdToSdnc = vfModuleId
+ }
+ execution.setVariable(Prefix + "serviceInstanceIdToSdnc", serviceInstanceIdToSdnc)
+ String vfModuleName = utils.getNodeText1(xml, "vf-module-name")
+ execution.setVariable("vfModuleName", vfModuleName)
+ String vfModuleModelName = utils.getNodeText1(xml, "vf-module-model-name")
+ execution.setVariable("vfModuleModelName", vfModuleModelName)
+ String cloudSiteId = utils.getNodeText1(xml, "aic-cloud-region")
+ execution.setVariable("cloudSiteId", cloudSiteId)
+ }
+
+ // formulate the request for PrepareUpdateAAIVfModule
+ String request = """<PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <orchestration-status>pending-delete</orchestration-status>
+ </PrepareUpdateAAIVfModuleRequest>""" as String
+ utils.log("DEBUG", "PrepareUpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("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(Execution execution, String action) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ def srvInstId = execution.getVariable("srvInstId")
+ def callbackUrl = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ 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")
+ String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${vfModuleId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>DisconnectVNFRequest</request-action>
+ <source>${source}</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>${serviceId}</service-id>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${serviceInstanceIdToSdnc}</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name></generic-vnf-name>
+ <generic-vnf-type></generic-vnf-type>
+ <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+ <tenant>${tenantId}</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+ utils.log("DEBUG", "sdncAdapterWorkflowRequest: " + request, isDebugEnabled)
+ utils.logAudit("DoDeleteVfModule - SDNCAdapterWorkflowRequest: " + request)
+ execution.setVariable("sdncAdapterWorkflowRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing VnfAdapterDeleteV1 request
+ public void prepVNFAdapterRequest(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ 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 = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String request = """
+ <deleteVfModuleRequest>
+ <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ <vfModuleStackId>${vfModuleStackId}</vfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${origRequestId}</requestId>
+ <serviceInstanceId>${srvInstId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </deleteVfModuleRequest>
+ """ as String
+
+ utils.log("DEBUG", "vnfAdapterRestV1Request: " + request, isDebugEnabled)
+ utils.logAudit("deleteVfModuleRequest: " + request)
+ execution.setVariable("vnfAdapterRestV1Request", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing UpdateAAIVfModuleRequest request
+ public void prepUpdateAAIVfModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<UpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <heat-stack-id>DELETE</heat-stack-id>
+ <orchestration-status>deleted</orchestration-status>
+ </UpdateAAIVfModuleRequest>""" as String
+ utils.log("DEBUG", "UpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("UpdateAAIVfModuleRequest: " + request)
+ execution.setVariable("UpdateAAIVfModuleRequest", request)
+ }
+
+ // parse the incoming DELETE_VF_MODULE request
+ // and formulate the outgoing DeleteAAIVfModuleRequest request
+ public void prepDeleteAAIVfModule(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ def vnfId = execution.getVariable("vnfId")
+ def vfModuleId = execution.getVariable("vfModuleId")
+ // formulate the request for UpdateAAIVfModule
+ String request = """<DeleteAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ </DeleteAAIVfModuleRequest>""" as String
+ utils.log("DEBUG", "DeleteAAIVfModuleRequest :" + request, isDebugEnabled)
+ utils.logAudit("DeleteAAIVfModuleRequest: " + request)
+ execution.setVariable("DeleteAAIVfModuleRequest", request)
+ }
+
+ // generates a WorkflowException if
+ // -
+ public void handleDoDeleteVfModuleFailure(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
+ + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"), isDebugEnabled)
+ String processKey = getProcessKey(execution);
+ WorkflowException exception = new WorkflowException(processKey, 5000,
+ execution.getVariable("DoDVfMod_deleteGenericVnfResponse"))
+ execution.setVariable("WorkflowException", exception)
+ }
+
+ public void sdncValidateResponse(Execution execution, String response){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ 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){
+ utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+ }else{
+ throw new BpmnError("MSOWorkflowException")
+ }
+ }
+
+ public void postProcessVNFAdapterRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.postProcessVNFAdapterRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix",Prefix)
+ try{
+ logDebug(" *** STARTED postProcessVNFAdapterRequest Process*** ", isDebugLogEnabled)
+
+ String vnfResponse = execution.getVariable("DoDVfMod_doDeleteVfModuleResponse")
+ logDebug("VNF Adapter Response is: " + vnfResponse, isDebugLogEnabled)
+ utils.logAudit("deleteVnfAResponse is: \n" + vnfResponse)
+
+ if(vnfResponse != null){
+
+ if(vnfResponse.contains("deleteVfModuleResponse")){
+ logDebug("Received a Good Response from VNF Adapter for DELETE_VF_MODULE Call.", isDebugLogEnabled)
+ 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()
+ logDebug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn, isDebugLogEnabled)
+ contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
+ }
+ else if (key.equals("oam_management_v4_address")) {
+ String oamManagementV4Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV4Address: " + oamManagementV4Address, isDebugLogEnabled)
+ execution.setVariable(Prefix + "oamManagementV4Address", oamManagementV4Address)
+ }
+ else if (key.equals("oam_management_v6_address")) {
+ String oamManagementV6Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+ logDebug("Obtained oamManagementV6Address: " + oamManagementV6Address, isDebugLogEnabled)
+ execution.setVariable(Prefix + "oamManagementV6Address", oamManagementV6Address)
+ }
+
+ }
+ }
+ if (!contrailNetworkPolicyFqdnList.isEmpty()) {
+ logDebug("Setting the fqdn list", isDebugLogEnabled)
+ execution.setVariable("DoDVfMod_contrailNetworkPolicyFqdnList", contrailNetworkPolicyFqdnList)
+ }
+ }
+ }else{
+ logDebug("Received a BAD Response from VNF Adapter for DELETE_VF_MODULE Call.", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+ }
+ }else{
+ logDebug("Response from VNF Adapter is Null for DELETE_VF_MODULE Call.", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
+ }
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ logDebug("Internal Error Occured in PostProcess Method", isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Internal Error Occured in PostProcess Method")
+ }
+ logDebug(" *** COMPLETED postProcessVnfAdapterResponse Process*** ", isDebugLogEnabled)
+ }
+
+ public void deleteNetworkPoliciesFromAAI(Execution execution) {
+ def method = getClass().getSimpleName() + '.deleteNetworkPoliciesFromAAI(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED deleteNetworkPoliciesFromAAI ======== ", isDebugLogEnabled)
+
+ try {
+ // get variables
+ List fqdnList = execution.getVariable("DoDVfMod_contrailNetworkPolicyFqdnList")
+ if (fqdnList == null) {
+ logDebug("No network policies to delete", isDebugLogEnabled)
+ return
+ }
+ int fqdnCount = fqdnList.size()
+
+ execution.setVariable("DoDVfMod_networkPolicyFqdnCount", fqdnCount)
+ logDebug("DoDVfMod_networkPolicyFqdnCount - " + fqdnCount, isDebugLogEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ 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")
+ utils.logAudit("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest)
+ logDebug("AAI request endpoint: " + queryNetworkPolicyByFqdnAAIRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyByFqdnAAIRequest)
+ int returnCode = response.getStatusCode()
+ execution.setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", returnCode)
+ logDebug(" ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugLogEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (isOneOf(returnCode, 200, 201)) {
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ // This network policy FQDN exists in AAI - need to delete it now
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable("DoDVfMod_queryNetworkPolicyByFqdnAAIResponse", aaiResponseAsString)
+ logDebug("QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugLogEnabled)
+ // Retrieve the network policy id for this FQDN
+ def networkPolicyId = utils.getNodeText1(aaiResponseAsString, "network-policy-id")
+ logDebug("Deleting network-policy with network-policy-id " + networkPolicyId, isDebugLogEnabled)
+
+ // Retrieve the resource version for this network policy
+ def resourceVersion = utils.getNodeText1(aaiResponseAsString, "resource-version")
+ logDebug("Deleting network-policy with resource-version " + resourceVersion, isDebugLogEnabled)
+
+ String delNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(networkPolicyId, "UTF-8") +
+ "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+ utils.logAudit("AAI request endpoint: " + delNetworkPolicyAAIRequest)
+ logDebug("AAI request endpoint: " + delNetworkPolicyAAIRequest, isDebugLogEnabled)
+
+ logDebug("invoking DELETE call to AAI", isDebugLogEnabled)
+ utils.logAudit("Sending DELETE call to AAI with Endpoint /n" + delNetworkPolicyAAIRequest)
+ APIResponse responseDel = aaiUriUtil.executeAAIDeleteCall(execution, delNetworkPolicyAAIRequest)
+ int returnCodeDel = responseDel.getStatusCode()
+ execution.setVariable("DoDVfMod_aaiDeleteNetworkPolicyReturnCode", returnCodeDel)
+ logDebug(" ***** AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodeDel, isDebugLogEnabled)
+
+ if (isOneOf(returnCodeDel, 200, 201, 204)) {
+ logDebug("The return code from deleting network policy is: " + returnCodeDel, isDebugLogEnabled)
+ // This network policy was deleted from AAI successfully
+ logDebug(" DelAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : ", isDebugLogEnabled)
+
+ } else {
+ // aai all errors
+ String delErrorMessage = "Unable to delete network-policy to AAI deleteNetworkPoliciesFromAAI - " + returnCodeDel
+ logDebug(delErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, delErrorMessage)
+ }
+ } else if (returnCode == 404) {
+ // This network policy FQDN is not in AAI. No need to delete.
+ logDebug("The return code is: " + returnCode, isDebugLogEnabled)
+ logDebug("This network policy FQDN is not in AAI: " + fqdn, isDebugLogEnabled)
+ utils.logAudit("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
+ logDebug(dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+
+
+ } // end loop
+
+
+ } else {
+ logDebug("No contrail network policies to query/create", isDebugLogEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoDeletVfModule flow. deleteNetworkPoliciesFromAAI() - " + ex.getMessage()
+ logDebug(exceptionMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+ /**
+ * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepUpdateAAIGenericVnf(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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>${vnfId}</vnf-id>
+ ${ipv4OamAddressElement}
+ ${managementV6AddressElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable(Prefix + 'updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+ }
+ }
+
+
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
new file mode 100644
index 0000000000..66a3fed6a5
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.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.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+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 class supports the DoDeleteVnf subFlow
+ * with the Deletion of a generic vnf for
+ * infrastructure.
+ *
+ */
+class DoDeleteVnf extends AbstractServiceTaskProcessor {
+
+ 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(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+ execution.setVariable("DoDVNF_SuccessIndicator", false)
+ execution.setVariable("DoDVNF_vnfInUse", false)
+
+ try{
+ // Get Variables
+
+ String vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DoDVNF_vnfId", vnfId)
+ utils.log("DEBUG", "Incoming Vnf(Instance) Id is: " + vnfId, isDebugEnabled)
+
+ // Setting for sub flow calls
+ execution.setVariable("DoDVNF_type", "generic-vnf")
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoDeleteVnf PreProcessRequest method!" + e, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoDeleteVnf PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void processGetVnfResponse(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnf processGetVnfResponse Process *** ", isDebugEnabled)
+ try {
+ String vnf = execution.getVariable("DoDVNF_genericVnf")
+ String resourceVersion = utils.getNodeText1(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")){
+ utils.log("DEBUG", "Generic Vnf still has relationship to OpenStack.", isDebugEnabled)
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ }else{
+ utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+ }
+ }
+ }
+ }
+
+ if(utils.nodeExists(vnf, "vf-module")){
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ utils.log("DEBUG", "Generic Vnf still has vf-modules.", isDebugEnabled)
+ }
+
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Error Occured in DoDeleteVnf processGetVnfResponse Process " + ex.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoDeleteVnf processGetVnfResponse Process")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoDeleteVnf processGetVnfResponse Process ***", isDebugEnabled)
+ }
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
new file mode 100644
index 0000000000..92456b0216
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
@@ -0,0 +1,256 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.UUID;
+
+import org.json.JSONObject;
+import org.json.JSONArray;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+/**
+ * This class supports the macro VID Flow
+ * with the deletion of a generic vnf and related VF modules.
+ */
+class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
+
+ String Prefix="DDVAM_"
+ 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(Execution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ utils.log("DEBUG", " *** STARTED DoDeleteVnfAndModules PreProcessRequest Process*** ", isDebugEnabled)
+
+ try{
+ // Get Variables
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+
+ String requestId = execution.getVariable("requestId")
+ execution.setVariable("mso-request-id", requestId)
+ utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+ String vnfId = execution.getVariable("vnfId")
+ utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+
+ String source = "VID"
+ execution.setVariable("source", source)
+ utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+ execution.setVariable("DDVAM_moduleCount", 0)
+ execution.setVariable("DDVAM_nextModule", 0)
+
+
+ }catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", " Error Occured in DoCreateVnfAndModules PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf PreProcessRequest")
+
+ }
+ utils.log("DEBUG", "*** COMPLETED DoCreateVnfAndModules PreProcessRequest Process ***", isDebugEnabled)
+ }
+
+
+
+ public void preProcessAddOnModule(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED preProcessAddOnModule ======== ", isDebugLogEnabled)
+
+ 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, "modelInvariantId")
+ execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ String addOnInitialCount = jsonUtil.getJsonValueForKey(addOnModule, "initialCount")
+ execution.setVariable("initialCount", addOnInitialCount)
+
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+ /**
+ * 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(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def method = getClass().getSimpleName() + '.queryAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DvnfId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ utils.logAudit("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');
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = client.httpGet()
+ utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+ responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+ }
+
+ utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+ utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ //Map<String, String>[] vfModules = new HashMap<String,String>[]
+ List<Map<String,String>> vfModulesList = new ArrayList<Map<String,String>>();
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
+ if (responseData != null) {
+ def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+ def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+ def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+ execution.setVariable("DDVAM_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.getNodeText1(vfModuleXml, "vf-module-id")
+ vfModuleEntry.put("vfModuleId", vfModuleName)
+ def vfModuleName = utils.getNodeText1(vfModuleXml, "vf-module-name")
+ vfModuleEntry.put("vfModuleName", vfModuleName)
+ vfModulesList.add(vfModuleEntry)
+ }
+
+ }
+ }
+ execution.setVariable("DDVAM_vfModules", vfModules)
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ public void prepareNextModuleToDelete(Execution execution){
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+ logDebug(" ======== STARTED prepareNextModuleToDelete ======== ", isDebugLogEnabled)
+
+ 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)
+
+
+ // HARDCODED FOR NOW
+ def vfModuleModelInfo = ""
+ execution.setVariable("DDVAM_vfModuleModelInfo", vfModuleModelInfo)
+
+ }catch(Exception e){
+ utils.log("ERROR", "Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
+ }
+ logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+ }
+
+
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
new file mode 100644
index 0000000000..dd35334ddf
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
@@ -0,0 +1,1399 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>DoUpdateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
+ 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(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest DoUpdateNetworkInstance Request ***** ", isDebugEnabled)
+
+ 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())
+ utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+ networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest)
+
+ } catch (Exception ex) {
+ String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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)
+ utils.logAudit(networkRequest)
+ execution.setVariable(Prefix + "networkRequest", networkRequest)
+ utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled)
+
+ // validate 'disableRollback' (aka, 'suppressRollback')
+ boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
+ execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
+ utils.log("DEBUG", Prefix + "rollbackEnabled - " + rollbackEnabled, isDebugEnabled)
+
+ String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+ execution.setVariable(Prefix + "networkInputs", networkInputs)
+ utils.log("DEBUG", Prefix + "networkInputs - " + '\n' + networkInputs, isDebugEnabled)
+
+ // prepare messageId
+ String messageId = execution.getVariable(Prefix + "messageId") // for testing
+ if (messageId == null || messageId == "") {
+ messageId = UUID.randomUUID()
+ utils.log("DEBUG", " UPDNETI_messageId, random generated: " + messageId, isDebugEnabled)
+ } else {
+ utils.log("DEBUG", " UPDNETI_messageId, pre-assigned: " + messageId, isDebugEnabled)
+ }
+ execution.setVariable(Prefix + "messageId", messageId)
+
+ String source = utils.getNodeText1(networkRequest, "source")
+ execution.setVariable(Prefix + "source", source)
+ utils.log("DEBUG", Prefix + "source - " + source, isDebugEnabled)
+
+ String networkId = ""
+ if (utils.nodeExists(networkRequest, "network-id")) {
+ networkId = utils.getNodeText1(networkRequest, "network-id")
+ if (networkId == 'null' || networkId == "") {
+ sendSyncError(execution)
+ // missing value of networkId
+ String dataErrorMessage = "Variable 'network-id' value/element is missing."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+
+ String lcpCloudRegion = ""
+ if (utils.nodeExists(networkRequest, "aic-cloud-region")) {
+ lcpCloudRegion = utils.getNodeText1(networkRequest, "aic-cloud-region")
+ if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) {
+ sendSyncError(execution)
+ String dataErrorMessage = "requestDetails has missing 'aic-cloud-region' value/element."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ }
+
+ String serviceInstanceId = ""
+ if (utils.nodeExists(networkRequest, "service-instance-id")) {
+ serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id")
+ if ((serviceInstanceId == 'null') || (lcpCloudRegion == "")) {
+ sendSyncError(execution)
+ String dataErrorMessage = "Variable 'serviceInstanceId' value/element is missing."
+ utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ }
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ 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()
+ utils.log("DEBUG", dataErrorMessage, , isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ // Set variables for Generic Get Sub Flow use
+ execution.setVariable(Prefix + "serviceInstanceId", serviceInstanceId)
+ utils.log("DEBUG", Prefix + "serviceInstanceId - " + serviceInstanceId, isDebugEnabled)
+
+ execution.setVariable("GENGS_type", "service-instance")
+ utils.log("DEBUG", "GENGS_type - " + "service-instance", isDebugEnabled)
+ utils.log("DEBUG", " Url for SDNC adapter: " + execution.getVariable("URN_mso_adapters_sdnc_endpoint"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // build 'networkOutputs'
+ networkId = utils.getNodeText1(networkRequest, "network-id")
+ if ((networkId == null) || (networkId == "null")) {
+ networkId = ""
+ }
+ String networkName = utils.getNodeText1(networkRequest, "network-name")
+ if ((networkName == null) || (networkName == "null")) {
+ networkName = ""
+ }
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${networkId}</network-id>
+ <network-name>${networkName}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ utils.log("DEBUG", Prefix + "networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+ 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ public void callRESTQueryAAICloudRegion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of DoUpdateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ String networkInputs = execution.getVariable(Prefix + "networkInputs")
+ String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
+ cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+ String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+ utils.logAudit(queryCloudRegionRequest)
+ execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
+ utils.log("DEBUG", " UPDNETI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+ 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")
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+
+ utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable(Prefix + "isCloudRegionGood"), isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ // try error
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkId(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId of DoUpdateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkRequest = execution.getVariable(Prefix + "networkRequest")
+ String networkId = utils.getNodeText1(networkRequest, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ execution.setVariable(Prefix + "networkId", networkId)
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+ utils.logAudit(queryIdAAIRequest)
+ execution.setVariable(Prefix + "queryIdAAIRequest", queryIdAAIRequest)
+ utils.log("DEBUG", Prefix + "queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiIdReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryIdAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
+ utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTReQueryAAINetworkId(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId of DoUpdateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkRequest = execution.getVariable(Prefix + "networkRequest")
+ String networkId = utils.getNodeText1(networkRequest, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare AA&I url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+ utils.logAudit(requeryIdAAIRequest)
+ execution.setVariable(Prefix + "requeryIdAAIRequest", requeryIdAAIRequest)
+ utils.log("DEBUG", " UPDNETI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiRequeryIdReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "requeryIdAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String netId = utils.getNodeText1(aaiResponseAsString, "network-id")
+ String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>${netId}</network-id>
+ <network-name>${netName}</network-name>
+ </network-outputs>"""
+ execution.setVariable(Prefix + "networkOutputs", networkOutputs)
+ utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
+ utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkVpnBinding(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding of DoUpdateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ 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","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", " UPDNETI_vpnCount - " + vpnCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (vpnCount > 0) {
+ execution.setVariable(Prefix + "vpnBindings", vpnBindingUri)
+ utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled)
+
+ 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)
+ } else {
+ queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i]
+ }
+
+ } 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
+ }
+
+ utils.logAudit(queryVpnBindingAAIRequest)
+ execution.setVariable(Prefix + "queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
+ utils.log("DEBUG", " UPDNETI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryVpnBindingAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryVpnBindingAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String routeTarget = ""
+ if (utils.nodeExists(aaiResponseAsString, "global-route-target")) {
+ routeTarget = utils.getNodeText1(aaiResponseAsString, "global-route-target")
+ routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "routeCollection", routeTargets)
+ utils.log("DEBUG", " UPDNETI_routeCollection - " + '\n' + routeTargets, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(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/>")
+ utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkPolicy(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy of DoUpdateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ 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","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", " UPDNETI_networkPolicyCount - " + networkPolicyCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkPolicyCount > 0) {
+ execution.setVariable(Prefix + "networkPolicyUriList", networkPolicyUriList)
+ utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled)
+
+ 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)
+ } else {
+ queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i]
+ }
+ } 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
+
+ }
+
+
+ utils.logAudit(queryNetworkPolicyAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
+ utils.log("DEBUG", " UPDNETI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkPolicyAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String networkPolicy = ""
+ if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
+ networkPolicy = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn")
+ networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "networkCollection", networkPolicies)
+ utils.log("DEBUG", " UPDNETI_networkCollection - " + '\n' + networkPolicies, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(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/>")
+ utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTQueryAAINetworkTableRef(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef of DoUpdateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String messageId = execution.getVariable(Prefix + "messageId")
+ 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","")
+ utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", " UPDNETI_networkTableRefCount - " + networkTableRefCount, isDebugEnabled)
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+
+ if (networkTableRefCount > 0) {
+ execution.setVariable(Prefix + "networkTableRefUriList", networkTableRefUriList)
+ utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled)
+
+ // 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)
+ } else {
+ queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i]
+ }
+ } 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
+
+ }
+
+
+ utils.logAudit(queryNetworkTableRefAAIRequest)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
+ utils.log("DEBUG", " UPDNETI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkTableRefAAIRequest)
+ String returnCode = response.getStatusCode()
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
+
+ String aaiResponseAsString = response.getResponseBodyAsString()
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiResponseAsString)
+ execution.setVariable(Prefix + "queryNetworkTableRefAAIResponse", aaiResponseAsString)
+ utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+ String networkTableRef = ""
+ if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
+ networkTableRef = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn")
+ networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
+ }
+
+ } else {
+ if (returnCode=='404') {
+ String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ }
+ }
+ }
+
+ } // end loop
+
+ execution.setVariable(Prefix + "tableRefCollection", networkTableRefs)
+ utils.log("DEBUG", " UPDNETI_tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled)
+
+ } else {
+ // reset return code to success
+ execution.setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(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/>")
+ utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void callRESTUpdateContrailAAINetwork(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork of DoUpdateNetworkInstance ***** " , isDebugEnabled)
+
+ try {
+ // get variables
+ String networkRequest = execution.getVariable(Prefix + "networkRequest")
+ String networkId = utils.getNodeText1(networkRequest, "network-id")
+ networkId = UriUtils.encode(networkId,"UTF-8")
+ String requeryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
+ String updateNetworkResponse = execution.getVariable(Prefix + "updateNetworkResponse")
+ String messageId = execution.getVariable(Prefix + "messageId")
+
+ // Prepare url
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+ String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId + "?depth=1"
+
+ utils.logAudit(updateContrailAAIUrlRequest)
+ execution.setVariable(Prefix + "updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
+ utils.log("DEBUG", " UPDNETI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled)
+
+ //Prepare payload (PUT)
+ String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, updateNetworkResponse, schemaVersion)
+ String payloadXml = utils.formatXml(payload)
+ utils.logAudit(payloadXml)
+ execution.setVariable(Prefix + "updateContrailAAIPayloadRequest", payloadXml)
+ utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled)
+
+ APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payload)
+ String returnCode = response.getStatusCode()
+ String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
+
+ execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode)
+ utils.log("DEBUG", " ***** AAI Update Contrail Response Code : " + returnCode, isDebugEnabled)
+
+
+ if (returnCode=='200') {
+ utils.logAudit(aaiUpdateContrailResponseAsString)
+ execution.setVariable(Prefix + "updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
+ utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled)
+ // 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)."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ 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
+ utils.log("DEBUG", errorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage)
+ }
+ }
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareUpdateNetworkRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareUpdateNetworkRequest of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ 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:", "")
+ utils.logAudit(buildUpdateNetworkRequestAsString)
+
+ execution.setVariable(Prefix + "updateNetworkRequest", buildUpdateNetworkRequestAsString)
+ utils.log("DEBUG", " UPDNETI_updateNetworkRequest - " + "\n" + buildUpdateNetworkRequestAsString, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareUpdateNetworkRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSDNCRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRequest of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ // get variables
+ String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String updateNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+
+ String networkId = ""
+ if (utils.nodeExists(updateNetworkInput, "network-id")) {
+ networkId = utils.getNodeText1(updateNetworkInput, "network-id")
+ }
+ if (networkId == null) {networkId = ""}
+
+ String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id")
+
+ // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+ String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "changeassign", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
+
+ String sndcTopologyUpdateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ utils.logAudit(sndcTopologyUpdateRequesAsString)
+ execution.setVariable(Prefix + "changeAssignSDNCRequest", sndcTopologyUpdateRequesAsString)
+ utils.log("DEBUG", " UPDNETI_changeAssignSDNCRequest - " + "\n" + sndcTopologyUpdateRequesAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSDNCRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void validateUpdateNetworkResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateUpdateNetworkResponse of DoUpdateNetworkInstance *****", isDebugEnabled)
+
+ try {
+ String returnCode = execution.getVariable(Prefix + "networkReturnCode")
+ String networkResponse = execution.getVariable(Prefix + "updateNetworkResponse")
+ if (networkResponse==null) {
+ networkResponse="" // reset
+ }
+
+ utils.log("DEBUG", " Network Adapter update responseCode: " + returnCode, isDebugEnabled)
+
+ String errorMessage = ""
+ if (returnCode == "200") {
+ execution.setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ utils.logAudit(networkResponse)
+ execution.setVariable(Prefix + "updateNetworkResponse", networkResponse)
+ utils.log("DEBUG", " Network Adapter update Success Response - " + "\n" + networkResponse, isDebugEnabled)
+
+ // 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)
+ utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
+
+ } 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.getNodeText1(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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void validateSDNCResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateSDNCResponse of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ String response = execution.getVariable(Prefix + "changeAssignSDNCResponse")
+ WorkflowException workflowException = null
+ try {
+ workflowException = execution.getVariable(Prefix + "WorkflowException")
+ //execution.setVariable("WorkflowException", workflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sdnc 'WorkflowException' object is empty or null. ", isDebugEnabled)
+ }
+
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+ // reset variable
+ String changeAssignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable(Prefix + "changeAssignSDNCResponse"))
+ changeAssignSDNCResponseDecodeXml = changeAssignSDNCResponseDecodeXml.replace("&", "&amp;").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)
+ utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+
+ } else {
+ utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ }
+
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ utils.log("DEBUG", " ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"), isDebugEnabled)
+ 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)
+ utils.log("DEBUG", " ***** postProcessResponse(), GOOD !!!", isDebugEnabled)
+ } 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.
+ utils.log("DEBUG", " ***** workflowException: " + execution.getVariable("workflowException"), isDebugEnabled)
+ 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
+ utils.log("DEBUG", " ***** postProcessResponse(), BAD !!!", isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ } catch(BpmnError b){
+ utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+ public void prepareSDNCRollbackRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ 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 = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+ String updateNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
+ String changeAssignSDNCResponse = execution.getVariable(Prefix + "changeAssignSDNCResponse")
+ String networkId = utils.getNodeText1(changeAssignSDNCResponse, "network-id")
+
+ String serviceInstanceId = utils.getNodeText1(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)
+ utils.log("DEBUG", " Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareRollbackData() of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "** rollbackData : " + rollbackData, isDebugEnabled)
+
+ execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException"))
+ utils.log("DEBUG", "** WorkflowException : " + execution.getVariable("WorkflowException"), isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareSuccessRollbackData(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareSuccessRollbackData() of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("sdncVersion") == '1702') {
+ // 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)
+
+ utils.log("DEBUG", "** 'rollbackData' for Full Rollback : " + rollbackData, isDebugEnabled)
+ execution.setVariable("WorkflowException", null)
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void setExceptionFlag(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside setExceptionFlag() of DoUpdateNetworkInstance ***** ", isDebugEnabled)
+
+ 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"))
+ }
+ utils.log("DEBUG", Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+
+ } catch(Exception ex){
+ String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ execution.setVariable("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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
new file mode 100644
index 0000000000..c91771116f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
@@ -0,0 +1,304 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+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 DoUpdateNetworkInstanceRollback extends AbstractServiceTaskProcessor {
+ 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(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of " + className + ".groovy ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "'rollbackData': " + '\n' + execution.getVariable("rollbackData"), isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG", "sdncVersion? : " + sdncVersion, isDebugEnabled)
+
+ // PO Authorization Info / headers Authorization=
+ String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+ try {
+ def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+ 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()
+ utils.log("DEBUG", dataErrorMessage , isDebugEnabled)
+ 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"))
+ }
+ utils.log("DEBUG", "*** WorkflowException : " + execution.getVariable(Prefix + "WorkflowException"), isDebugEnabled)
+ 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)
+
+ }
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ // caught exception
+ String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void validateRollbackResponses (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside validateRollbackResponses() of DoUpdateNetworkInstanceRollback ***** ", isDebugEnabled)
+
+ 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")
+ utils.log("DEBUG", " NetworkRollback Code - " + rollbackNetworkReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " NetworkRollback Response - " + rollbackNetworkResponse, isDebugEnabled)
+ 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 = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
+ rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+ if (rollbackSDNCReturnCode == "200") {
+ if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+ rollbackSDNCReturnInnerCode = utils.getNodeText1(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. "
+ }
+ utils.log("DEBUG", " SDNC changeassign rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
+ utils.log("DEBUG", " SDNC changeassign rollback Response - " + rollbackSDNCResponse, isDebugEnabled)
+ }
+
+ String statusMessage = ""
+ int errorCode = 7000
+ utils.log("DEBUG", "*** fullRollback? : " + execution.getVariable(Prefix + "fullRollback"), isDebugEnabled)
+ 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
+ utils.log("DEBUG", "Final DoUpdateNetworkInstanceRollback status message: " + statusMessage, isDebugEnabled)
+ 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. "
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ 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()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+ execution.setVariable("WorkflowException", execution.getVariable("WorkflowException"))
+
+ }
+
+ }
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ 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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
index 35600bcd10..5999857608 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -1,793 +1,919 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.util.Node
-import groovy.xml.QName
-
-import java.io.Serializable;
-
-import org.springframework.web.util.UriUtils
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-public class DoUpdateVfModule extends VfModuleBase {
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * Initialize the flow's variables.
- *
- * @param execution The flow's execution instance.
- */
- public void initProcessVariables(Execution 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_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_vfModule', null)
- execution.setVariable('DOUPVfMod_vnfParams', null)
- execution.setVariable("DOUPVfMod_baseVfModuleId", "")
- execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", "")
- execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', 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(Execution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- initProcessVariables(execution)
- def xml = getVariable(execution, 'DoUpdateVfModuleRequest')
- utils.logAudit("DoUpdateVfModule request: " + xml)
- logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
-
- 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('att-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_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)
- }
- logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
-
- 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) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
- def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
- logError(msg)
- createWorkflowException(execution, 2000, msg)
- }
- def vnfCallbackUrl = (String) execution.getVariable('URN_mso_workflow_vnfadapter_rest_callback')
- if (vnfCallbackUrl == null || vnfCallbackUrl.trim().isEmpty()) {
- def msg = 'Required variable \'URN_mso_workflow_vnfadapter_rest_callback\' is missing'
- logError(msg)
- createWorkflowException(execution, 2000, msg)
- }
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(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(Execution execution) {
- def method = getClass().getSimpleName() + '.preparePrepareUpdateAAIVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('DOUPVfMod_vnfId')
- def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
- def orchestrationStatus = 'pending-update'
-
- String prepareUpdateAAIVfModuleRequest = """
- <PrepareUpdateAAIVfModuleRequest>
- <vnf-id>${vnfId}</vnf-id>
- <vf-module-id>${vfModuleId}</vf-module-id>
- <orchestration-status>${orchestrationStatus}</orchestration-status>
- </PrepareUpdateAAIVfModuleRequest>
- """
- prepareUpdateAAIVfModuleRequest = utils.formatXml(prepareUpdateAAIVfModuleRequest)
- execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', prepareUpdateAAIVfModuleRequest)
- utils.logAudit("DoUpdateAAIVfModule request: " + prepareUpdateAAIVfModuleRequest)
- logDebug('Request for PrepareUpdateAAIVfModule:\n' + prepareUpdateAAIVfModuleRequest, isDebugLogEnabled)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
- }
- }
-
- /**
- * Prepare a Request for invoking the ConfirmVolumeGroupTenant subflow. Currently,
- * there is really nothing to do, so we just log that we're passing through.
- *
- * @param execution The flow's execution instance.
- */
- public void prepConfirmVolumeGroupTenant(Execution execution) {
- def method = getClass().getSimpleName() + '.prepConfirmVolumeGroupTenant(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- // Nothing to do - just log that we're passing through here
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in prepConfirmVolumeGroupTenant(): ' + e.getMessage())
- }
- }
-
- /**
- * 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(Execution execution) {
- def method = getClass().getSimpleName() + '.prepSDNCTopologyChg(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def requestId = execution.getVariable('DOUPVfMod_requestId')
- def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
- def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- 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')
-
- // 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://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- <request-information>
- <request-id>${requestId}</request-id>
- <request-action>ChangeVNFActivateRequest</request-action>
- <source>PORTAL</source>
- <notification-url/>
- <order-number/>
- <order-version/>
- </request-information>
- <service-information>
- <service-type>${serviceId}</service-type>
- <service-instance-id>${vnfId}</service-instance-id>
- <subscriber-name>dontcare</subscriber-name>
- </service-information>
- <vnf-request-information>
- <vnf-id>${vfModuleId}</vnf-id>
- <vnf-type>${vfModuleModelName}</vnf-type>
- <vnf-name>${vfModuleName}</vnf-name>
- <generic-vnf-id>${vnfId}</generic-vnf-id>
- <generic-vnf-name>${vnfName}</generic-vnf-name>
- <generic-vnf-type>${vnfType}</generic-vnf-type>
- <tenant>${tenantId}</tenant>
- <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
- ${vnfNetworks}
- </vnf-request-information>
- </sdncadapterworkflow:SDNCRequestData>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
- sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
- execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
- utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
- logDebug('Request for SDNCAdapter topology/changeassign:\n' + sdncTopologyRequest, isDebugLogEnabled)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(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(Execution execution) {
- def method = getClass().getSimpleName() + '.prepSDNCTopologyQuery(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def requestId = execution.getVariable('DOUPVfMod_requestId')
- def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
- def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- 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://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/${vfModuleId}</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
- <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
- </sdncadapter:RequestHeader>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
- sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
- execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
- utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
- logDebug('Request for SDNCAdapter query:\n' + sdncTopologyRequest, isDebugLogEnabled)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(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(Execution execution) {
- def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- 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 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 backoutOnFailure = execution.getVariable("DOUPVfMod_backoutOnFailure")
-
- def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
- def vfModuleParamsEntries = transformParamsToEntries(vnfParamsXml)
-
- def messageId = execution.getVariable('att-mso-request-id') + '-' + System.currentTimeMillis()
- def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
- def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
- if ('true'.equals(useQualifiedHostName)) {
- notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
- }
-
- String sdncGetResponse = execution.getVariable('DOUPVfMod_sdncTopologyResponse')
-
- String vfModuleParams = buildVfModuleParams(vfModuleParamsEntries, sdncGetResponse, vnfId, vnfName,
- vfModuleId, vfModuleName)
-
-
- String vnfAdapterRestRequest = """
- <updateVfModuleRequest>
- <cloudSiteId>${cloudId}</cloudSiteId>
- <tenantId>${tenantId}</tenantId>
- <vnfId>${vnfId}</vnfId>
- <vfModuleId>${vfModuleId}</vfModuleId>
- <vfModuleStackId>${heatStackId}</vfModuleStackId>
- <vnfType>${vnfType}</vnfType>
- <vnfVersion>${asdcServiceModelVersion}</vnfVersion>
- <vfModuleType>${vfModuleModelName}</vfModuleType>
- <volumeGroupId>${volumeGroupId}</volumeGroupId>
- <baseVfModuleId>${baseVfModuleId}</baseVfModuleId>
- <baseVfModuleStackId>${baseVfModuleStackId}</baseVfModuleStackId>
- <skipAAI>true</skipAAI>
- <backout>${backoutOnFailure}</backout>
- <failIfExists>false</failIfExists>
- <vfModuleParams>
- ${vfModuleParams}
- </vfModuleParams>
- <msoRequest>
- <requestId>${requestId}</requestId>
- <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
- </msoRequest>
- <messageId>${messageId}</messageId>
- <notificationUrl>${notificationUrl}</notificationUrl>
- </updateVfModuleRequest>
- """
- vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
- execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', vnfAdapterRestRequest)
- utils.logAudit("vnfAdapterRestRequest : " + vnfAdapterRestRequest)
- logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(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(Execution execution) {
- def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('DOUPVfMod_vnfId')
- def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
-
- def personaModelId = utils.getNodeText1(vnfInputs, 'vnf-persona-model-id')
- def personaModelVersion = utils.getNodeText1(vnfInputs, 'vnf-persona-model-version')
- if ((personaModelId == null) || (personaModelVersion == null)) {
- logDebug('Skipping update for Generic VNF ' + vnfId +
- ' because either \'vnf-persona-model-id\' or \'vnf-persona-model-version\' is absent', isDebugLogEnabled)
- execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', true)
- } else {
- def personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
- def personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
-
- String updateAAIGenericVnfRequest = """
- <UpdateAAIGenericVnfRequest>
- <vnf-id>${vnfId}</vnf-id>
- ${personaModelIdElement}
- ${personaModelVersionElement}
- </UpdateAAIGenericVnfRequest>
- """
- updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
- execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
- utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
- logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
- }
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(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(Execution execution) {
- def method = getClass().getSimpleName() + '.prepUpdateAAIVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- 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.getNodeText1(vnfInputs, 'persona-model-id')
- if (personaModelId != null) {
- personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
- }
- def personaModelVersionElement = ''
- def personaModelVersion = utils.getNodeText1(vnfInputs, 'persona-model-version')
- if (personaModelVersion != null) {
- personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
- }
- def contrailServiceInstanceFqdnElement = ''
- def contrailServiceInstanceFqdn = utils.getNodeText1(vnfInputs, 'contrail-service-instance-fqdn')
- if (contrailServiceInstanceFqdn != null) {
- contrailServiceInstanceFqdnElement = '<contrail-service-instance-fqdn>' + contrailServiceInstanceFqdn + '</contrail-service-instance-fqdn>'
- }
-
- String updateAAIVfModuleRequest = """
- <UpdateAAIVfModuleRequest>
- <vnf-id>${vnfId}</vnf-id>
- <vf-module-id>${vfModuleId}</vf-module-id>
- <orchestration-status>${orchestrationStatus}</orchestration-status>
- ${volumeGroupIdElement}
- ${personaModelIdElement}
- ${personaModelVersionElement}
- ${contrailServiceInstanceFqdnElement}
- </UpdateAAIVfModuleRequest>
- """
- updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
- execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', updateAAIVfModuleRequest)
- utils.logAudit("updateAAIVfModuleRequest : " + updateAAIVfModuleRequest)
- logDebug('Request for UpdateAAIVfModule:\n' + updateAAIVfModuleRequest, isDebugLogEnabled)
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(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(Execution execution) {
- def method = getClass().getSimpleName() + '.prepSDNCTopologyAct(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def requestId = execution.getVariable('DOUPVfMod_requestId')
- def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
- def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- def serviceId = execution.getVariable('DOUPVfMod_serviceId')
- def vnfId = execution.getVariable('DOUPVfMod_vnfId')
- 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')
-
- def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
- def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
-
- String sdncTopologyRequest = """
- <sdncadapterworkflow:SDNCAdapterWorkflowRequest
- xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- <request-information>
- <request-id>${requestId}</request-id>
- <request-action>ChangeVNFActivateRequest</request-action>
- <source>PORTAL</source>
- <notification-url/>
- <order-number/>
- <order-version/>
- </request-information>
- <service-information>
- <service-type>${serviceId}</service-type>
- <service-instance-id>${vnfId}</service-instance-id>
- <subscriber-name>dontcare</subscriber-name>
- </service-information>
- <vnf-request-information>
- <vnf-id>${vfModuleId}</vnf-id>
- <vnf-type>${vfModuleModelName}</vnf-type>
- <vnf-name>${vfModuleName}</vnf-name>
- <tenant>${tenantId}</tenant>
- <aic-clli>${aicCloudRegion}</aic-clli> <!-- Optional -->
- ${vnfNetworks} <!-- Optional -->
- </vnf-request-information>
- </sdncadapterworkflow:SDNCRequestData>
- </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
- """
- sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
- execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
- utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
- logDebug('Request for SDNCAdapter topology/activate:\n' + sdncTopologyRequest, isDebugLogEnabled)
-
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in prepSDNCTopologyAct(): ' + e.getMessage())
- }
- }
-
- /**
- * Log a WorkflowException that has been created.
- *
- * @param execution The flow's execution instance.
- */
- public void handleWorkflowException(Execution execution) {
- def method = getClass().getSimpleName() + '.handleWorkflowException(' +
- 'execution=' + execution.getId() +
- ')'
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
- logError(method + ' caught WorkflowException: ' + workflowException.getErrorMessage())
-
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
- }
- }
-
- public void validateSDNCResponse(Execution execution, String response, String method){
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix = execution.getVariable("prefix")
-
- logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
-
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
-
- utils.logAudit("workflowException: " + workflowException)
-
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
- sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
-
- utils.logAudit("SDNCResponse: " + response)
-
- String sdncResponse = response
- if(execution.getVariable(prefix + 'sdncResponseSuccess') == true){
- logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
- }else{
- logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
- logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
- }
-
- /**
- * 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(Execution execution) {
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- def method = getClass().getSimpleName() + '.getVfModule(' +
- 'execution=' + execution.getId() +
- ')'
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- try {
- def vnfId = execution.getVariable('DOUPVfMod_vnfId')
- def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
- logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
-
- String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
- utils.logAudit("AAI endPoint: " + endPoint)
-
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- 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');
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
- logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
- APIResponse response = client.httpGet()
- utils.logAudit("createVfModule - invoking httpGet() to AAI")
-
- responseData = response.getResponseBodyAsString()
- if (responseData != null) {
- logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
-
- }
-
- utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
- utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
-
- execution.setVariable('DOUPVfMod_queryAAIVfModuleResponseCode', response.getStatusCode())
- execution.setVariable('DOUPVfMod_queryAAIVfModuleResponse', responseData)
- logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
- logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
- if (response.getStatusCode() == 200) {
- // Parse the VNF record from A&AI to find base module info
- logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
- 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.getNodeText1(vfModuleXml, "vf-module-id")
- execution.setVariable("DOUPVfMod_baseVfModuleId", baseModuleId)
- logDebug('Received baseVfModuleId: ' + baseModuleId, isDebugLogEnabled)
- String baseModuleHeatStackId = utils.getNodeText1(vfModuleXml, "heat-stack-id")
- execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", baseModuleHeatStackId)
- logDebug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId, isDebugLogEnabled)
- }
- }
- }
- }
- } catch (Exception ex) {
- ex.printStackTrace()
- logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
- }
- logDebug('Exited ' + method, isDebugLogEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
- }
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.VfModule
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.springframework.web.util.UriUtils
+
+public class DoUpdateVfModule extends VfModuleBase {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution 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_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(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ initProcessVariables(execution)
+ def xml = getVariable(execution, 'DoUpdateVfModuleRequest')
+ utils.logAudit("DoUpdateVfModule request: " + xml)
+ logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+
+ if (xml == null || xml.isEmpty()) {
+ // Building Block-type request
+
+ String cloudConfiguration = execution.getVariable("cloudConfiguration")
+ String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
+
+ def serviceModelInfo = execution.getVariable("serviceModelInfo")
+ logDebug("serviceModelInfo: " + serviceModelInfo, isDebugLogEnabled)
+ def vnfModelInfo = execution.getVariable("vnfModelInfo")
+
+
+ //tenantId
+ def tenantId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.tenantId")
+ execution.setVariable("DOUPVfMod_tenantId", tenantId)
+
+ //volumeGroupId
+ def volumeGroupId = execution.getVariable("volumeGroupId")
+ execution.setVariable("DOUPVfMod_volumeGroupId", volumeGroupId)
+ //volumeGroupName
+ def volumeGroupName = execution.getVariable("volumeGroupName")
+ execution.setVariable("DOUPVfMod_volumeGroupName", volumeGroupName)
+ //cloudSiteId
+ def cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("DOUPVfMod_cloudSiteId", cloudSiteId)
+
+ logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
+ //vnfType
+ def vnfType = execution.getVariable("vnfType")
+ execution.setVariable("DOUPVfMod_vnfType", vnfType)
+
+ logDebug("vnfType: " + vnfType, isDebugLogEnabled)
+ //vnfName
+ def vnfName = execution.getVariable("vnfName")
+ execution.setVariable("DOUPVfMod_vnfName", vnfName)
+
+ logDebug("vnfName: " + vnfName, isDebugLogEnabled)
+ //vnfId
+ def vnfId = execution.getVariable("vnfId")
+ execution.setVariable("DOUPVfMod_vnfId", vnfId)
+
+ logDebug("vnfId: " + vnfId, isDebugLogEnabled)
+ //vfModuleName
+ def vfModuleName = execution.getVariable("vfModuleName")
+ execution.setVariable("DOUPVfMod_vfModuleName", vfModuleName)
+
+ logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
+ //vfModuleModelName
+ def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
+ execution.setVariable("DOUPVfMod_vfModuleModelName", vfModuleModelName)
+
+ logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
+ //modelCustomizationUuid
+ def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationId")
+ execution.setVariable("DOUPVfMod_modelCustomizationUuid", modelCustomizationUuid)
+
+ logDebug("modelCustomizationUuid: " + modelCustomizationUuid, isDebugLogEnabled)
+ //vfModuleId
+ def vfModuleId = execution.getVariable("vfModuleId")
+ execution.setVariable("DOUPVfMod_vfModuleId", vfModuleId)
+ logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
+ def requestId = execution.getVariable("requestId")
+ execution.setVariable("DOUPVfMod_requestId", requestId)
+ logDebug("requestId: " + requestId, isDebugLogEnabled)
+ // 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)
+ logDebug("serviceId: " + serviceId, isDebugLogEnabled)
+ //serviceInstanceId
+ def serviceInstanceId = execution.getVariable("serviceInstanceId")
+ execution.setVariable("DOUPVfMod_serviceInstanceId", serviceInstanceId)
+
+ logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
+ //source - HARDCODED
+ def source = "VID"
+ execution.setVariable("DOUPVfMod_source", source)
+
+ logDebug("source: " + source, isDebugLogEnabled)
+ //backoutOnFailure
+ def disableRollback = execution.getVariable("disableRollback")
+ def backoutOnFailure = true
+ if (disableRollback != null && disableRollback.equals("true")) {
+ backoutOnFailure = false
+ }
+ execution.setVariable("DOUPVfMod_backoutOnFailure", backoutOnFailure)
+ logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
+ //isBaseVfModule
+ def isBaseVfModule = execution.getVariable("isBaseVfModule")
+ execution.setVariable("DOUPVfMod_isBaseVfModule", isBaseVfModule)
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+ //asdcServiceModelVersion
+ def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
+ execution.setVariable("DOUPVfMod_asdcServiceModelVersion", asdcServiceModelVersion)
+ logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
+ //personaModelId
+ execution.setVariable("DOUPVfMod_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantId"))
+ //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()
+ logDebug("Generated messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }else{
+ logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled)
+ }
+ //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("DOUPVfMod_globalSubscriberId", globalSubscriberId)
+ logDebug("globalSubsrciberId: " + globalSubscriberId, isDebugLogEnabled)
+ //vnfQueryPath
+ String vnfQueryPath = execution.getVariable("vnfQueryPath")
+ execution.setVariable("DOUPVfMod_vnfQueryPath", vnfQueryPath)
+ logDebug("vnfQueryPath: " + vnfQueryPath, isDebugLogEnabled)
+
+ String vnfParamsChildNodes = execution.getVariable("vfModuleInputParams")
+ execution.setVariable('DOUPVfMod_vnfParams', vnfParamsChildNodes)
+ }
+ 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)
+ }
+ logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+
+ 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) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+ def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+ logError(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.preparePrepareUpdateAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+ def orchestrationStatus = 'pending-update'
+
+ String prepareUpdateAAIVfModuleRequest = """
+ <PrepareUpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <orchestration-status>${orchestrationStatus}</orchestration-status>
+ </PrepareUpdateAAIVfModuleRequest>
+ """
+ prepareUpdateAAIVfModuleRequest = utils.formatXml(prepareUpdateAAIVfModuleRequest)
+ execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', prepareUpdateAAIVfModuleRequest)
+ utils.logAudit("DoUpdateAAIVfModule request: " + prepareUpdateAAIVfModuleRequest)
+ logDebug('Request for PrepareUpdateAAIVfModule:\n' + prepareUpdateAAIVfModuleRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Prepare a Request for invoking the ConfirmVolumeGroupTenant subflow. Currently,
+ * there is really nothing to do, so we just log that we're passing through.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepConfirmVolumeGroupTenant(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepConfirmVolumeGroupTenant(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ // Nothing to do - just log that we're passing through here
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepConfirmVolumeGroupTenant(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyChg(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ 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')
+
+ // 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.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${vnfId}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name>${vnfName}</generic-vnf-name>
+ <generic-vnf-type>${vnfType}</generic-vnf-type>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ ${vnfNetworks}
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncChangeAssignRequest', sdncTopologyRequest)
+ utils.logAudit("sdncChangeAssignRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter topology/changeassign:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyQuery(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ 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.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/${vfModuleId}</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
+ utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter query:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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 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 vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vfModuleParamsEntries = transformParamsToEntries(vnfParamsXml)
+
+ def messageId = execution.getVariable('mso-request-id') + '-' + System.currentTimeMillis()
+ def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
+ def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String sdncGetResponse = execution.getVariable('DOUPVfMod_sdncTopologyResponse')
+
+ String vfModuleParams = buildVfModuleParams(vfModuleParamsEntries, sdncGetResponse, vnfId, vnfName,
+ vfModuleId, vfModuleName, null)
+
+
+ String vnfAdapterRestRequest = """
+ <updateVfModuleRequest>
+ <cloudSiteId>${cloudId}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vfModuleId>${vfModuleId}</vfModuleId>
+ <vfModuleStackId>${heatStackId}</vfModuleStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion>${asdcServiceModelVersion}</vnfVersion>
+ <modelCustomizationUuid>${modelCustomizationUuid}</modelCustomizationUuid>
+ <vfModuleType>${vfModuleModelName}</vfModuleType>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <baseVfModuleId>${baseVfModuleId}</baseVfModuleId>
+ <baseVfModuleStackId>${baseVfModuleStackId}</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>${backoutOnFailure}</backout>
+ <failIfExists>false</failIfExists>
+ <vfModuleParams>
+ ${vfModuleParams}
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVfModuleRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ utils.logAudit("vnfAdapterRestRequest : " + vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+
+ def personaModelId = utils.getNodeText1(vnfInputs, 'vnf-persona-model-id')
+ def personaModelVersion = utils.getNodeText1(vnfInputs, 'vnf-persona-model-version')
+ if ((personaModelId == null) || (personaModelVersion == null)) {
+ logDebug('Skipping update for Generic VNF ' + vnfId +
+ ' because either \'vnf-persona-model-id\' or \'vnf-persona-model-version\' is absent', isDebugLogEnabled)
+ execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', true)
+ } else {
+ def personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
+ def personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
+
+ String updateAAIGenericVnfRequest = """
+ <UpdateAAIGenericVnfRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ ${personaModelIdElement}
+ ${personaModelVersionElement}
+ </UpdateAAIGenericVnfRequest>
+ """
+ updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+ execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+ utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+ logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateAAIVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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.getNodeText1(vnfInputs, 'persona-model-id')
+ if (personaModelId != null) {
+ personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
+ }
+ def personaModelVersionElement = ''
+ def personaModelVersion = utils.getNodeText1(vnfInputs, 'persona-model-version')
+ if (personaModelVersion != null) {
+ personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
+ }
+ def contrailServiceInstanceFqdnElement = ''
+ def contrailServiceInstanceFqdn = utils.getNodeText1(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 = '<persona-model-customization-id>' + modelCustomizationId + '</persona-model-customization-id>'
+ }
+
+ String updateAAIVfModuleRequest = """
+ <UpdateAAIVfModuleRequest>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <orchestration-status>${orchestrationStatus}</orchestration-status>
+ ${volumeGroupIdElement}
+ ${personaModelIdElement}
+ ${personaModelVersionElement}
+ ${contrailServiceInstanceFqdnElement}
+ ${personaModelCustomizationIdElement}
+ </UpdateAAIVfModuleRequest>
+ """
+ updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+ execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', updateAAIVfModuleRequest)
+ utils.logAudit("updateAAIVfModuleRequest : " + updateAAIVfModuleRequest)
+ logDebug('Request for UpdateAAIVfModule:\n' + updateAAIVfModuleRequest, isDebugLogEnabled)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepSDNCTopologyAct(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('DOUPVfMod_requestId')
+ def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+ def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+ 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')
+
+ def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+ def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+
+ String sdncTopologyRequest = """
+ <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${requestId}</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>${serviceId}</service-type>
+ <service-instance-id>${vnfId}</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>${vfModuleId}</vnf-id>
+ <vnf-type>${vfModuleModelName}</vnf-type>
+ <vnf-name>${vfModuleName}</vnf-name>
+ <generic-vnf-id>${vnfId}</generic-vnf-id>
+ <generic-vnf-name>${vnfName}</generic-vnf-name>
+ <generic-vnf-type>${vnfType}</generic-vnf-type>
+ <tenant>${tenantId}</tenant>
+ <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+ </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+ """
+ sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+ execution.setVariable('DOUPVfMod_sdncActivateRequest', sdncTopologyRequest)
+ utils.logAudit("sdncActivateRequest : " + sdncTopologyRequest)
+ logDebug('Request for SDNCAdapter topology/activate:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleWorkflowException(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
+ logError(method + ' caught WorkflowException: ' + workflowException.getErrorMessage())
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildWorkflowException(execution, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
+ }
+ }
+
+ public void validateSDNCResponse(Execution execution, String response, String method){
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def prefix = execution.getVariable("prefix")
+
+ logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+ WorkflowException workflowException = execution.getVariable("WorkflowException")
+ boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+ utils.logAudit("workflowException: " + workflowException)
+
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+ utils.logAudit("SDNCResponse: " + response)
+
+ String sdncResponse = response
+ if(execution.getVariable(prefix + 'sdncResponseSuccess') == true){
+ logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse, isDebugLogEnabled)
+ }else{
+ logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+ }
+
+ /**
+ * 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(Execution execution) {
+ def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+ def method = getClass().getSimpleName() + '.getVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+ def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+ logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+ String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
+ utils.logAudit("AAI endPoint: " + endPoint)
+
+ try {
+ def aaiRequestId = UUID.randomUUID().toString()
+ logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, endPoint)
+ utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+ def responseData = response.getResponseBodyAsString()
+ if (responseData != null) {
+ logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+ }
+
+ utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+ utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponseCode', response.getStatusCode())
+ execution.setVariable('DOUPVfMod_queryAAIVfModuleResponse', responseData)
+ logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ if (response.getStatusCode() == 200) {
+ // Parse the VNF record from A&AI to find base module info
+ logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
+ 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.getNodeText1(vfModuleXml, "vf-module-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleId", baseModuleId)
+ logDebug('Received baseVfModuleId: ' + baseModuleId, isDebugLogEnabled)
+ String baseModuleHeatStackId = utils.getNodeText1(vfModuleXml, "heat-stack-id")
+ execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", baseModuleHeatStackId)
+ logDebug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId, isDebugLogEnabled)
+ }
+ }
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace()
+ logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+ }
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+ }
+ }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
index 9f21faaa27..c2d394f02e 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
@@ -1,53 +1,54 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-
-public class HealthCheckActivate extends AbstractServiceTaskProcessor {
-
-
- /**
- * Validates the request message and sets up the workflow.
- * @param execution the execution
- */
- public void preProcessRequest(Execution execution) {
-
- }
-
-
- /**
- * Sends the synchronous response back to the API Handler.
- * @param execution the execution
- */
- public void sendResponse(Execution execution) {
- def status = execution.getVariable("healthyStatus")
- def healthcheckmessage = execution.getVariable("healthcheckmessage")
- if (status == "true") {
- sendWorkflowResponse(execution, 200, healthcheckmessage)
- }else{
- sendWorkflowResponse(execution, 503, healthcheckmessage)
- }
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.apache.commons.lang3.*
+
+public class HealthCheckActivate extends AbstractServiceTaskProcessor {
+
+
+ /**
+ * Validates the request message and sets up the workflow.
+ * @param execution the execution
+ */
+ public void preProcessRequest(Execution execution) {
+
+ }
+
+
+ /**
+ * Sends the synchronous response back to the API Handler.
+ * @param execution the execution
+ */
+ public void sendResponse(Execution 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/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
new file mode 100644
index 0000000000..68b0e58b57
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
@@ -0,0 +1,452 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.rest.APIResponse
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>UpdateNetworkInstance.bpmn</class> process.
+ *
+ */
+public class UpdateNetworkInstance extends AbstractServiceTaskProcessor {
+ String Prefix="UPDNI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public InitializeProcessVariables(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest() of UpdateNetworkInstance Request ***** ", isDebugEnabled)
+
+ 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)
+ utils.log("DEBUG", "Received 'suppressRollback': " + disableRollback , isDebugEnabled)
+ } else {
+ execution.setVariable("disableRollback", false)
+ }
+ utils.log("DEBUG", " Set 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ } else {
+ String dataErrorMessage = " Invalid 'bpmnRequest' request."
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ } else {
+ // 'macro' TEST ONLY, sdncVersion = '1702'
+ utils.log("DEBUG", " 'disableRollback' : " + execution.getVariable("disableRollback") , isDebugEnabled)
+ }
+
+ // 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 UpdateNetworkInstance, PreProcessRequest() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+ }
+
+ public void sendSyncResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse() of UpdateNetworkInstance ***** ", isDebugEnabled)
+
+ 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()
+
+ utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + updateNetworkRestRequest, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, updateNetworkRestRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstance flow. sendSyncResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+
+ }
+
+
+ public void getNetworkModelInfo (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside getNetworkModelInfo() of UpdateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ // "networkModelInfo" is expected to be sent
+ String networkModelInfo = execution.getVariable("networkModelInfo")
+ utils.log("DEBUG", " networkModelInfo - " + networkModelInfo, isDebugEnabled)
+
+ // "serviceModelInfo" is expected to be sent
+ String serviceModelInfo = execution.getVariable("serviceModelInfo")
+ utils.log("DEBUG", " serviceModelInfo - " + serviceModelInfo, isDebugEnabled)
+
+
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstance flow. getNetworkModelInfo() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncError() of UpdateNetworkInstance ***** ", isDebugEnabled)
+
+ 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) {
+ utils.log("DEBUG", " Bpmn error encountered in UpdateNetworkInstance flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ public void prepareDBRequestError (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDBRequestError() of UpdateNetworkInstance ***** ", 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.openecomp.mso/requestsdb">
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>${statusMessage}</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ execution.setVariable(Prefix + "createDBRequest", dbRequest)
+ utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+ utils.logAudit(dbRequest)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. prepareDBRequestError() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+ public void prepareCompletion (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside prepareCompletion() of UpdateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ String requestId = execution.getVariable("mso-request-id")
+ String source = execution.getVariable(Prefix + "source")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>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)
+ utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. prepareCompletion() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+
+ }
+
+
+
+
+ // **************************************************
+ // Post or Validate Response Section
+ // **************************************************
+
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse() of UpdateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+
+ if (execution.getVariable("CMSO_ResponseCode") == "200") {
+ execution.setVariable(Prefix + "Success", true)
+ utils.log("DEBUG", " ***** UpdateNetworkInstance Success ***** ", isDebugEnabled)
+ // Place holder for additional code.
+
+ } else {
+ execution.setVariable(Prefix + "Success", false)
+ utils.log("DEBUG", " ***** UpdateNetworkInstance Failed in CompletionMsoProces flow!. ***** ", isDebugEnabled)
+
+ }
+
+
+ } catch (Exception ex) {
+ String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+ }
+
+ }
+
+
+ // *******************************
+ // Build Error Section
+ // *******************************
+
+ public void processRollbackData (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside processRollbackData() of UpdateNetworkInstance ***** ", isDebugEnabled)
+
+ try {
+ //execution.getVariable("orchestrationStatus")
+ //execution.getVariable("networkId")
+ //execution.getVariable("networkName")
+ //networkOutputParams
+ //rollbackData
+ //rolledBack
+
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Bpmn error encountered in UpdateNetworkInstance flow. callDBCatalog() - " + ex.getMessage(), isDebugEnabled)
+ }
+
+ }
+
+ // Prepare for FalloutHandler
+ public void buildErrorResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+ 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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.logAudit(falloutHandlerRequest)
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ } catch (Exception ex) {
+ String errorException = " Bpmn error encountered in UpdateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
+ utils.log("DEBUG", errorException, isDebugEnabled)
+ falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+ utils.log("DEBUG", " Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+ }
+
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + Prefix, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ 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){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ 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)
+ }
+ utils.log("DEBUG", "Completed processJavaException Method in " + Prefix, isDebugEnabled)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy
index 77f4768c8c..5f0f65bd85 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfra.groovy
@@ -1,33 +1,37 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
*/
-
-package com.att.bpm.scripts;
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
import groovy.xml.XmlUtil
import groovy.json.*
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils;
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
import java.util.UUID;
@@ -186,11 +190,24 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
} catch (IOException ex) {
String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
- utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ utils.log("DEBUG", dataErrorMessage, , isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
execution.setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", updateNetworkJsonIncoming)
@@ -213,7 +230,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("UPDNETI_networkOutputs", networkOutputs)
utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
- String requestId = execution.getVariable("att-mso-request-id")
+ String requestId = execution.getVariable("mso-request-id")
if (requestId == null || requestId == "") {
requestId = execution.getVariable("requestId")
}
@@ -292,7 +309,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
try {
String serviceInstanceId = execution.getVariable("UPDNETI_serviceInstanceId")
- String requestId = execution.getVariable("att-mso-request-id")
+ String requestId = execution.getVariable("mso-request-id")
// RESTResponse (for API Handler (APIH) Reply Task)
String updateNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
@@ -381,18 +398,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("UPDNETI_queryIdAAIRequest", queryIdAAIRequest)
utils.log("DEBUG", " UPDNETI_queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryIdAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- APIResponse response = client.get()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryIdAAIRequest)
String returnCode = response.getStatusCode()
execution.setVariable("UPDNETI_aaiIdReturnCode", returnCode)
@@ -460,18 +466,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("UPDNETI_requeryIdAAIRequest", requeryIdAAIRequest)
utils.log("DEBUG", " UPDNETI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(requeryIdAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- APIResponse response = client.get()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, requeryIdAAIRequest)
String returnCode = response.getStatusCode()
execution.setVariable("UPDNETI_aaiRequeryIdReturnCode", returnCode)
utils.log("DEBUG", " ***** AAI ReQuery Response Code : " + returnCode, isDebugEnabled)
@@ -587,18 +582,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("UPDNETI_queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
utils.log("DEBUG", " UPDNETI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryVpnBindingAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- APIResponse response = client.get()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryVpnBindingAAIRequest)
String returnCode = response.getStatusCode()
execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", returnCode)
utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
@@ -735,18 +719,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("UPDNETI_queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
utils.log("DEBUG", " UPDNETI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryNetworkPolicyAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- APIResponse response = client.get()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkPolicyAAIRequest)
String returnCode = response.getStatusCode()
execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", returnCode)
utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
@@ -883,18 +856,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("UPDNETI_queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
utils.log("DEBUG", " UPDNETI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(queryNetworkTableRefAAIRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- APIResponse response = client.get()
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, queryNetworkTableRefAAIRequest)
String returnCode = response.getStatusCode()
execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", returnCode)
utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
@@ -1001,18 +963,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("UPDNETI_updateContrailAAIPayloadRequest", payloadXml)
utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled)
- String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
-
- RESTConfig config = new RESTConfig(updateContrailAAIUrlRequest);
- RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
- .addHeader("X-FromAppId", "MSO")
- .addHeader("Content-Type", "application/xml")
- .addHeader("Accept","application/xml");
- if (basicAuthCred != null && !"".equals(basicAuthCred)) {
- client.addAuthorizationHeader(basicAuthCred)
- }
-
- APIResponse response = client.httpPut(payload)
+ APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payload)
String returnCode = response.getStatusCode()
execution.setVariable("UPDNETI_aaiUpdateContrailReturnCode", returnCode)
@@ -1121,7 +1072,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id")
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "changeassign", "NetworkActivateRequest", cloudRegionId, networkId, null)
+ String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "changeassign", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
String sndcTopologyUpdateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
utils.logAudit(sndcTopologyUpdateRequesAsString)
@@ -1143,6 +1094,19 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("prefix", Prefix)
try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
utils.log("DEBUG", " ***** Inside prepareDBRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
String networkOutputs = execution.getVariable("UPDNETI_networkOutputs")
@@ -1170,7 +1134,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId>
<lastModifiedBy>BPMN</lastModifiedBy>
<statusMessage>${statusMessage}</statusMessage>
@@ -1202,6 +1166,19 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
execution.setVariable("prefix", Prefix)
try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+
+ try {
utils.log("DEBUG", " ***** Inside prepareDBRequestError of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
String statusMessage = ""
@@ -1239,7 +1216,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
<requestId>${requestId}</requestId>
<lastModifiedBy>BPMN</lastModifiedBy>
<statusMessage>${statusMessage}</statusMessage>
@@ -1257,7 +1234,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareDBRequestError() - " + ex.getMessage()
utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
}
@@ -1293,7 +1270,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
// prepare rollback data
String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
String rollbackNetwork =
- """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://com.att.mso/network">
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
${rollbackData}
</NetworkAdapter:rollbackNetwork>"""
String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
@@ -1394,9 +1371,9 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
String requestId = execution.getVariable("UPDNETI_requestId")
String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>UPDATE</action>
<source>${source}</source>
@@ -1454,7 +1431,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
String serviceInstanceId = utils.getNodeText1(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)
+ String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
execution.setVariable("UPDNETI_rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
utils.log("DEBUG", " Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" + sndcTopologyRollbackRequestAsString, isDebugEnabled)
@@ -1463,7 +1440,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
}
@@ -1577,15 +1554,15 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
String errorCode = String.valueOf(wfe.getErrorCode())
String errorMessage = wfe.getErrorMessage()
falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>UPDATE</action>
<source>${source}</source>
</request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
<aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
<aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
</aetgt:WorkflowException>
@@ -1599,15 +1576,15 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
String errorException = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. FalloutHandlerRequest, buildErrorResponse() - " + ex.getMessage()
utils.log("DEBUG", errorException, isDebugEnabled)
falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
- xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
<request-id>${requestId}</request-id>
<action>UPDATE</action>
<source>${source}</source>
</request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
<aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
<aetgt:ErrorCode>7000</aetgt:ErrorCode>
</aetgt:WorkflowException>
@@ -1627,7 +1604,7 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
try {
- String requestId = execution.getVariable("att-mso-request-id")
+ String requestId = execution.getVariable("mso-request-id")
// REST Error (for API Handler (APIH) Reply Task)
String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
@@ -1649,14 +1626,12 @@ public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
execution.setVariable("UnexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
- }catch(BpmnError b){
- utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
+ exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
+
}catch(Exception e){
utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ exceptionUtil.buildWorkflowException(execution, 500, "Exception in processJavaException method")
}
utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy
new file mode 100644
index 0000000000..d428cc33dd
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModule.groovy
@@ -0,0 +1,331 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.core.RollbackData
+
+
+public class UpdateVfModule extends AbstractServiceTaskProcessor {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void initProcessVariables(Execution 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ initProcessVariables(execution)
+ String request = validateRequest(execution)
+
+ utils.logAudit("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)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>UPDATE_VF_MODULE</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${progress}</progress>
+ <start-time>${startTime}</start-time>
+ <source>${source}</source>
+ </request-info>
+ ${vnfInputs}
+ </vnf-request>
+ """
+
+ synchResponse = utils.formatXml(synchResponse)
+ sendWorkflowResponse(execution, 200, synchResponse)
+
+ utils.logAudit("UpdateVfModule Synch Response: " + synchResponse)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepDoUpdateVfModule(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepUpdateInfraRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>
+ <vnf-id>${vnfId}</vnf-id>
+ <vf-module-id>${vfModuleId}</vf-module-id>
+ <tenant-id>${tenantId}</tenant-id>
+ <volume-group-id>${volumeGroupId}</volume-group-id>
+ </vnfOutputs>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfMod_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ utils.logAudit("UpdateVfModule Infra Request: " + updateInfraRequest)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = getVariable(execution, 'UPDVfMod_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ utils.logAudit("UpdateVfModule CompletionHandler Request: " + content)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution, String resultVar) {
+ def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+ 'execution=' + execution.getId() +
+ ', resultVar=' + resultVar +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInformation}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+ execution.setVariable(resultVar, content)
+
+ utils.logAudit("UpdateVfModule fallOutHandler Request: " + content)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
+ }
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
index 57c5269a68..d0949ae4d1 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.infrastructure.scripts
import groovy.json.JsonSlurper
import groovy.util.Node
@@ -26,22 +26,25 @@ import groovy.util.XmlParser;
import groovy.xml.QName
import java.io.Serializable;
-
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
-
import org.openecomp.mso.rest.APIResponse
import org.openecomp.mso.rest.RESTClient
import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
-
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
/**
* Initialize the flow's variables.
- *
+ *
* @param execution The flow's execution instance.
*/
public void initProcessVariables(Execution execution) {
@@ -58,11 +61,11 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
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(Execution execution) {
@@ -71,58 +74,58 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
')'
def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
logDebug('Entered ' + method, isDebugLogEnabled)
-
+
initProcessVariables(execution)
-
+
def prefix = "UPDVfModI_"
-
+
execution.setVariable("isVidRequest", "false")
-
+
def incomingRequest = execution.getVariable('bpmnRequest')
-
+
utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)
-
+
// check if request is xml or json
try {
def jsonSlurper = new JsonSlurper()
Map reqMap = jsonSlurper.parseText(incomingRequest)
utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
-
+
def serviceInstanceId = execution.getVariable('serviceInstanceId')
def vnfId = execution.getVariable('vnfId')
-
+
def vidUtils = new VidUtils(this)
-
+
String requestInXmlFormat = vidUtils.createXmlVfModuleRequest(execution, reqMap, 'UPDATE_VF_MODULE', serviceInstanceId)
-
+
utils.log("DEBUG", " Request in XML format: " + requestInXmlFormat, isDebugLogEnabled)
-
+
execution.setVariable(prefix + 'Request', requestInXmlFormat)
execution.setVariable(prefix+'vnfId', vnfId)
- execution.setVariable("isVidRequest", "true")
-
+ execution.setVariable("isVidRequest", "true")
+
}
catch(groovy.json.JsonException je) {
utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
- workflowException(execution, "Invalid request format", 400)
-
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Invalid request format")
+
}
catch(Exception e) {
- String restFaultMessage = e.getMessage()
+ String restFaultMessage = e.getMessage()
utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
- workflowException(execution, restFaultMessage, 400)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
-
+
try {
-
+
String request = validateInfraRequest(execution)
-
+
def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
execution.setVariable('UPDVfModI_requestInfo', requestInfo)
execution.setVariable('UPDVfModI_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
execution.setVariable('UPDVfModI_source', getNodeTextForce(requestInfo, 'source'))
-
+
def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
execution.setVariable('UPDVfModI_vnfInputs', vnfInputs)
execution.setVariable('UPDVfModI_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
@@ -138,13 +141,13 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
}
}
-
+
/**
* Prepare and send the sychronous response for this flow.
- *
+ *
* @param execution The flow's execution instance.
*/
public void sendSynchResponse(Execution execution) {
@@ -154,7 +157,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
logDebug('Entered ' + method, isDebugLogEnabled)
-
+
try {
def requestInfo = execution.getVariable('UPDVfModI_requestInfo')
def requestId = execution.getVariable('UPDVfModI_requestId')
@@ -166,12 +169,12 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
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)
logDebug('Exited ' + method, isDebugLogEnabled)
@@ -179,18 +182,18 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+ 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(Execution execution) {
@@ -201,19 +204,19 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
logDebug('Entered ' + method, isDebugLogEnabled)
try {
-
+
logDebug('Exited ' + method, isDebugLogEnabled)
} catch (BpmnError e) {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage())
+ 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(Execution execution) {
@@ -229,10 +232,10 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
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://com.att.mso/requestsdb">
+ xmlns:req="http://org.openecomp.mso/requestsdb">
<soapenv:Header/>
<soapenv:Body>
<req:updateInfraRequest>
@@ -260,13 +263,13 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage())
+ 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
*/
@@ -280,10 +283,10 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
try {
def requestInfo = getVariable(execution, 'UPDVfModI_requestInfo')
-
+
String content = """
- <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1">
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1">
${requestInfo}
<sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
</sdncadapterworkflow:MsoCompletionRequest>
@@ -298,13 +301,13 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 2000, 'Internal Error')
+ 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
*/
@@ -315,12 +318,12 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
')'
def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
logDebug('Entered ' + method, isDebugLogEnabled)
-
+
try {
def prefix = execution.getVariable('prefix')
def request = getVariable(execution, prefix+'Request')
def requestInformation = utils.getNodeXml(request, 'request-info', false)
-
+
def WorkflowException workflowException = execution.getVariable("WorkflowException")
def errorResponseCode = workflowException.getErrorCode()
def errorResponseMsg = workflowException.getErrorMessage()
@@ -330,15 +333,15 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
}
String content = """
- <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
- xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
- xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
${requestInformation}
<sdncadapterworkflow:WorkflowException>
<sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
<sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
- </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:WorkflowException>
</sdncadapterworkflow:FalloutHandlerRequest>
"""
content = utils.formatXml(content)
@@ -350,10 +353,10 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 2000, 'Internal Error')
+ 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
@@ -372,7 +375,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
def prefix = execution.getVariable("prefix")
if (prefix == null) {
- createWorkflowException(execution, 1002, processKey + " prefix is null")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
}
try {
@@ -380,34 +383,34 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
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) {
- createWorkflowException(execution, 1002, processKey + " request is null")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
}
-
+
/*
- def requestId = execution.getVariable("att-mso-request-id")
-
+ def requestId = execution.getVariable("mso-request-id")
+
if (requestId == null) {
- createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
}
-
+
setVariable(execution, prefix + 'requestId', requestId)
- def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+ def serviceInstanceId = execution.getVariable("mso-service-instance-id")
if (serviceInstanceId == null) {
- createWorkflowException(execution, 1002, processKey + " request message has no att-mso-service-instance-id")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
}
utils.logContext(requestId, serviceInstanceId)
@@ -419,8 +422,8 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logError('Caught exception in ' + method, e)
- createWorkflowException(execution, 1002, "Invalid Message")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
}
}
-
+
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
new file mode 100644
index 0000000000..6d532527d0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
@@ -0,0 +1,443 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.springframework.web.util.UriUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+
+class UpdateVfModuleVolume extends VfModuleBase {
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ private void initProcessVariables(Execution 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume request: " + request)
+ } catch (BpmnError bpmnError) {
+ throw bpmnError
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>UPDATE_VF_MODULE_VOL</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${progress}</progress>
+ <start-time>${startTime}</start-time>
+ <source>${source}</source>
+ </request-info>
+ ${volumeInputs}
+ </volume-request>
+ """
+
+ synchResponse = utils.formatXml(synchResponse)
+ sendWorkflowResponse(execution, 200, synchResponse)
+ utils.logAudit("UpdateVfModuleVolume Synch Response: " + synchResponse)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.queryAAIForVolumeGroup(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+ def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+ def endPoint = execution.getVariable('URN_aai_endpoint') +
+ '/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/' + UriUtils.encode(aicCloudRegion, "UTF-8") +
+ '/volume-groups/volume-group/' + UriUtils.encode(volumeGroupId, "UTF-8")
+
+ logDebug('Sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+ utils.logAudit("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()
+ logDebug('Response code:' + statusCode, isDebugLogEnabled)
+ logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+ utils.logAudit("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)
+ logDebug('Received Tenant Id \'' + volumeGroupTenantId + '\' from AAI for Volume Group with Volume Group Id \'' + volumeGroupId + '\''
+ + '\', AIC Cloud Region \'' + aicCloudRegion + '\'', isDebugLogEnabled)
+ } 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)
+ }
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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 = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <updateVolumeGroupRequest>
+ <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion></vnfVersion>
+ <vfModuleType></vfModuleType>
+ <volumeGroupParams>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+
+ utils.logAudit("UpdateVfModuleVolume Request for VNFAdapter Rest: " + vnfAdapterRestRequest)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepDbInfraDbRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestId = execution.getVariable('UPDVfMod_requestId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+ utils.logAudit("UpdateVfModuleVolume Request for Updating DB for Infra: " + updateInfraRequest)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildWorkflowException(execution, 1002, 'Error in prepDbInfraDbRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Build a "CompletionHandler" request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepCompletionHandlerRequest(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepCompletionHandlerRequest(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ try {
+ def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+
+ String content = """
+ <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+ </sdncadapterworkflow:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug('Request for Completion Handler:\n' + content, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume Completion Handler request: " + content)
+ execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepCompletionHandlerRequest(): ' + e.getMessage())
+ }
+ }
+
+ /**
+ * Build a "FalloutHandler" request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepFalloutHandler(Execution execution) {
+ def method = getClass().getSimpleName() + '.prepFalloutHandler(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ logDebug('Request for Fallout Handler:\n' + content, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume Fallout request: " + content)
+ execution.setVariable('UPDVfModVol_FalloutHandlerRequest', content)
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, 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(Execution execution) {
+ def method = getClass().getSimpleName() + '.handleTenantIdMismatch(' +
+ 'execution=' + execution.getId() +
+ ')'
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ 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 + '\''
+
+ logError('Error in UpdateVfModuleVol: ' + errorMessage)
+
+ WorkflowException exception = new WorkflowException(processKey, 5000, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+
+ logDebug('Exited ' + method, isDebugLogEnabled)
+ utils.logAudit("UpdateVfModuleVolume workflowException in Tenant Mismatch: " + errorMessage)
+ }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
index b048df5f6b..ffe122aed6 100644
--- a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
@@ -1,530 +1,549 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.bpm.scripts
-
-import groovy.json.JsonSlurper
-import java.util.concurrent.ExecutionException;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-import org.springframework.web.util.UriUtils
-
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
-class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
-
- /**
- * Initialize the flow's variables.
- *
- * @param execution The flow's execution instance.
- */
- private void initProcessVariables(Execution 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 (Execution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- preProcessRequest(execution, isDebugEnabled)
- }
-
- public void preProcessRequest(Execution 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.modelInvariantId ?: ''
- execution.setVariable('UPDVfModVol_modelInvariantId', modelInvariantId)
-
- utils.log("DEBUG", "XML request:\n" + request, isDebugLogEnabled)
- }
- catch(groovy.json.JsonException je) {
- utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
- // assume request is in XML format - proceed as usual to process XML request
- }
-
- def requestId = execution.getVariable('att-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', 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)
- }
-
- /**
- * Prepare and send the synchronous response.
- *
- * @param execution The flow's execution instance.
- */
- public void sendSynchResponse(Execution 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://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-info>
- <request-id>${requestId}</request-id>
- <action>UPDATE_VF_MODULE_VOL</action>
- <request-status>IN_PROGRESS</request-status>
- <progress>${progress}</progress>
- <start-time>${startTime}</start-time>
- <source>${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)
- }
-
- logDebug('Sync response: ' + syncResponse, isDebugLogEnabled)
- 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(Execution 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")
-
- utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
- logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
-
- APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
-
- String returnCode = response.getStatusCode()
- String aaiResponseAsString = response.getResponseBodyAsString()
- aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
-
- utils.logAudit("AAI query volume group by id return code: " + returnCode)
- utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
-
- logDebug("AAI Volume Group return code: " + returnCode, isDebugLogEnabled)
- logDebug("AAI Volume Group response: " + aaiResponseAsString, isDebugLogEnabled)
-
- 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)
- logDebug("Received Tenant Id " + volumeGroupTenantId + " from AAI for Volume Group with Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion, isDebugLogEnabled)
-
- def relatedVfModuleLink = getRelatedVfModuleRelatedLink(aaiResponseAsString)
- logDebug("Related VF Module link: " + relatedVfModuleLink, isDebugLogEnabled)
- 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(Execution 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")
-
- utils.logAudit("AAI query generic vnf request: " + queryAAIRequest)
-
- APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
-
- String returnCode = response.getStatusCode()
- String aaiResponseAsString = response.getResponseBodyAsString()
- aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
-
- utils.logAudit("AAI query generic vnf return code: " + returnCode)
- utils.logAudit("AAI query generic vnf response: " + aaiResponseAsString)
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- if (returnCode=='200') {
- utils.log("DEBUG", 'Generic vnf ' + vnfId + ' found in AAI.', isDebugEnabled)
- execution.setVariable('UPDVfModVol_AAIQueryGenericVfnResponse', aaiResponseAsString)
- } else {
- if (returnCode=='404') {
- def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
- utils.log("DEBUG", message, isDebugEnabled)
- 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(Execution execution, isDebugLogEnabled) {
-
- AaiUtil aaiUtil = new AaiUtil(this)
- String queryAAIVfModuleRequest = execution.getVariable('UPDVfModVol_relatedVfModuleLink')
- execution.setVariable('UPDVfModVol_personaModelId', '')
-
- utils.logAudit('Query AAI VF Module: ' + queryAAIVfModuleRequest)
- logDebug('Query AAI VF Module: ' + queryAAIVfModuleRequest, isDebugLogEnabled)
-
- APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVfModuleRequest)
-
- String returnCode = response.getStatusCode()
- String aaiResponseAsString = response.getResponseBodyAsString()
- aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
-
- utils.logAudit("AAI query vf-module: " + returnCode)
- utils.logAudit("AAI query vf-module response: " + aaiResponseAsString)
-
- logDebug("AAI query vf-module:: " + returnCode, isDebugLogEnabled)
- logDebug("AAI query vf-module response: " + aaiResponseAsString, isDebugLogEnabled)
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- if ((returnCode == '200') || (returnCode == '204')) {
- def personaModelId = utils.getNodeText1(aaiResponseAsString, 'persona-model-id')
- 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(Execution 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 vnfType = execution.getVariable('UPDVfModVol_vnfType')
- def vnfVersion = execution.getVariable('UPDVfModVol_vnfVersion')
-
- def aaiGenericVnfResponse = execution.getVariable('UPDVfModVol_AAIQueryGenericVfnResponse')
- def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
- def vnfName = utils.getNodeText1(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('att-mso-request-id') + '-' + System.currentTimeMillis()
- def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
- def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
- if ('true'.equals(useQualifiedHostName)) {
- notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
- }
-
- String vnfAdapterRestRequest = """
- <updateVolumeGroupRequest>
- <cloudSiteId>${aicCloudRegion}</cloudSiteId>
- <tenantId>${tenantId}</tenantId>
- <vnfId>${vnfId}</vnfId>
- <vnfName>${vnfName}</vnfName>
- <volumeGroupId>${volumeGroupId}</volumeGroupId>
- <volumeGroupName>${volumeGroupName}</volumeGroupName>
- <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
- <vnfType>${vnfType}</vnfType>
- <vnfVersion>${vnfVersion}</vnfVersion>
- <vfModuleType></vfModuleType>
- <volumeGroupParams>
- <entry>
- <key>vnf_id</key>
- <value>${vnfId}</value>
- </entry>
- <entry>
- <key>vnf_name</key>
- <value>${vnfName}</value>
- </entry>
- <entry>
- <key>vf_module_id</key>
- <value>${volumeGroupId}</value>
- </entry>
- <entry>
- <key>vf_module_name</key>
- <value>${volumeGroupName}</value>
- </entry>
- ${volumeGroupParams}
- </volumeGroupParams>
- <skipAAI>true</skipAAI>
- <msoRequest>
- <requestId>${requestId}</requestId>
- <serviceInstanceId>${serviceId}</serviceInstanceId>
- </msoRequest>
- <messageId>${messageId}</messageId>
- <notificationUrl>${notificationUrl}</notificationUrl>
- </updateVolumeGroupRequest>
- """
- vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
- execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
- logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
- }
-
- /**
- * Prepare a Request for updating the DB for this Infra request.
- *
- * @param execution The flow's execution instance.
- */
- public void prepDbInfraDbRequest(Execution execution, isDebugLogEnabled) {
-
- def requestId = execution.getVariable('UPDVfModVol_requestId')
-
- String updateInfraRequest = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:req="http://com.att.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>${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)
- logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
- }
-
- /**
- * Build a "CompletionHandler" request.
- * @param execution The flow's execution instance.
- */
- public void prepCompletionHandlerRequest(Execution execution, requestId, action, source, isDebugLogEnabled) {
-
- String content = """
- <aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
- <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <aetgt:mso-bpel-name>BPMN VF Module Volume action: UPDATE</aetgt:mso-bpel-name>
- </aetgt:MsoCompletionRequest>
- """
-
- content = utils.formatXml(content)
- logDebug('Request for Completion Handler:\n' + content, isDebugLogEnabled)
- execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
- }
-
-
- /**
- * Build a "FalloutHandler" request.
- * @param execution The flow's execution instance.
- */
- public void prepFalloutHandler(Execution execution, isDebugLogEnabled) {
-
- 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.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
- }
-
- String content = """
- <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
- xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
- xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
- xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
- ${requestInfo}
- <sdncadapterworkflow:WorkflowException>
- <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
- <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
- </sdncadapterworkflow:WorkflowException>
- </sdncadapterworkflow:FalloutHandlerRequest>
- """
- content = utils.formatXml(content)
- logDebug('Request for Fallout Handler:\n' + content, isDebugLogEnabled)
- 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(Execution 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()
- logError('Error in UpdateVfModuleVol: ' + errorMessage)
- 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(Execution 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()
- logError('Error in UpdateVfModuleVol: ' + errorMessage)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import groovy.json.JsonSlurper
+
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.springframework.web.util.UriUtils
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
+import org.openecomp.mso.bpmn.common.scripts.VfModuleBase;
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
+
+ /**
+ * Initialize the flow's variables.
+ *
+ * @param execution The flow's execution instance.
+ */
+ private void initProcessVariables(Execution 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 (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ preProcessRequest(execution, isDebugEnabled)
+ }
+
+ public void preProcessRequest(Execution 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.modelInvariantId ?: ''
+ execution.setVariable('UPDVfModVol_modelInvariantId', modelInvariantId)
+
+ utils.log("DEBUG", "XML request:\n" + request, isDebugLogEnabled)
+ }
+ catch(groovy.json.JsonException je) {
+ utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+ // 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.getNodeText1(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'))
+
+ try {
+ // Catalog DB headers Authorization
+ String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")
+ utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
+
+ def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))
+ execution.setVariable("BasicAuthHeaderValueDB",encodedString)
+ } catch (IOException ex) {
+ String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
+ utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+ }
+ 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(Execution 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.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>${requestId}</request-id>
+ <action>UPDATE_VF_MODULE_VOL</action>
+ <request-status>IN_PROGRESS</request-status>
+ <progress>${progress}</progress>
+ <start-time>${startTime}</start-time>
+ <source>${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)
+ }
+
+ logDebug('Sync response: ' + syncResponse, isDebugLogEnabled)
+ 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(Execution 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")
+
+ utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+ logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query volume group by id return code: " + returnCode)
+ utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
+
+ logDebug("AAI Volume Group return code: " + returnCode, isDebugLogEnabled)
+ logDebug("AAI Volume Group response: " + aaiResponseAsString, isDebugLogEnabled)
+
+ 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)
+ logDebug("Received Tenant Id " + volumeGroupTenantId + " from AAI for Volume Group with Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion, isDebugLogEnabled)
+
+ def relatedVfModuleLink = getRelatedVfModuleRelatedLink(aaiResponseAsString)
+ logDebug("Related VF Module link: " + relatedVfModuleLink, isDebugLogEnabled)
+ 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(Execution 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")
+
+ utils.logAudit("AAI query generic vnf request: " + queryAAIRequest)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query generic vnf return code: " + returnCode)
+ utils.logAudit("AAI query generic vnf response: " + aaiResponseAsString)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if (returnCode=='200') {
+ utils.log("DEBUG", 'Generic vnf ' + vnfId + ' found in AAI.', isDebugEnabled)
+ execution.setVariable('UPDVfModVol_AAIQueryGenericVfnResponse', aaiResponseAsString)
+ } else {
+ if (returnCode=='404') {
+ def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
+ utils.log("DEBUG", message, isDebugEnabled)
+ 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(Execution execution, isDebugLogEnabled) {
+
+ AaiUtil aaiUtil = new AaiUtil(this)
+ String queryAAIVfModuleRequest = execution.getVariable('UPDVfModVol_relatedVfModuleLink')
+ execution.setVariable('UPDVfModVol_personaModelId', '')
+
+ utils.logAudit('Query AAI VF Module: ' + queryAAIVfModuleRequest)
+ logDebug('Query AAI VF Module: ' + queryAAIVfModuleRequest, isDebugLogEnabled)
+
+ APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVfModuleRequest)
+
+ String returnCode = response.getStatusCode()
+ String aaiResponseAsString = response.getResponseBodyAsString()
+ aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+ utils.logAudit("AAI query vf-module: " + returnCode)
+ utils.logAudit("AAI query vf-module response: " + aaiResponseAsString)
+
+ logDebug("AAI query vf-module:: " + returnCode, isDebugLogEnabled)
+ logDebug("AAI query vf-module response: " + aaiResponseAsString, isDebugLogEnabled)
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ if ((returnCode == '200') || (returnCode == '204')) {
+ def personaModelId = utils.getNodeText1(aaiResponseAsString, 'persona-model-id')
+ 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(Execution 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-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.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
+ def vnfName = utils.getNodeText1(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 = execution.getVariable("URN_mso_use_qualified_host")
+ if ('true'.equals(useQualifiedHostName)) {
+ notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+ }
+
+ String vnfAdapterRestRequest = """
+ <updateVolumeGroupRequest>
+ <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+ <tenantId>${tenantId}</tenantId>
+ <vnfId>${vnfId}</vnfId>
+ <vnfName>${vnfName}</vnfName>
+ <volumeGroupId>${volumeGroupId}</volumeGroupId>
+ <volumeGroupName>${volumeGroupName}</volumeGroupName>
+ <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+ <vnfType>${vnfType}</vnfType>
+ <vnfVersion>${vnfVersion}</vnfVersion>
+ <vfModuleType></vfModuleType>
+ <modelCustomizationUuid>${modelCustomizationId}</modelCustomizationUuid>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>${vnfId}</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>${vnfName}</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>${volumeGroupId}</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>${volumeGroupName}</value>
+ </entry>
+ ${volumeGroupParams}
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>${requestId}</requestId>
+ <serviceInstanceId>${serviceId}</serviceInstanceId>
+ </msoRequest>
+ <messageId>${messageId}</messageId>
+ <notificationUrl>${notificationUrl}</notificationUrl>
+ </updateVolumeGroupRequest>
+ """
+ vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+ execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+ logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+ }
+
+ /**
+ * Prepare a Request for updating the DB for this Infra request.
+ *
+ * @param execution The flow's execution instance.
+ */
+ public void prepDbInfraDbRequest(Execution execution, isDebugLogEnabled) {
+
+ def requestId = execution.getVariable('UPDVfModVol_requestId')
+
+ String updateInfraRequest = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+
+ updateInfraRequest = utils.formatXml(updateInfraRequest)
+ execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+ logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+ }
+
+ /**
+ * Build a "CompletionHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepCompletionHandlerRequest(Execution execution, requestId, action, source, isDebugLogEnabled) {
+
+ String content = """
+ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: UPDATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>
+ """
+
+ content = utils.formatXml(content)
+ logDebug('Request for Completion Handler:\n' + content, isDebugLogEnabled)
+ execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+ }
+
+
+ /**
+ * Build a "FalloutHandler" request.
+ * @param execution The flow's execution instance.
+ */
+ public void prepFalloutHandler(Execution execution, isDebugLogEnabled) {
+
+ 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.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ }
+
+ String content = """
+ <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
+ xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
+ xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
+ ${requestInfo}
+ <sdncadapterworkflow:WorkflowException>
+ <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+ <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+ </sdncadapterworkflow:WorkflowException>
+ </sdncadapterworkflow:FalloutHandlerRequest>
+ """
+ content = utils.formatXml(content)
+ logDebug('Request for Fallout Handler:\n' + content, isDebugLogEnabled)
+ 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(Execution 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()
+ logError('Error in UpdateVfModuleVol: ' + errorMessage)
+ 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(Execution 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()
+ logError('Error in UpdateVfModuleVol: ' + errorMessage)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java
index 4dadd8c127..07ec8ff5dc 100644
--- a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java
@@ -1,58 +1,58 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.bpmn.gamma;
-
-import java.util.List;
-
-import org.camunda.bpm.application.PostDeploy;
-import org.camunda.bpm.application.PreUndeploy;
-import org.camunda.bpm.application.ProcessApplication;
-import org.camunda.bpm.application.ProcessApplicationInfo;
-import org.camunda.bpm.application.impl.ServletProcessApplication;
-import org.camunda.bpm.engine.ProcessEngine;
-
-import org.openecomp.mso.logger.MsoLogger;
-
-/**
- * @since Version 1.0
- *
- */
-@ProcessApplication("MSO Gamma Application")
-public class MSOGammaApplication extends ServletProcessApplication {
-
- private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
-
- @PostDeploy
- public void postDeploy(ProcessEngine processEngineInstance) {
- long startTime = System.currentTimeMillis();
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Post deployment complete...");
- }
-
- @PreUndeploy
- public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo, List<ProcessEngine> processEngines) {
- long startTime = System.currentTimeMillis();
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Pre Undeploy complete...");
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import java.util.List;
+
+import org.camunda.bpm.application.PostDeploy;
+import org.camunda.bpm.application.PreUndeploy;
+import org.camunda.bpm.application.ProcessApplication;
+import org.camunda.bpm.application.ProcessApplicationInfo;
+import org.camunda.bpm.application.impl.ServletProcessApplication;
+import org.camunda.bpm.engine.ProcessEngine;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * @since Version 1.0
+ *
+ */
+@ProcessApplication("MSO Infrastructure Application")
+public class MSOInfrastructureApplication extends ServletProcessApplication {
+
+ private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ @PostDeploy
+ public void postDeploy(ProcessEngine processEngineInstance) {
+ long startTime = System.currentTimeMillis();
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Post deployment complete...");
+ }
+
+ @PreUndeploy
+ public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo, List<ProcessEngine> processEngines) {
+ long startTime = System.currentTimeMillis();
+
+ msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Pre Undeploy complete...");
+
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
new file mode 100644
index 0000000000..09454f0876
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;
+
+import javax.ws.rs.Path;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
+
+
+/**
+ *
+ * @version 1.0
+ * Asynchronous Workflow processing using JAX RS RESTeasy implementation
+ * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background
+ * and the server thread is freed up, server scales better to process more incoming requests
+ *
+ * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response
+ * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process
+ */
+@Path("/async")
+public class WorkflowAsyncInfrastructureResource extends WorkflowAsyncResource {
+
+ protected ProcessEngineServices getProcessEngineServices() {
+ if (pes4junit == null) {
+ return ProcessEngines.getProcessEngine("infrastructure");
+ } else {
+ return pes4junit;
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
new file mode 100644
index 0000000000..84a9bae051
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowMessageResource;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
+
+/**
+ * @version 1.0
+ * RESTeasy workflow application which wires synchronous and asynchronous response
+ *
+ */
+@ApplicationPath("/")
+public class WorkflowResourceApplication extends Application {
+ private Set<Object> singletons = new HashSet<Object>();
+ private Set<Class<?>> classes = new HashSet<Class<?>>();
+
+ public WorkflowResourceApplication() {
+ singletons.add(new WorkflowResource());
+ singletons.add(new WorkflowAsyncInfrastructureResource());
+ singletons.add(new WorkflowMessageResource());
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return classes;
+ }
+
+ @Override
+ public Set<Object> getSingletons() {
+ return singletons;
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..8e87f47ddc
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.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=========================================================
+ -->
+
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+
+ <persistence-unit name="infrastructure">
+ <jta-data-source>java:jboss/datasources/ProcessEngine</jta-data-source>
+ <properties>
+ <!-- Properties for Hibernate -->
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.show_sql" value="true" />
+ </properties>
+ </persistence-unit>
+
+</persistence>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml
new file mode 100644
index 0000000000..4053de8e28
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/processes.xml
@@ -0,0 +1,81 @@
+<?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-engine name="infrastructure">
+ <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
+ <datasource>java:jboss/datasources/ProcessEngine</datasource>
+ <properties>
+ <property name="history">full</property>
+ <property name="databaseSchemaUpdate">true</property>
+ <property name="authorizationEnabled">true</property>
+ <property name="jobExecutorDeploymentAware">true</property>
+ <property name="jobExecutorActivate">true</property>
+ </properties>
+ <plugins>
+
+ <!-- plugin enabling Process Application event listener support -->
+ <plugin>
+ <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
+ </plugin>
+
+ <!-- plugin enabling integration of camunda Spin -->
+ <plugin>
+ <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
+ </plugin>
+
+ <!-- plugin enabling connect support -->
+ <plugin>
+ <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
+ </plugin>
+
+ <plugin>
+ <class>org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin</class>
+ </plugin>
+
+ <!-- Needed until all subflows generate MSOWorkflowException events -->
+ <plugin>
+ <class>org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin</class>
+ </plugin>
+
+ <!-- Optional Plugin for Camunda BPM Workbench -->
+ <!-- <plugin>
+ <class>org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap</class>
+ <properties>
+ <property name="httpPort">8088</property>
+ </properties>
+ </plugin> -->
+ </plugins>
+ </process-engine>
+
+
+ <process-archive name="MSOInfrastructureBPMN">
+ <process-engine>infrastructure</process-engine>
+ <properties>
+ <property name="isDeleteUponUndeploy">false</property>
+ <property name="isScanForProcessDefinitions">true</property>
+ </properties>
+ </process-archive>
+
+</process-application>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml b/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7c9e0282d4
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/logback.xml
@@ -0,0 +1,159 @@
+<!--
+ ============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=========================================================
+ -->
+
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+ <!--<jmxConfigurator /> -->
+ <!-- directory path for all other type logs -->
+ <property name="logDir" value="/var/log/ecomp" />
+
+ <!-- directory path for debugging type logs -->
+ <property name="debugDir" value="/var/log/ecomp" />
+
+ <!-- specify the component name
+ <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <property name="componentName" value="MSO"></property>
+ <property name="subComponentName" value="BPMN"></property>
+ <!-- log file names -->
+ <property name="errorLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+
+ <property name="errorPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
+ <property name="debugPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{RequestId}|%msg%n" />
+
+ <property name="auditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" />
+ <property name="metricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|||||%msg%n" />
+ <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF Appenders -->
+ <!-- ============================================================================ -->
+
+ <!-- The EELFAppender is used to record events to the general application
+ log -->
+
+ <!-- EELF Audit Appender. This appender is used to record audit engine
+ related logging events. The audit logger and appender are specializations
+ of the EELF application root logger and appender. This can be used to segregate
+ Policy engine events from other components, or it can be eliminated to record
+ these events as part of the application root log. -->
+
+ <appender name="EELFAudit"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${auditLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <encoder>
+ <pattern>${auditPattern}</pattern>
+ </encoder>
+ </appender>
+ <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFAudit" />
+ </appender>
+
+ <appender name="EELFMetrics"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${metricsLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${metricsLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <encoder>
+ <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
+ %msg%n"</pattern> -->
+ <pattern>${metricPattern}</pattern>
+ </encoder>
+ </appender>
+
+
+ <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFMetrics"/>
+ </appender>
+
+ <appender name="EELFError"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${errorLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${errorLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <encoder>
+ <pattern>${errorPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFError"/>
+ </appender>
+
+ <appender name="EELFDebug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${debugLogDirectory}/${debugLogName}${jboss.server.name}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${debugLogDirectory}/${debugLogName}${jboss.server.name}.log.%d</fileNamePattern>
+ <!--<maxHistory>30</maxHistory>-->
+ </rollingPolicy>
+ <encoder>
+ <pattern>${debugPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFDebug" />
+ <includeCallerData>true</includeCallerData>
+ </appender>
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF loggers -->
+ <!-- ============================================================================ -->
+
+ <logger name="com.att.eelf.audit" level="info" additivity="false">
+ <appender-ref ref="asyncEELFAudit" />
+ </logger>
+
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="asyncEELFMetrics" />
+ </logger>
+
+ <logger name="com.att.eelf.error" level="debug" additivity="false">
+ <appender-ref ref="asyncEELFError" />
+ </logger>
+ <root level="INFO">
+ <appender-ref ref="asyncEELFDebug" />
+ </root>
+
+</configuration>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn
new file mode 100644
index 0000000000..7b9b8212e5
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericMacroServiceNetworkVnf.bpmn
@@ -0,0 +1,1203 @@
+<?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="CreateGenericMacroServiceNetworkVnf" name="CreateGenericMacroServiceNetworkVnf" 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.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:startEvent id="createVIPR_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVIPR_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.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vIPR-ATM">
+ <bpmn2:outgoing>SequenceFlow_10o22u2</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vIPR-ATM" />
+ </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.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.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="CREVAS_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("CreateGenericMacroServiceNetworkVnfSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="CreateVIPR_EndEvent" />
+ <bpmn2:endEvent id="CreateVIPR_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.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.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="doCreateNetworkInstance_CallActivity" name="DoCreate&#10;Network&#10;Instance" calledElement="DoCreateNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <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:in source="failIfExists" target="failIfExists" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rollbackData" target="DCRENI_rollbackData" />
+ <camunda:out source="rolledBack" target="DCRENI_rolledBack" />
+ <camunda:out source="networkId" target="networkId" />
+ <camunda:out source="networkName" target="networkName" />
+ <camunda:out source="networkOutputParams" target="networkOutputParams" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1bwbn7r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12ag2bk</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_PrepareNetworkCreate" name="Prepare for Network Create" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cmebdc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dfkfh1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1bwbn7r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.prepareNetworkCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="doCreateServiceInstance_CallActivity" name="DoCreate&#10;ServiceInstance&#10;" calledElement="DoCreateServiceInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in sourceExpression="vIPR-ATM" 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="DCRESI_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" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0j6sjye</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ky2sv9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="doCreateVNFandModules_CallActivity" 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="DCVM_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" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1h77psn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qi5uxg</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Prepare to Create VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bvecvm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1h77psn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.prepareVnfAndModulesCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_4" name="GoToFinishProcess">
+ <bpmn2:incoming>SequenceFlow_0xowenu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_41" name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoTovIPR-ATM">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="vIPR-ATM" />
+ </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_00rt5qa" name="is VNF Ok?" default="SequenceFlow_05lo85t">
+ <bpmn2:incoming>SequenceFlow_0sdb3on</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05lo85t</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0xtr1g5</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvn1pz" name="Network Rollback present?" default="SequenceFlow_19mxskt">
+ <bpmn2:incoming>SequenceFlow_05lo85t</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_09xerwk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19mxskt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0tmepzk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVAS_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:inclusiveGateway id="InclusiveGateway_1pqjttt">
+ <bpmn2:incoming>SequenceFlow_19mxskt</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1brxd2r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_08s0ew2</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.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_05lo85t" name="No" sourceRef="ExclusiveGateway_00rt5qa" targetRef="ExclusiveGateway_1kvn1pz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xtr1g5" name="Yes" sourceRef="ExclusiveGateway_00rt5qa" targetRef="DoRollbackVNFandModules_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVM_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19mxskt" name="No" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="InclusiveGateway_1pqjttt" />
+ <bpmn2:callActivity id="DoRollbackVNFandModules_CallActivity" name="DoRollback&#10;VNF and Modules&#10;" calledElement="DoCreateVnfAndModules">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCVAM_rollbackData" target="rollbackData" />
+ <camunda:out source="rollbackSuccessful" target="DCVAM_rollbackSuccessful" />
+ <camunda:out source="rollbackError" target="DCVAM_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0xtr1g5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_09xerwk</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_09xerwk" sourceRef="DoRollbackVNFandModules_CallActivity" targetRef="ExclusiveGateway_1kvn1pz" />
+ <bpmn2:callActivity id="DoRollbackNetwork_CallActivity" name="DoRollback&#10;Network" calledElement="DoCreateNetworkInstanceRollback">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="DCRENI_rollbackData" target="rollbackData" />
+ <camunda:out source="rollbackSuccessful" target="DCRENI_rollbackSuccessful" />
+ <camunda:out source="rollbackError" target="DCRENI_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0136s37</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1fqmrda</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1dmsx0d</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09o09bu" name="Network rolled back OK?" default="SequenceFlow_0g7scsg">
+ <bpmn2:incoming>SequenceFlow_1ieiew4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1os9x7w</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0g7scsg</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <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="rollbackSuccessful" target="DCRESI_rollbackSuccessful" />
+ <camunda:out source="rollbackError" target="DCRESI_rollbackError" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1os9x7w</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_1os9x7w" name="Yes" sourceRef="ExclusiveGateway_09o09bu" targetRef="DoRollbackService_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRENI_rollbackSuccessful") == null || execution.getVariable("DCRENI_rollbackSuccessful") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f1hd3l" sourceRef="DoRollbackService_CallActivity" targetRef="InclusiveGateway_0m9f5ka" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0g7scsg" name="No" sourceRef="ExclusiveGateway_09o09bu" 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:scriptTask id="ScriptTask_184teky" name="Validate Network Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1dmsx0d</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1otyild</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.validateNetworkRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1c386z9" name="Rollback Additional Networks?" default="SequenceFlow_12u8ufr">
+ <bpmn2:incoming>SequenceFlow_1otyild</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0136s37</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_12u8ufr</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dmsx0d" sourceRef="DoRollbackNetwork_CallActivity" targetRef="ScriptTask_184teky" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1otyild" sourceRef="ScriptTask_184teky" targetRef="ExclusiveGateway_1c386z9" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0136s37" name="Yes" sourceRef="ExclusiveGateway_1c386z9" targetRef="DoRollbackNetwork_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_NetworksCreatedCount") > 0 }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_12u8ufr" name="No" sourceRef="ExclusiveGateway_1c386z9" targetRef="ExclusiveGateway_05indeh" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1bts0nw" name="VNF rolled back OK?" default="SequenceFlow_1brxd2r">
+ <bpmn2:incoming>SequenceFlow_0tmepzk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1fqmrda</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1brxd2r</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tmepzk" name="Yes" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="ExclusiveGateway_1bts0nw">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRENI_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1fqmrda" name="Yes" sourceRef="ExclusiveGateway_1bts0nw" targetRef="DoRollbackNetwork_CallActivity">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCVAM_rollbackSuccessful") == null || execution.getVariable("DCVAM_rollbackSuccessful") == true }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1brxd2r" name="No" sourceRef="ExclusiveGateway_1bts0nw" targetRef="InclusiveGateway_1pqjttt" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_05indeh" name="Service Rollback present?" default="SequenceFlow_0sezboq">
+ <bpmn2:incoming>SequenceFlow_12u8ufr</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_08s0ew2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1ieiew4</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0sezboq</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_08s0ew2" sourceRef="InclusiveGateway_1pqjttt" targetRef="ExclusiveGateway_05indeh" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ieiew4" name="Yes" sourceRef="ExclusiveGateway_05indeh" targetRef="ExclusiveGateway_09o09bu">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRESI_rollbackData") != null }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <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_0g7scsg</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0sezboq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0f4u373</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:scriptTask id="ScriptTask_17doerz" name="Pre Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_02o4yqx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0sdb3on</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.preProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_0wyub4x" name="Post Process Rollback" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0f4u373</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1rabks0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.postProcessRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0sdb3on" sourceRef="ScriptTask_17doerz" targetRef="ExclusiveGateway_00rt5qa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0f4u373" sourceRef="InclusiveGateway_0m9f5ka" targetRef="ScriptTask_0wyub4x" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1rabks0" sourceRef="ScriptTask_0wyub4x" targetRef="InclusiveGateway_0foywso" />
+ </bpmn2:subProcess>
+ <bpmn2:scriptTask id="callDbCatalog_scriptTask" name="Get Models Info&#10; for Service (DB Catalog)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1vwssu7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19etqmx</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.callDBCatalog(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="prepareCreateService_scriptTask" name="Prepare&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10o22u2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0j6sjye</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.prepareCreateServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10o22u2" sourceRef="IntermediateCatchEvent_3" targetRef="prepareCreateService_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:sequenceFlow id="SequenceFlow_1bwbn7r" sourceRef="ScriptTask_PrepareNetworkCreate" targetRef="doCreateNetworkInstance_CallActivity" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1n7r495" name="No" sourceRef="ExclusiveGateway_0fe690i" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1h77psn" sourceRef="ScriptTask_3" targetRef="doCreateVNFandModules_CallActivity" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1nh09nr" name="StartNetworks">
+ <bpmn2:outgoing>SequenceFlow_1vwssu7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartNetworks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo StartNetworks">
+ <bpmn2:incoming>SequenceFlow_13uceka</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartNetworks" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0b9wd4f" name="Create Network(s)?" default="SequenceFlow_1f26zbk">
+ <bpmn2:incoming>SequenceFlow_19etqmx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cmebdc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1f26zbk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0fe690i" name="Create Additional Networks?" default="SequenceFlow_1n7r495">
+ <bpmn2:incoming>SequenceFlow_04vlq8r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n7r495</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dfkfh1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dfkfh1" name="Yes" sourceRef="ExclusiveGateway_0fe690i" targetRef="ScriptTask_PrepareNetworkCreate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_NetworksCreatedCount") < execution.getVariable("CREVAS_NetworksCount")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cmebdc" name="Yes" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ScriptTask_PrepareNetworkCreate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_NetworksCount") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1os8cm5">
+ <bpmn2:incoming>SequenceFlow_1n7r495</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1f26zbk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1j7n6qx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f26zbk" name="No" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0nreq15" name="GoTo StartVnfs">
+ <bpmn2:incoming>SequenceFlow_1j7n6qx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vwssu7" sourceRef="IntermediateCatchEvent_1nh09nr" targetRef="callDbCatalog_scriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_19etqmx" sourceRef="callDbCatalog_scriptTask" targetRef="ExclusiveGateway_0b9wd4f" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1j7n6qx" sourceRef="ExclusiveGateway_1os8cm5" targetRef="IntermediateThrowEvent_0nreq15" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0rlqdvq" name="StartVnfs">
+ <bpmn2:outgoing>SequenceFlow_10tbv62</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1nlocis" name="Create VNF?" default="SequenceFlow_0w7328u">
+ <bpmn2:incoming>SequenceFlow_10tbv62</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bvecvm</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0w7328u</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_04q1qud">
+ <bpmn2:incoming>SequenceFlow_0qi5uxg</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0w7328u</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xowenu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10tbv62" sourceRef="IntermediateCatchEvent_0rlqdvq" targetRef="ExclusiveGateway_1nlocis" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bvecvm" name="Yes" sourceRef="ExclusiveGateway_1nlocis" targetRef="ScriptTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CREVAS_VNFsCount") >0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qi5uxg" name="in 1702 scope only one VNF will be created - if needed" sourceRef="doCreateVNFandModules_CallActivity" targetRef="ExclusiveGateway_04q1qud">
+ <bpmn2:documentation>in 1702 scope only one VNF will be created</bpmn2:documentation>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0w7328u" name="No" sourceRef="ExclusiveGateway_1nlocis" targetRef="ExclusiveGateway_04q1qud" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xowenu" sourceRef="ExclusiveGateway_04q1qud" targetRef="IntermediateThrowEvent_4" />
+ <bpmn2:scriptTask id="ScriptTask_04o8gb3" name="Validate Network Create" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12ag2bk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04vlq8r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf= new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.validateNetworkCreate(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12ag2bk" sourceRef="doCreateNetworkInstance_CallActivity" targetRef="ScriptTask_04o8gb3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04vlq8r" sourceRef="ScriptTask_04o8gb3" targetRef="ExclusiveGateway_0fe690i" />
+ <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("CREVAS_setUpdateDbInstancePayload")}]]></camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</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_13uceka</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13uceka" sourceRef="updateInfraRequest" targetRef="IntermediateThrowEvent_0prlju0" />
+ <bpmn2:scriptTask id="ScriptTask_1qd3uwb" name="PostProcess&#10;Create&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1ky2sv9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vj46ej</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateGenericMacroServiceNetworkVnf = new CreateGenericMacroServiceNetworkVnf()
+CreateGenericMacroServiceNetworkVnf.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: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="CreateGenericMacroServiceNetworkVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVIPR_startEvent">
+ <dc:Bounds x="96" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="82" y="131" width="65" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="285" y="68" 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="108" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="108" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds x="787" y="1115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds x="514" y="1115" 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="108" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="69" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="476" y="68" 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="614" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="787" y="1155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="1140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="CreateVIPR_EndEvent">
+ <dc:Bounds x="1286" y="1135" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1294" y="1176" width="20" 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="887" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="1095" y="1154" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="991" y="1140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="1281" y="1385" width="409" height="232" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="1349" y="1490" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1367" y="1531" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="1424" y="1468" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="1577" y="1490" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1595" y="1531" 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="1385" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1424" y="1508" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1413" y="1508" 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="1524" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1557" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1557" y="1508" />
+ <di:waypoint xsi:type="dc:Point" x="1577" y="1508" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1572" y="1508" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_75" bpmnElement="doCreateServiceInstance_CallActivity">
+ <dc:Bounds x="476" y="223" 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="108" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="652" y="93" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2">
+ <dc:Bounds x="1095" y="1114" 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="1195" y="1153" />
+ <di:waypoint xsi:type="dc:Point" x="1286" y="1153" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1241" y="1138" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_76" bpmnElement="doCreateNetworkInstance_CallActivity">
+ <dc:Bounds x="542" y="491" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="96" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="281" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4">
+ <dc:Bounds x="84" y="1137" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="66" y="1173" width="71" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_51" bpmnElement="IntermediateThrowEvent_4">
+ <dc:Bounds x="1033" y="854" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1008" y="895" width="85" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_341" bpmnElement="ScriptTask_PrepareNetworkCreate">
+ <dc:Bounds x="400" y="488" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_342" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="456" y="765" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_81" bpmnElement="doCreateVNFandModules_CallActivity">
+ <dc:Bounds x="623" y="765" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="728" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="707" y="131" width="77" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true">
+ <dc:Bounds x="-75" y="1333" width="1324" height="837" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1vwgs6p_di" bpmnElement="ExclusiveGateway_1vwgs6p" isMarkerVisible="true">
+ <dc:Bounds x="79" y="2042" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="66" y="2102" width="80" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk">
+ <dc:Bounds x="-34" y="2050" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-40" y="2091" width="50" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ydrtdx_di" bpmnElement="ExclusiveGateway_0ydrtdx" isMarkerVisible="true">
+ <dc:Bounds x="79" y="1935" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="13" y="1950" width="47" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_00rt5qa_di" bpmnElement="ExclusiveGateway_00rt5qa" isMarkerVisible="true">
+ <dc:Bounds x="79" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="5" y="1640" width="57" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1kvn1pz_di" bpmnElement="ExclusiveGateway_1kvn1pz" isMarkerVisible="true">
+ <dc:Bounds x="206" y="1505" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="188" y="1471" width="89" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa">
+ <dc:Bounds x="1052" y="2016" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7">
+ <dc:Bounds x="1189" y="2038" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1207" y="2079" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_1pqjttt_di" bpmnElement="InclusiveGateway_1pqjttt">
+ <dc:Bounds x="303" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="328" y="1680" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3">
+ <dc:Bounds x="920" y="2016" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zpbskl_di" bpmnElement="SequenceFlow_0zpbskl">
+ <di:waypoint xsi:type="dc:Point" x="104" y="2042" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="110" y="2023.785849077779" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dhf2js_di" bpmnElement="SequenceFlow_0dhf2js">
+ <di:waypoint xsi:type="dc:Point" x="129" y="2067" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="2067" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1985" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="169" y="2072" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sx5llu_di" bpmnElement="SequenceFlow_1sx5llu">
+ <di:waypoint xsi:type="dc:Point" x="129" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="434" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="1960" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="448" y="1964" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_02o4yqx_di" bpmnElement="SequenceFlow_02o4yqx">
+ <di:waypoint xsi:type="dc:Point" x="104" y="1935" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1851" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="115" y="1888.0011779924323" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05lo85t_di" bpmnElement="SequenceFlow_05lo85t">
+ <di:waypoint xsi:type="dc:Point" x="129" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="231" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="231" y="1555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="133" y="1654" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xtr1g5_di" bpmnElement="SequenceFlow_0xtr1g5">
+ <di:waypoint xsi:type="dc:Point" x="104" y="1625" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1570" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="113" y="1565" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19mxskt_di" bpmnElement="SequenceFlow_19mxskt">
+ <di:waypoint xsi:type="dc:Point" x="242" y="1544" />
+ <di:waypoint xsi:type="dc:Point" x="317" y="1636" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="281" y="1572" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0r7telk_di" bpmnElement="callDbCatalog_scriptTask">
+ <dc:Bounds x="184" y="533" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1gacz45_di" bpmnElement="prepareCreateService_scriptTask">
+ <dc:Bounds x="285" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10o22u2_di" bpmnElement="SequenceFlow_10o22u2">
+ <di:waypoint xsi:type="dc:Point" x="132" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="262" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="247.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_11b4gmn_di" bpmnElement="setPONR_ScriptTask">
+ <dc:Bounds x="228" y="1115" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1">
+ <di:waypoint xsi:type="dc:Point" x="120" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="228" y="1155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="174" y="1130" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0afe2pg_di" bpmnElement="SequenceFlow_0afe2pg">
+ <di:waypoint xsi:type="dc:Point" x="328" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="471" y="1155" />
+ <di:waypoint xsi:type="dc:Point" x="514" y="1155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="1140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1cvt373_di" bpmnElement="DoRollbackVNFandModules_CallActivity">
+ <dc:Bounds x="54" y="1490" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_09xerwk_di" bpmnElement="SequenceFlow_09xerwk">
+ <di:waypoint xsi:type="dc:Point" x="154" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="206" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="180" y="1515" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0zl1ald_di" bpmnElement="DoRollbackNetwork_CallActivity">
+ <dc:Bounds x="404" y="1490" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09o09bu_di" bpmnElement="ExclusiveGateway_09o09bu" isMarkerVisible="true">
+ <dc:Bounds x="608" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="596" y="1596" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0oh7wzu_di" bpmnElement="DoRollbackService_CallActivity">
+ <dc:Bounds x="713" y="1610" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="InclusiveGateway_0foywso_di" bpmnElement="InclusiveGateway_0foywso">
+ <dc:Bounds x="738" y="1935" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="1990" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1os9x7w_di" bpmnElement="SequenceFlow_1os9x7w">
+ <di:waypoint xsi:type="dc:Point" x="658" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="1650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="678" y="1635" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f1hd3l_di" bpmnElement="SequenceFlow_1f1hd3l">
+ <di:waypoint xsi:type="dc:Point" x="763" y="1690" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1743" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="778" y="1716.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g7scsg_di" bpmnElement="SequenceFlow_0g7scsg">
+ <di:waypoint xsi:type="dc:Point" x="633" y="1675" />
+ <di:waypoint xsi:type="dc:Point" x="633" y="1768" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="1768" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="641" y="1710.0295234297107" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jg47xm_di" bpmnElement="SequenceFlow_0jg47xm">
+ <di:waypoint xsi:type="dc:Point" x="788" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="970" y="1960" />
+ <di:waypoint xsi:type="dc:Point" x="970" y="2016" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="879" y="1945" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc">
+ <di:waypoint xsi:type="dc:Point" x="1020" y="2056" />
+ <di:waypoint xsi:type="dc:Point" x="1052" y="2056" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="2041" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8">
+ <di:waypoint xsi:type="dc:Point" x="1152" y="2056" />
+ <di:waypoint xsi:type="dc:Point" x="1189" y="2056" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1171" y="2041" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1bwbn7r_di" bpmnElement="SequenceFlow_1bwbn7r">
+ <di:waypoint xsi:type="dc:Point" x="500" y="530" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="529" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="521" y="514.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7r495_di" bpmnElement="SequenceFlow_1n7r495">
+ <di:waypoint xsi:type="dc:Point" x="882" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="561" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="896" y="513" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h77psn_di" bpmnElement="SequenceFlow_1h77psn">
+ <di:waypoint xsi:type="dc:Point" x="556" y="806" />
+ <di:waypoint xsi:type="dc:Point" x="586" y="806" />
+ <di:waypoint xsi:type="dc:Point" x="586" y="804" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="804" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="601" y="805" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1nh09nr_di" bpmnElement="IntermediateCatchEvent_1nh09nr">
+ <dc:Bounds x="83" y="555" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="66" y="591" width="70" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0">
+ <dc:Bounds x="905" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888" y="286" width="70" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0b9wd4f_di" bpmnElement="ExclusiveGateway_0b9wd4f" isMarkerVisible="true">
+ <dc:Bounds x="332" y="548" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="393" y="580" width="61" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0fe690i_di" bpmnElement="ExclusiveGateway_0fe690i" isMarkerVisible="true">
+ <dc:Bounds x="828" y="503" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="796" y="561" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dfkfh1_di" bpmnElement="SequenceFlow_0dfkfh1">
+ <di:waypoint xsi:type="dc:Point" x="853" y="503" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="450" y="486" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="644" y="411" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cmebdc_di" bpmnElement="SequenceFlow_0cmebdc">
+ <di:waypoint xsi:type="dc:Point" x="357" y="548" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="400" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="363" y="538" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1os8cm5_di" bpmnElement="ExclusiveGateway_1os8cm5" isMarkerVisible="true">
+ <dc:Bounds x="898" y="561" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="923" y="616" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f26zbk_di" bpmnElement="SequenceFlow_1f26zbk">
+ <di:waypoint xsi:type="dc:Point" x="357" y="598" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="665" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="611" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="633" y="650" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nreq15_di" bpmnElement="IntermediateThrowEvent_0nreq15">
+ <dc:Bounds x="1033" y="568" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1013" y="609" width="75" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vwssu7_di" bpmnElement="SequenceFlow_1vwssu7">
+ <di:waypoint xsi:type="dc:Point" x="119" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="184" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="152" y="548" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19etqmx_di" bpmnElement="SequenceFlow_19etqmx">
+ <di:waypoint xsi:type="dc:Point" x="284" y="573" />
+ <di:waypoint xsi:type="dc:Point" x="332" y="573" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="308" y="548" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j7n6qx_di" bpmnElement="SequenceFlow_1j7n6qx">
+ <di:waypoint xsi:type="dc:Point" x="948" y="586" />
+ <di:waypoint xsi:type="dc:Point" x="1033" y="586" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="991" y="561" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0rlqdvq_di" bpmnElement="IntermediateCatchEvent_0rlqdvq">
+ <dc:Bounds x="83" y="870" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="77" y="906" width="45" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1nlocis_di" bpmnElement="ExclusiveGateway_1nlocis" isMarkerVisible="true">
+ <dc:Bounds x="332" y="863" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="396" y="882" width="62" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_04q1qud_di" bpmnElement="ExclusiveGateway_04q1qud" isMarkerVisible="true">
+ <dc:Bounds x="898" y="847" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="923" y="902" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10tbv62_di" bpmnElement="SequenceFlow_10tbv62">
+ <di:waypoint xsi:type="dc:Point" x="119" y="888" />
+ <di:waypoint xsi:type="dc:Point" x="332" y="888" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="226" y="863" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bvecvm_di" bpmnElement="SequenceFlow_0bvecvm">
+ <di:waypoint xsi:type="dc:Point" x="357" y="863" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="805" />
+ <di:waypoint xsi:type="dc:Point" x="456" y="805" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="368" y="838" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qi5uxg_di" bpmnElement="SequenceFlow_0qi5uxg">
+ <di:waypoint xsi:type="dc:Point" x="723" y="805" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="805" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="847" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="752" width="89" height="50" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w7328u_di" bpmnElement="SequenceFlow_0w7328u">
+ <di:waypoint xsi:type="dc:Point" x="357" y="914" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="937" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="937" />
+ <di:waypoint xsi:type="dc:Point" x="923" y="898" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="603" y="913" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xowenu_di" bpmnElement="SequenceFlow_0xowenu">
+ <di:waypoint xsi:type="dc:Point" x="948" y="872" />
+ <di:waypoint xsi:type="dc:Point" x="1033" y="872" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="991" y="847" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_04o8gb3_di" bpmnElement="ScriptTask_04o8gb3">
+ <dc:Bounds x="686" y="491" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ag2bk_di" bpmnElement="SequenceFlow_12ag2bk">
+ <di:waypoint xsi:type="dc:Point" x="642" y="531" />
+ <di:waypoint xsi:type="dc:Point" x="686" y="531" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="664" y="506" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04vlq8r_di" bpmnElement="SequenceFlow_04vlq8r">
+ <di:waypoint xsi:type="dc:Point" x="786" y="531" />
+ <di:waypoint xsi:type="dc:Point" x="807" y="531" />
+ <di:waypoint xsi:type="dc:Point" x="807" y="528" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="528" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="822" y="519.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0j6sjye_di" bpmnElement="SequenceFlow_0j6sjye">
+ <di:waypoint xsi:type="dc:Point" x="385" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="431" y="248" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_184teky_di" bpmnElement="ScriptTask_184teky">
+ <dc:Bounds x="546" y="1490" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1c386z9_di" bpmnElement="ExclusiveGateway_1c386z9" isMarkerVisible="true">
+ <dc:Bounds x="685" y="1505" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="758" y="1512" width="53" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dmsx0d_di" bpmnElement="SequenceFlow_1dmsx0d">
+ <di:waypoint xsi:type="dc:Point" x="504" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="525" y="1515" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1otyild_di" bpmnElement="SequenceFlow_1otyild">
+ <di:waypoint xsi:type="dc:Point" x="646" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="685" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="1515" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0136s37_di" bpmnElement="SequenceFlow_0136s37">
+ <di:waypoint xsi:type="dc:Point" x="710" y="1505" />
+ <di:waypoint xsi:type="dc:Point" x="710" y="1414" />
+ <di:waypoint xsi:type="dc:Point" x="454" y="1414" />
+ <di:waypoint xsi:type="dc:Point" x="454" y="1490" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="574" y="1399" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12u8ufr_di" bpmnElement="SequenceFlow_12u8ufr">
+ <di:waypoint xsi:type="dc:Point" x="710" y="1555" />
+ <di:waypoint xsi:type="dc:Point" x="710" y="1586" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="1586" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="1625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="615" y="1571" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1bts0nw_di" bpmnElement="ExclusiveGateway_1bts0nw" isMarkerVisible="true">
+ <dc:Bounds x="303" y="1505" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="289" y="1471" width="81" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tmepzk_di" bpmnElement="SequenceFlow_0tmepzk">
+ <di:waypoint xsi:type="dc:Point" x="256" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="303" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="1505" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1fqmrda_di" bpmnElement="SequenceFlow_1fqmrda">
+ <di:waypoint xsi:type="dc:Point" x="353" y="1530" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="1530" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="370" y="1505" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1brxd2r_di" bpmnElement="SequenceFlow_1brxd2r">
+ <di:waypoint xsi:type="dc:Point" x="328" y="1555" />
+ <di:waypoint xsi:type="dc:Point" x="328" y="1625" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="336" y="1580" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_05indeh_di" bpmnElement="ExclusiveGateway_05indeh" isMarkerVisible="true">
+ <dc:Bounds x="505" y="1625" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="430" y="1593" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08s0ew2_di" bpmnElement="SequenceFlow_08s0ew2">
+ <di:waypoint xsi:type="dc:Point" x="353" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="505" y="1650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="429" y="1625" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ieiew4_di" bpmnElement="SequenceFlow_1ieiew4">
+ <di:waypoint xsi:type="dc:Point" x="555" y="1650" />
+ <di:waypoint xsi:type="dc:Point" x="608" y="1650" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="573" y="1625" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sezboq_di" bpmnElement="SequenceFlow_0sezboq">
+ <di:waypoint xsi:type="dc:Point" x="530" y="1675" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="1768" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="1768" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="538" y="1710.0295234297107" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_16yhzej_di" bpmnElement="updateInfraRequest">
+ <dc:Bounds x="764" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13uceka_di" bpmnElement="SequenceFlow_13uceka">
+ <di:waypoint xsi:type="dc:Point" x="864" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="905" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="885" y="248" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1qd3uwb_di" bpmnElement="ScriptTask_1qd3uwb">
+ <dc:Bounds x="618" y="226" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ky2sv9_di" bpmnElement="SequenceFlow_1ky2sv9">
+ <di:waypoint xsi:type="dc:Point" x="576" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="597" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="266" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="612" y="254.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vj46ej_di" bpmnElement="SequenceFlow_0vj46ej">
+ <di:waypoint xsi:type="dc:Point" x="718" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="741" y="266" />
+ <di:waypoint xsi:type="dc:Point" x="741" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="764" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="756" y="254.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17doerz_di" bpmnElement="ScriptTask_17doerz">
+ <dc:Bounds x="54" y="1771" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zq7i3q_di" bpmnElement="SequenceFlow_0zq7i3q">
+ <di:waypoint xsi:type="dc:Point" x="2" y="2068" />
+ <di:waypoint xsi:type="dc:Point" x="49" y="2068" />
+ <di:waypoint xsi:type="dc:Point" x="49" y="2067" />
+ <di:waypoint xsi:type="dc:Point" x="79" y="2067" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="18" y="2069" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0m9f5ka_di" bpmnElement="InclusiveGateway_0m9f5ka">
+ <dc:Bounds x="738" y="1743" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="763" y="1798" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0wyub4x_di" bpmnElement="ScriptTask_0wyub4x">
+ <dc:Bounds x="713" y="1827" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sdb3on_di" bpmnElement="SequenceFlow_0sdb3on">
+ <di:waypoint xsi:type="dc:Point" x="104" y="1771" />
+ <di:waypoint xsi:type="dc:Point" x="104" y="1675" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="119" y="1713" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0f4u373_di" bpmnElement="SequenceFlow_0f4u373">
+ <di:waypoint xsi:type="dc:Point" x="763" y="1793" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1827" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="778" y="1800" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rabks0_di" bpmnElement="SequenceFlow_1rabks0">
+ <di:waypoint xsi:type="dc:Point" x="763" y="1907" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="1935" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="778" y="1911" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn
new file mode 100644
index 0000000000..52627a5e33
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.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.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.bpmn.infrastructure.scripts.*
+def CreateNetworkInstance = new CreateNetworkInstance()
+CreateNetworkInstance.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">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CRENI_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="CRENI_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="CRENI_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.openecomp.mso.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="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="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.openecomp.mso.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.openecomp.mso.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="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="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="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="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="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="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> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn
new file mode 100644
index 0000000000..fa114c5e76
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateServiceInstance.bpmn
@@ -0,0 +1,336 @@
+<?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="CreateServiceInstance" name="CreateServiceInstance" 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.openecomp.mso.bpmn.infrastructure.scripts.utils.*
+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="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" />
+ </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="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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi= new CreateServiceInstance()
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+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="doCreateServiceInstance_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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CreateServiceInstance()
+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: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="CreateServiceInstance">
+ <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="222" y="531" width="394" height="188" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds x="255" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="273" y="649" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="370" y="586" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds x="531" y="608" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="549" y="649" 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="291" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="626" 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="470" y="626" />
+ <di:waypoint xsi:type="dc:Point" x="531" y="626" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="505" y="626" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doCreateServiceInstance_CallActivity">
+ <dc:Bounds x="460" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o440av_di" bpmnElement="EndEvent_0o440av">
+ <dc:Bounds x="1017" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1028" y="221" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lj31zp_di" bpmnElement="SequenceFlow_1lj31zp">
+ <di:waypoint xsi:type="dc:Point" x="560" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="662" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="611" y="82" 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="797" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0sevgre_di" bpmnElement="CallActivity_0sevgre">
+ <dc:Bounds x="985" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xxvjxq_di" bpmnElement="SequenceFlow_0xxvjxq">
+ <di:waypoint xsi:type="dc:Point" x="897" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="985" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="941" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1hql91g_di" bpmnElement="ScriptTask_1hql91g">
+ <dc:Bounds x="380" y="333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ksm1dz_di" bpmnElement="CallActivity_1ksm1dz">
+ <dc:Bounds x="557" y="333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_1k2112i_di" bpmnElement="SubProcess_1k2112i" isExpanded="true">
+ <dc:Bounds x="107" y="269" width="679" height="194" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_110xxgx_di" bpmnElement="StartEvent_110xxgx">
+ <dc:Bounds x="122" y="355" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="140" y="396" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1rqikib_di" bpmnElement="EndEvent_1rqikib">
+ <dc:Bounds x="701" y="355" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="719" y="396" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1reso2f_di" bpmnElement="SequenceFlow_1reso2f">
+ <di:waypoint xsi:type="dc:Point" x="480" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="557" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="519" y="358" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ghqolv_di" bpmnElement="SequenceFlow_1ghqolv">
+ <di:waypoint xsi:type="dc:Point" x="657" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="701" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="679" y="358" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_095crcd_di" bpmnElement="SequenceFlow_095crcd">
+ <di:waypoint xsi:type="dc:Point" x="1035" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1035" y="185" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1050" y="161" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0n4umjf_di" bpmnElement="SequenceFlow_0n4umjf">
+ <di:waypoint xsi:type="dc:Point" x="158" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="180" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="180" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="201" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="195" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eto8sn_di" bpmnElement="SequenceFlow_0eto8sn">
+ <di:waypoint xsi:type="dc:Point" x="380" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="460" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="420" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1rb2dsd_di" bpmnElement="Task_1nko5zz">
+ <dc:Bounds x="280" 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="280" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="246" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o4smqp_di" bpmnElement="ScriptTask_0o4smqp">
+ <dc:Bounds x="202" y="333" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_14eadeb_di" bpmnElement="SequenceFlow_14eadeb">
+ <di:waypoint xsi:type="dc:Point" x="302" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="373" />
+ <di:waypoint xsi:type="dc:Point" x="380" y="373" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="373" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x5i9c1_di" bpmnElement="ExclusiveGateway_1x5i9c1" isMarkerVisible="true">
+ <dc:Bounds x="662" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="662" y="44" width="50" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_143akoz_di" bpmnElement="EndEvent_143akoz">
+ <dc:Bounds x="669" y="185" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="687" y="221" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1o4wwba_di" bpmnElement="SequenceFlow_1o4wwba">
+ <di:waypoint xsi:type="dc:Point" x="712" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="749" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="797" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="94" width="18" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mdnv3l_di" bpmnElement="SequenceFlow_1mdnv3l">
+ <di:waypoint xsi:type="dc:Point" x="687" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="149" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="185" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="661" y="126.56139708236196" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn
index 0d08da38f4..7a8133ec7f 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn
@@ -1,472 +1,472 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_pNTO8MRhEeWv36YLr7PC3Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="CreateVfModuleInfra" name="CreateVfModuleInfra" isExecutable="true">
- <bpmn2:startEvent id="StartEvent_1" camunda:asyncAfter="true" 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="DoCreateVfModuleRequest" target="DoCreateVfModuleRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="isVidRequest" target="isVidRequest"/>
- <camunda:in source="newVfModuleId" target="newVfModuleId"/>
- <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"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="SendResponse" camunda:asyncAfter="true" name="Send Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_pNTO8MRhEeWv36YLr7PC3Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <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="DoCreateVfModuleRequest" target="DoCreateVfModuleRequest"/>
+ <camunda:in source="mso-request-id" target="mso-request-id"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:in source="isVidRequest" target="isVidRequest"/>
+ <camunda:in source="newVfModuleId" target="newVfModuleId"/>
+ <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"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_7</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_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def createVfModule = new CreateVfModuleInfra()
-createVfModule.sendResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="SendResponse" targetRef="DoCreateVfModuleSubprocess"/>
- <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 com.att.bpm.scripts.*
+createVfModule.sendResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="SendResponse" targetRef="DoCreateVfModuleSubprocess"/>
+ <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.openecomp.mso.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:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</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:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="PrepareUpdateInfraRequest" targetRef="ServiceTask_1"/>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_1" targetRef="UpdateInfraRequestResponseCheck"/>
- <bpmn2:scriptTask id="PrepareMSOCompletionHandler" name="Prepare MSO Completion Handler" scriptFormat="groovy">
- <bpmn2:incoming>updateInfraRequestResponseGood</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:serviceTask id="ServiceTask_1" name="Update Infra Request">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</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:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="PrepareUpdateInfraRequest" targetRef="ServiceTask_1"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_1" targetRef="UpdateInfraRequestResponseCheck"/>
+ <bpmn2:scriptTask id="PrepareMSOCompletionHandler" name="Prepare MSO Completion Handler" scriptFormat="groovy">
+ <bpmn2:incoming>updateInfraRequestResponseGood</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in source="att-mso-request-id" target="att-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_8</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="PrepareMSOCompletionHandler">
- <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:scriptTask id="ValidateRollbackResponse" name="Validate Rollback Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+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_8</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="PrepareMSOCompletionHandler">
+ <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:scriptTask id="ValidateRollbackResponse" name="Validate Rollback Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def createVfModule = new CreateVfModuleInfra()
-createVfModule.validateRollbackResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ValidateRollbackResponse" targetRef="InclusiveGateway_1"/>
- <bpmn2:callActivity id="ScriptTask_1" name="Do CreateVfModule Rollback" 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="MSOWorkflowException" target="RollbackWorkflowException"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_1" targetRef="ValidateRollbackResponse"/>
- <bpmn2:startEvent id="StartEvent_2" name="Catch All Errors">
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_2" targetRef="ExclusiveGateway_1"/>
- <bpmn2:callActivity id="FalloutHandler" name="Fallout Handler" calledElement="FalloutHandler">
- <bpmn2:extensionElements>
- <camunda:in source="CVFMI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+createVfModule.validateRollbackResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ValidateRollbackResponse" targetRef="InclusiveGateway_1"/>
+ <bpmn2:callActivity id="ScriptTask_1" name="Do CreateVfModule Rollback" 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="MSOWorkflowException" target="RollbackWorkflowException"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_1" targetRef="ValidateRollbackResponse"/>
+ <bpmn2:startEvent id="StartEvent_2" name="Catch All Errors">
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_2" targetRef="ExclusiveGateway_1"/>
+ <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_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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:inclusiveGateway id="InclusiveGateway_1">
- <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
- <bpmn2:incoming>isRollbackOnNoSequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="InclusiveGateway_1" targetRef="PrepareFalloutHandler"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Is Rollback On? " default="isRollbackOnNoSequenceFlow">
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>isRollbackOnNoSequenceFlow</bpmn2:outgoing>
- <bpmn2:outgoing>IsRollbackOnYesSequenceFlow</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="isRollbackOnNoSequenceFlow" name="no" sourceRef="ExclusiveGateway_1" targetRef="InclusiveGateway_1"/>
- <bpmn2:scriptTask id="LogAndSaveOriginalException" name="Log and Save Original Exception" scriptFormat="groovy">
- <bpmn2:incoming>IsRollbackOnYesSequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+cvfm.falloutHandlerPrep(execution, 'CVFMI_FalloutHandlerRequest')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PrepareFalloutHandler" targetRef="FalloutHandler"/>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_1">
+ <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+ <bpmn2:incoming>isRollbackOnNoSequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="InclusiveGateway_1" targetRef="PrepareFalloutHandler"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Is Rollback On? " default="isRollbackOnNoSequenceFlow">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>isRollbackOnNoSequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>IsRollbackOnYesSequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isRollbackOnNoSequenceFlow" name="no" sourceRef="ExclusiveGateway_1" targetRef="InclusiveGateway_1"/>
+ <bpmn2:scriptTask id="LogAndSaveOriginalException" name="Log and Save Original Exception" scriptFormat="groovy">
+ <bpmn2:incoming>IsRollbackOnYesSequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def cvfm = new CreateVfModuleInfra()
-cvfm.logAndSaveOriginalException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="IsRollbackOnYesSequenceFlow" name="yes" sourceRef="ExclusiveGateway_1" targetRef="LogAndSaveOriginalException">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="LogAndSaveOriginalException" targetRef="ScriptTask_1"/>
- </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 com.att.bpm.scripts.*
+cvfm.logAndSaveOriginalException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="IsRollbackOnYesSequenceFlow" name="yes" sourceRef="ExclusiveGateway_1" targetRef="LogAndSaveOriginalException">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="LogAndSaveOriginalException" targetRef="ScriptTask_1"/>
+ </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.openecomp.mso.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:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_2" errorCode="RESTFault" name="REST Fault"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="41.0" y="231.0"/>
- </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.0" y="249.0"/>
- <di:waypoint xsi:type="dc:Point" x="226.0" y="249.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="99.0" y="249.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
- <dc:Bounds height="80.0" width="100.0" x="226.0" y="209.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse">
- <dc:Bounds height="80.0" width="100.0" x="432.0" y="209.0"/>
- </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="326.0" y="249.0"/>
- <di:waypoint xsi:type="dc:Point" x="432.0" y="249.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="348.0" y="249.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess">
- <dc:Bounds height="80.0" width="145.0" x="612.0" y="209.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_178">
- <di:waypoint xsi:type="dc:Point" x="532.0" y="249.0"/>
- <di:waypoint xsi:type="dc:Point" x="612.0" y="249.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="823.0" y="231.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="841.0" y="272.0"/>
- </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="756.0" y="249.0"/>
- <di:waypoint xsi:type="dc:Point" x="823.0" y="249.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="39.0" y="349.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="65.0" x="25.0" y="390.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="PrepareUpdateInfraRequest">
- <dc:Bounds height="80.0" width="100.0" x="127.0" y="327.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_1">
- <dc:Bounds height="80.0" width="100.0" x="277.0" y="327.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="443.0" y="341.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="68.0" x="435.0" y="308.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler">
- <dc:Bounds height="80.0" width="100.0" x="552.0" y="327.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler">
- <dc:Bounds height="80.0" width="100.0" x="708.0" y="327.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1020.0" y="349.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1038.0" y="390.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="452.0" y="469.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="470.0" y="510.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.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="127.0" y="367.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="105.0" y="367.0"/>
- </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.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="277.0" y="367.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ExclusiveGateway_179">
- <di:waypoint xsi:type="dc:Point" x="377.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="410.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="410.0" y="366.0"/>
- <di:waypoint xsi:type="dc:Point" x="443.0" y="366.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="407.0" y="366.0"/>
- </bpmndi:BPMNLabel>
- </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="468.0" y="391.0"/>
- <di:waypoint xsi:type="dc:Point" x="469.0" y="421.0"/>
- <di:waypoint xsi:type="dc:Point" x="470.0" y="421.0"/>
- <di:waypoint xsi:type="dc:Point" x="470.0" y="469.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="459.0" y="419.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_ScriptTask_220">
- <di:waypoint xsi:type="dc:Point" x="493.0" y="366.0"/>
- <di:waypoint xsi:type="dc:Point" x="523.0" y="366.0"/>
- <di:waypoint xsi:type="dc:Point" x="523.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="552.0" y="367.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="510.0" y="367.0"/>
- </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="652.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="708.0" y="367.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="678.0" y="367.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true">
- <dc:Bounds height="385.0" width="925.0" x="48.0" y="540.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="72.0" y="844.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="98.0" x="60.0" y="886.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_222" bpmnElement="PrepareFalloutHandler">
- <dc:Bounds height="80.0" width="100.0" x="564.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_223" bpmnElement="FalloutHandler">
- <dc:Bounds height="80.0" width="100.0" x="708.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="864.0" y="694.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="882.0" y="735.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_44" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="955.0" y="690.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="970.0" y="731.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1049.0" y="690.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1067.0" y="731.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="664.0" y="712.0"/>
- <di:waypoint xsi:type="dc:Point" x="708.0" y="712.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="689.0" y="712.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="808.0" y="712.0"/>
- <di:waypoint xsi:type="dc:Point" x="864.0" y="712.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="836.0" y="712.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="991.0" y="708.0"/>
- <di:waypoint xsi:type="dc:Point" x="1049.0" y="708.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1015.0" y="708.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator">
- <dc:Bounds height="79.0" width="103.0" x="858.0" y="328.0"/>
- </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="808.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="858.0" y="367.0"/>
- </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="960.0" y="367.0"/>
- <di:waypoint xsi:type="dc:Point" x="1020.0" y="367.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="205.0" y="836.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="102.0" x="193.0" y="901.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ValidateRollbackResponse">
- <dc:Bounds height="79.0" width="103.0" x="312.0" y="554.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_25" bpmnElement="InclusiveGateway_1">
- <dc:Bounds height="50.0" width="50.0" x="459.0" y="686.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="484.0" y="741.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ExclusiveGateway_223">
- <di:waypoint xsi:type="dc:Point" x="108.0" y="862.0"/>
- <di:waypoint xsi:type="dc:Point" x="156.0" y="862.0"/>
- <di:waypoint xsi:type="dc:Point" x="156.0" y="861.0"/>
- <di:waypoint xsi:type="dc:Point" x="205.0" y="861.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="153.0" y="862.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="isRollbackOnNoSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_InclusiveGateway_25">
- <di:waypoint xsi:type="dc:Point" x="255.0" y="861.0"/>
- <di:waypoint xsi:type="dc:Point" x="354.0" y="861.0"/>
- <di:waypoint xsi:type="dc:Point" x="354.0" y="711.0"/>
- <di:waypoint xsi:type="dc:Point" x="459.0" y="711.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="324.0" y="866.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_InclusiveGateway_25">
- <di:waypoint xsi:type="dc:Point" x="414.0" y="593.0"/>
- <di:waypoint xsi:type="dc:Point" x="484.0" y="593.0"/>
- <di:waypoint xsi:type="dc:Point" x="484.0" y="686.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="462.0" y="593.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_InclusiveGateway_25" targetElement="_BPMNShape_ScriptTask_222">
- <di:waypoint xsi:type="dc:Point" x="509.0" y="711.0"/>
- <di:waypoint xsi:type="dc:Point" x="527.0" y="711.0"/>
- <di:waypoint xsi:type="dc:Point" x="527.0" y="712.0"/>
- <di:waypoint xsi:type="dc:Point" x="564.0" y="712.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="533.0" y="712.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="ScriptTask_1">
- <dc:Bounds height="79.0" width="103.0" x="179.0" y="554.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ScriptTask_266">
- <di:waypoint xsi:type="dc:Point" x="281.0" y="593.0"/>
- <di:waypoint xsi:type="dc:Point" x="312.0" y="593.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="294.0" y="593.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_283" bpmnElement="LogAndSaveOriginalException">
- <dc:Bounds height="79.0" width="103.0" x="179.0" y="693.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="IsRollbackOnYesSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_283">
- <di:waypoint xsi:type="dc:Point" x="230.0" y="836.0"/>
- <di:waypoint xsi:type="dc:Point" x="230.0" y="771.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="240.0" y="804.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_283" targetElement="_BPMNShape_ScriptTask_267">
- <di:waypoint xsi:type="dc:Point" x="230.0" y="693.0"/>
- <di:waypoint xsi:type="dc:Point" x="230.0" y="632.0"/>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+createVfModule.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PreProcessRequest" targetRef="SendResponse"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmn2:error id="Error_2" errorCode="RESTFault" name="REST Fault"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="41.0" y="231.0"/>
+ </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.0" y="249.0"/>
+ <di:waypoint xsi:type="dc:Point" x="226.0" y="249.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="99.0" y="249.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
+ <dc:Bounds height="80.0" width="100.0" x="226.0" y="209.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse">
+ <dc:Bounds height="80.0" width="100.0" x="432.0" y="209.0"/>
+ </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="326.0" y="249.0"/>
+ <di:waypoint xsi:type="dc:Point" x="432.0" y="249.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="348.0" y="249.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess">
+ <dc:Bounds height="80.0" width="145.0" x="612.0" y="209.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_178">
+ <di:waypoint xsi:type="dc:Point" x="532.0" y="249.0"/>
+ <di:waypoint xsi:type="dc:Point" x="612.0" y="249.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="823.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="841.0" y="272.0"/>
+ </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="756.0" y="249.0"/>
+ <di:waypoint xsi:type="dc:Point" x="823.0" y="249.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="39.0" y="349.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="65.0" x="25.0" y="390.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="PrepareUpdateInfraRequest">
+ <dc:Bounds height="80.0" width="100.0" x="127.0" y="327.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="277.0" y="327.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="443.0" y="341.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="68.0" x="435.0" y="308.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler">
+ <dc:Bounds height="80.0" width="100.0" x="552.0" y="327.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler">
+ <dc:Bounds height="80.0" width="100.0" x="708.0" y="327.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1020.0" y="349.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1038.0" y="390.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="452.0" y="469.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="470.0" y="510.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.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="127.0" y="367.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="105.0" y="367.0"/>
+ </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.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="277.0" y="367.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ExclusiveGateway_179">
+ <di:waypoint xsi:type="dc:Point" x="377.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="410.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="410.0" y="366.0"/>
+ <di:waypoint xsi:type="dc:Point" x="443.0" y="366.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="407.0" y="366.0"/>
+ </bpmndi:BPMNLabel>
+ </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="468.0" y="391.0"/>
+ <di:waypoint xsi:type="dc:Point" x="469.0" y="421.0"/>
+ <di:waypoint xsi:type="dc:Point" x="470.0" y="421.0"/>
+ <di:waypoint xsi:type="dc:Point" x="470.0" y="469.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="20.0" x="459.0" y="419.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_ScriptTask_220">
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="366.0"/>
+ <di:waypoint xsi:type="dc:Point" x="523.0" y="366.0"/>
+ <di:waypoint xsi:type="dc:Point" x="523.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="552.0" y="367.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="27.0" x="510.0" y="367.0"/>
+ </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="652.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="708.0" y="367.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="678.0" y="367.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true">
+ <dc:Bounds height="385.0" width="925.0" x="48.0" y="540.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="72.0" y="844.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="98.0" x="60.0" y="886.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_222" bpmnElement="PrepareFalloutHandler">
+ <dc:Bounds height="80.0" width="100.0" x="564.0" y="672.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_223" bpmnElement="FalloutHandler">
+ <dc:Bounds height="80.0" width="100.0" x="708.0" y="672.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="864.0" y="694.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="882.0" y="735.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_44" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="955.0" y="690.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="970.0" y="731.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="1049.0" y="690.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1067.0" y="731.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="664.0" y="712.0"/>
+ <di:waypoint xsi:type="dc:Point" x="708.0" y="712.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="689.0" y="712.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="808.0" y="712.0"/>
+ <di:waypoint xsi:type="dc:Point" x="864.0" y="712.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="836.0" y="712.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="991.0" y="708.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1049.0" y="708.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1015.0" y="708.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator">
+ <dc:Bounds height="79.0" width="103.0" x="858.0" y="328.0"/>
+ </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="808.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="858.0" y="367.0"/>
+ </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="960.0" y="367.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1020.0" y="367.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="205.0" y="836.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="102.0" x="193.0" y="901.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ValidateRollbackResponse">
+ <dc:Bounds height="79.0" width="103.0" x="312.0" y="554.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_25" bpmnElement="InclusiveGateway_1">
+ <dc:Bounds height="50.0" width="50.0" x="459.0" y="686.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="484.0" y="741.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ExclusiveGateway_223">
+ <di:waypoint xsi:type="dc:Point" x="108.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="156.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="156.0" y="861.0"/>
+ <di:waypoint xsi:type="dc:Point" x="205.0" y="861.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="153.0" y="862.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="isRollbackOnNoSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_InclusiveGateway_25">
+ <di:waypoint xsi:type="dc:Point" x="255.0" y="861.0"/>
+ <di:waypoint xsi:type="dc:Point" x="354.0" y="861.0"/>
+ <di:waypoint xsi:type="dc:Point" x="354.0" y="711.0"/>
+ <di:waypoint xsi:type="dc:Point" x="459.0" y="711.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="20.0" x="324.0" y="866.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_InclusiveGateway_25">
+ <di:waypoint xsi:type="dc:Point" x="414.0" y="593.0"/>
+ <di:waypoint xsi:type="dc:Point" x="484.0" y="593.0"/>
+ <di:waypoint xsi:type="dc:Point" x="484.0" y="686.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="462.0" y="593.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_InclusiveGateway_25" targetElement="_BPMNShape_ScriptTask_222">
+ <di:waypoint xsi:type="dc:Point" x="509.0" y="711.0"/>
+ <di:waypoint xsi:type="dc:Point" x="527.0" y="711.0"/>
+ <di:waypoint xsi:type="dc:Point" x="527.0" y="712.0"/>
+ <di:waypoint xsi:type="dc:Point" x="564.0" y="712.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="533.0" y="712.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="79.0" width="103.0" x="179.0" y="554.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ScriptTask_266">
+ <di:waypoint xsi:type="dc:Point" x="281.0" y="593.0"/>
+ <di:waypoint xsi:type="dc:Point" x="312.0" y="593.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="294.0" y="593.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_283" bpmnElement="LogAndSaveOriginalException">
+ <dc:Bounds height="79.0" width="103.0" x="179.0" y="693.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="IsRollbackOnYesSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_283">
+ <di:waypoint xsi:type="dc:Point" x="230.0" y="836.0"/>
+ <di:waypoint xsi:type="dc:Point" x="230.0" y="771.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="27.0" x="240.0" y="804.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_283" targetElement="_BPMNShape_ScriptTask_267">
+ <di:waypoint xsi:type="dc:Point" x="230.0" y="693.0"/>
+ <di:waypoint xsi:type="dc:Point" x="230.0" y="632.0"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn
index 9beaad909b..0fc889bfd6 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn
@@ -1,480 +1,480 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_CyftwG_HEeaKe-v4u9MasA" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="CreateVfModuleVolumeInfraV1" name="CreateVfModuleVolumeInfraV1" isExecutable="true">
- <bpmn2:startEvent id="StartEvent_createVfModuleVolumeInfraV1" camunda:asyncAfter="true">
- <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_14</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_catchErrors" targetRef="ExclusiveGateway_isSyncResponseSent"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_isSyncResponseSent" name="Sync response sent?" default="SequenceFlow_syncResponseNotSent">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_syncResponseSent</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_syncResponseNotSent</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_syncResponseSent" name="Yes" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_prefalloutHandlerRequest">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{CVMVINFRAV1_syncResponseSent == true}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_sendSyncErrorResp" name="Send sync error response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_syncResponseNotSent</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_CyftwG_HEeaKe-v4u9MasA" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <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_14</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_catchErrors" targetRef="ExclusiveGateway_isSyncResponseSent"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isSyncResponseSent" name="Sync response sent?" default="SequenceFlow_syncResponseNotSent">
+ <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_syncResponseSent</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_syncResponseNotSent</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_syncResponseSent" name="Yes" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_prefalloutHandlerRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{CVMVINFRAV1_syncResponseSent == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_sendSyncErrorResp" name="Send sync error response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_syncResponseNotSent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
-createVfModuleVolumeInfraV1.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_syncResponseNotSent" name="No" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_sendSyncErrorResp"/>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_sendSyncErrorResp" targetRef="ScriptTask_prefalloutHandlerRequest"/>
- <bpmn2:scriptTask id="ScriptTask_prefalloutHandlerRequest" name="Prepare Fallout Handler Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_syncResponseSent</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+createVfModuleVolumeInfraV1.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_syncResponseNotSent" name="No" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_sendSyncErrorResp"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_sendSyncErrorResp" targetRef="ScriptTask_prefalloutHandlerRequest"/>
+ <bpmn2:scriptTask id="ScriptTask_prefalloutHandlerRequest" name="Prepare Fallout Handler Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_syncResponseSent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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: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 com.att.bpm.scripts.*
+]]></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: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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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_callGenericGetSI">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{CVMVINFRAV1_volumeGroupName != null && CVMVINFRAV1_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 com.att.bpm.scripts.*
+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_callGenericGetSI">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{CVMVINFRAV1_volumeGroupName != null && CVMVINFRAV1_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.openecomp.mso.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_callGenericGetSI" name="Call Generic Get Service Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="CVMVINFRAV1_serviceInstanceId" target="GENGS_serviceInstanceId"/>
- <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator"/>
- <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="CVMVINFRAV1_serviceType" target="GENGS_type"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_volGrpNamePresent</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:callActivity id="CallActivity_doCreateVfModuleVolumeV1" name="Call DoCreateVfModuleVolumeV1" calledElement="DoCreateVfModuleVolumeV1">
- <bpmn2:extensionElements>
- <camunda:in source="CVMVINFRAV1_Request" target="DoCreateVfModuleVolumeV1Request"/>
- <camunda:in source="CVMVINFRAV1_vnfId" target="vnf-id"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in source="CVMVINFRAV1_volumeGroupId" target="volume-group-id"/>
- <camunda:out source="DCVFMODVOLV1_SuccessIndicator" target="DCVFMODVOLV1_SuccessIndicator"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:in source="CVMVINFRAV1_isVidRequest" target="is-vid-request"/>
- <camunda:in source="test-volume-group-name" target="test-volume-group-name"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="WorkflowException" target="WorkflowException"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_serviceInstanceFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="CallActivity_doCreateVfModuleVolumeV1" targetRef="ScriptTask_prepareDbInfraRequest"/>
- <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 com.att.bpm.scripts.*
+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_callGenericGetSI" name="Call Generic Get Service Instance" calledElement="GenericGetService">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_serviceInstanceId" target="GENGS_serviceInstanceId"/>
+ <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator"/>
+ <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:in source="CVMVINFRAV1_serviceType" target="GENGS_type"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_volGrpNamePresent</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:callActivity id="CallActivity_doCreateVfModuleVolumeV1" name="Call DoCreateVfModuleVolumeV1" calledElement="DoCreateVfModuleVolumeV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="CVMVINFRAV1_Request" target="DoCreateVfModuleVolumeV1Request"/>
+ <camunda:in source="CVMVINFRAV1_vnfId" target="vnf-id"/>
+ <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="CVMVINFRAV1_volumeGroupId" target="volume-group-id"/>
+ <camunda:out source="DCVFMODVOLV1_SuccessIndicator" target="DCVFMODVOLV1_SuccessIndicator"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:in source="CVMVINFRAV1_isVidRequest" target="is-vid-request"/>
+ <camunda:in source="test-volume-group-name" target="test-volume-group-name"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ <camunda:in source="WorkflowException" target="WorkflowException"/>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_serviceInstanceFound</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="CallActivity_doCreateVfModuleVolumeV1" targetRef="ScriptTask_prepareDbInfraRequest"/>
+ <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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+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.openecomp.mso.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:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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: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: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_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+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:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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: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: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_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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:exclusiveGateway id="ExclusiveGateway_1" name="Is service instance found?" default="SequenceFlow_serviceInstanceNotFound">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_serviceInstanceFound</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_serviceInstanceNotFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="CallActivity_callGenericGetSI" targetRef="ExclusiveGateway_1"/>
- <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceFound" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="CallActivity_doCreateVfModuleVolumeV1">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{GENGSI_SuccessIndicator == true && GENGSI_FoundIndicator == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceNotFound" name="No" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_buildServiceInstanceNotFoundError"/>
- <bpmn2:endEvent id="EndEvent_serviceInstanceNotFound">
- <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="ScriptTask_buildServiceInstanceNotFoundError" name="Build Service Instance Not Found Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_serviceInstanceNotFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+createVfModuleVolumeInfraV1.executeMethod('prepareDbInfraSuccessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="ServiceTask_callDbInfraUpdate"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Is service instance found?" default="SequenceFlow_serviceInstanceNotFound">
+ <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_serviceInstanceFound</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_serviceInstanceNotFound</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="CallActivity_callGenericGetSI" targetRef="ExclusiveGateway_1"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceFound" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="CallActivity_doCreateVfModuleVolumeV1">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{GENGSI_SuccessIndicator == true && GENGSI_FoundIndicator == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceNotFound" name="No" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_buildServiceInstanceNotFoundError"/>
+ <bpmn2:endEvent id="EndEvent_serviceInstanceNotFound">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_buildServiceInstanceNotFoundError" name="Build Service Instance Not Found Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_serviceInstanceNotFound</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
-createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2500, "Service instance id not found in AAI: $CVMVINFRAV1_serviceInstanceId.", isDebugLogEnabled)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ScriptTask_buildServiceInstanceNotFoundError" targetRef="EndEvent_serviceInstanceNotFound"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleVolumeInfraV1">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_67" bpmnElement="StartEvent_createVfModuleVolumeInfraV1">
- <dc:Bounds height="36.0" width="36.0" x="144.0" y="156.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="162.0" y="197.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="180.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="252.0" y="174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="219.0" y="174.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="ScriptTask_preProcessRequest">
- <dc:Bounds height="80.0" width="100.0" x="252.0" y="134.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="ScriptTask_sendSyncAckResponse">
- <dc:Bounds height="80.0" width="100.0" x="408.0" y="134.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_249" bpmnElement="ExclusiveGateway_isVolGrpnamePresent" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="589.0" y="148.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="186.0" x="521.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="ScriptTask_buildError">
- <dc:Bounds height="80.0" width="100.0" x="565.0" y="264.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_36" bpmnElement="CallActivity_doCreateVfModuleVolumeV1">
- <dc:Bounds height="80.0" width="100.0" x="996.0" y="134.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_volGrpNamePresent" sourceElement="_BPMNShape_ExclusiveGateway_249" targetElement="_BPMNShape_CallActivity_51">
- <di:waypoint xsi:type="dc:Point" x="639.0" y="173.0"/>
- <di:waypoint xsi:type="dc:Point" x="685.0" y="173.0"/>
- <di:waypoint xsi:type="dc:Point" x="685.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="720.0" y="174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="680.0" y="173.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="508.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="589.0" y="173.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="547.0" y="173.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="352.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="408.0" y="174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="371.0" y="174.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="614.0" y="198.0"/>
- <di:waypoint xsi:type="dc:Point" x="615.0" y="264.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="612.0" y="234.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="598.0" y="389.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="616.0" y="430.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="615.0" y="344.0"/>
- <di:waypoint xsi:type="dc:Point" x="616.0" y="389.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="613.0" y="370.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="1898.0" y="156.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1916.0" y="197.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_exceptionHandler" isExpanded="true">
- <dc:Bounds height="337.0" width="856.0" x="133.0" y="471.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_catchErrors">
- <dc:Bounds height="36.0" width="36.0" x="204.0" y="555.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="109.0" x="168.0" y="596.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="876.0" y="555.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="924.0" y="562.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_304" bpmnElement="ScriptTask_prepareDbInfraRequest">
- <dc:Bounds height="80.0" width="100.0" x="1160.0" y="134.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_callDbInfraUpdate">
- <dc:Bounds height="80.0" width="100.0" x="1298.0" y="135.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="ScriptTask_postCompletionRequest">
- <dc:Bounds height="80.0" width="100.0" x="1442.0" y="136.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_37" bpmnElement="CallActivity_completeMsoProcess">
- <dc:Bounds height="80.0" width="100.0" x="1598.0" y="135.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_36" targetElement="_BPMNShape_ScriptTask_304">
- <di:waypoint xsi:type="dc:Point" x="1096.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="1160.0" y="174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1115.0" y="174.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_304" targetElement="_BPMNShape_ServiceTask_103">
- <di:waypoint xsi:type="dc:Point" x="1260.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="1298.0" y="175.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1374.0" y="175.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="1398.0" y="175.0"/>
- <di:waypoint xsi:type="dc:Point" x="1442.0" y="176.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1417.0" y="176.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="1542.0" y="176.0"/>
- <di:waypoint xsi:type="dc:Point" x="1598.0" y="175.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1653.0" y="176.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="ScriptTask_setSuccessIndicator">
- <dc:Bounds height="80.0" width="100.0" x="1742.0" y="134.0"/>
- </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="1698.0" y="175.0"/>
- <di:waypoint xsi:type="dc:Point" x="1742.0" y="174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1767.0" y="174.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="1842.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="1866.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="1866.0" y="175.0"/>
- <di:waypoint xsi:type="dc:Point" x="1898.0" y="174.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1963.0" y="175.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ExclusiveGateway_251">
- <di:waypoint xsi:type="dc:Point" x="240.0" y="573.0"/>
- <di:waypoint xsi:type="dc:Point" x="286.0" y="573.0"/>
- <di:waypoint xsi:type="dc:Point" x="286.0" y="572.0"/>
- <di:waypoint xsi:type="dc:Point" x="348.0" y="572.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="286.0" y="572.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="ScriptTask_prefalloutHandlerRequest">
- <dc:Bounds height="80.0" width="100.0" x="576.0" y="533.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_50" bpmnElement="CallActivity_callFalloutHandler">
- <dc:Bounds height="80.0" width="100.0" x="720.0" y="533.0"/>
- </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="676.0" y="573.0"/>
- <di:waypoint xsi:type="dc:Point" x="720.0" y="573.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="694.0" y="573.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="820.0" y="573.0"/>
- <di:waypoint xsi:type="dc:Point" x="876.0" y="573.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="842.0" y="573.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_251" bpmnElement="ExclusiveGateway_isSyncResponseSent" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="348.0" y="547.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="129.0" x="309.0" y="602.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_syncResponseSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_307">
- <di:waypoint xsi:type="dc:Point" x="398.0" y="572.0"/>
- <di:waypoint xsi:type="dc:Point" x="493.0" y="572.0"/>
- <di:waypoint xsi:type="dc:Point" x="493.0" y="573.0"/>
- <di:waypoint xsi:type="dc:Point" x="576.0" y="573.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="450.0" y="572.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="ScriptTask_sendSyncErrorResp">
- <dc:Bounds height="80.0" width="100.0" x="324.0" y="672.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_syncResponseNotSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_308">
- <di:waypoint xsi:type="dc:Point" x="373.0" y="597.0"/>
- <di:waypoint xsi:type="dc:Point" x="373.0" y="634.0"/>
- <di:waypoint xsi:type="dc:Point" x="374.0" y="634.0"/>
- <di:waypoint xsi:type="dc:Point" x="374.0" y="672.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="363.0" y="634.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_ScriptTask_307">
- <di:waypoint xsi:type="dc:Point" x="424.0" y="712.0"/>
- <di:waypoint xsi:type="dc:Point" x="608.0" y="712.0"/>
- <di:waypoint xsi:type="dc:Point" x="626.0" y="712.0"/>
- <di:waypoint xsi:type="dc:Point" x="626.0" y="613.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="530.0" y="712.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_51" bpmnElement="CallActivity_callGenericGetSI">
- <dc:Bounds height="80.0" width="100.0" x="720.0" y="134.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="887.0" y="148.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="912.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_51" targetElement="_BPMNShape_ExclusiveGateway_254">
- <di:waypoint xsi:type="dc:Point" x="820.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="853.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="853.0" y="173.0"/>
- <di:waypoint xsi:type="dc:Point" x="887.0" y="173.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_serviceInstanceFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_CallActivity_36">
- <di:waypoint xsi:type="dc:Point" x="937.0" y="173.0"/>
- <di:waypoint xsi:type="dc:Point" x="966.0" y="173.0"/>
- <di:waypoint xsi:type="dc:Point" x="966.0" y="174.0"/>
- <di:waypoint xsi:type="dc:Point" x="996.0" y="174.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_serviceInstanceNotFound">
- <dc:Bounds height="36.0" width="36.0" x="895.0" y="389.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="913.0" y="430.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_serviceInstanceNotFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ScriptTask_312">
- <di:waypoint xsi:type="dc:Point" x="912.0" y="198.0"/>
- <di:waypoint xsi:type="dc:Point" x="912.0" y="264.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="919.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="ScriptTask_buildServiceInstanceNotFoundError">
- <dc:Bounds height="80.0" width="100.0" x="862.0" y="264.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_312" targetElement="_BPMNShape_EndEvent_237">
- <di:waypoint xsi:type="dc:Point" x="912.0" y="344.0"/>
- <di:waypoint xsi:type="dc:Point" x="913.0" y="389.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="910.0" y="370.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2500, "Service instance id not found in AAI: $CVMVINFRAV1_serviceInstanceId.", isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ScriptTask_buildServiceInstanceNotFoundError" targetRef="EndEvent_serviceInstanceNotFound"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_67" bpmnElement="StartEvent_createVfModuleVolumeInfraV1">
+ <dc:Bounds height="36.0" width="36.0" x="144.0" y="156.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="162.0" y="197.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="180.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="252.0" y="174.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="219.0" y="174.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds height="80.0" width="100.0" x="252.0" y="134.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="ScriptTask_sendSyncAckResponse">
+ <dc:Bounds height="80.0" width="100.0" x="408.0" y="134.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_249" bpmnElement="ExclusiveGateway_isVolGrpnamePresent" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="589.0" y="148.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="186.0" x="521.0" y="203.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="ScriptTask_buildError">
+ <dc:Bounds height="80.0" width="100.0" x="565.0" y="264.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_36" bpmnElement="CallActivity_doCreateVfModuleVolumeV1">
+ <dc:Bounds height="80.0" width="100.0" x="996.0" y="134.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_volGrpNamePresent" sourceElement="_BPMNShape_ExclusiveGateway_249" targetElement="_BPMNShape_CallActivity_51">
+ <di:waypoint xsi:type="dc:Point" x="639.0" y="173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="685.0" y="173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="685.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="720.0" y="174.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="680.0" y="173.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="508.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="589.0" y="173.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="547.0" y="173.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="352.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="408.0" y="174.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="371.0" y="174.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="614.0" y="198.0"/>
+ <di:waypoint xsi:type="dc:Point" x="615.0" y="264.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="612.0" y="234.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="598.0" y="389.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="616.0" y="430.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="615.0" y="344.0"/>
+ <di:waypoint xsi:type="dc:Point" x="616.0" y="389.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="613.0" y="370.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="1898.0" y="156.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1916.0" y="197.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_exceptionHandler" isExpanded="true">
+ <dc:Bounds height="337.0" width="856.0" x="133.0" y="471.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_catchErrors">
+ <dc:Bounds height="36.0" width="36.0" x="204.0" y="555.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="109.0" x="168.0" y="596.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="876.0" y="555.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="924.0" y="562.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_304" bpmnElement="ScriptTask_prepareDbInfraRequest">
+ <dc:Bounds height="80.0" width="100.0" x="1160.0" y="134.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_callDbInfraUpdate">
+ <dc:Bounds height="80.0" width="100.0" x="1298.0" y="135.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="ScriptTask_postCompletionRequest">
+ <dc:Bounds height="80.0" width="100.0" x="1442.0" y="136.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_37" bpmnElement="CallActivity_completeMsoProcess">
+ <dc:Bounds height="80.0" width="100.0" x="1598.0" y="135.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_36" targetElement="_BPMNShape_ScriptTask_304">
+ <di:waypoint xsi:type="dc:Point" x="1096.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1160.0" y="174.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1115.0" y="174.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_304" targetElement="_BPMNShape_ServiceTask_103">
+ <di:waypoint xsi:type="dc:Point" x="1260.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1298.0" y="175.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1374.0" y="175.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="1398.0" y="175.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1442.0" y="176.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1417.0" y="176.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="1542.0" y="176.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1598.0" y="175.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1653.0" y="176.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="ScriptTask_setSuccessIndicator">
+ <dc:Bounds height="80.0" width="100.0" x="1742.0" y="134.0"/>
+ </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="1698.0" y="175.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1742.0" y="174.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1767.0" y="174.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="1842.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1866.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1866.0" y="175.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1898.0" y="174.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1963.0" y="175.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ExclusiveGateway_251">
+ <di:waypoint xsi:type="dc:Point" x="240.0" y="573.0"/>
+ <di:waypoint xsi:type="dc:Point" x="286.0" y="573.0"/>
+ <di:waypoint xsi:type="dc:Point" x="286.0" y="572.0"/>
+ <di:waypoint xsi:type="dc:Point" x="348.0" y="572.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="286.0" y="572.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="ScriptTask_prefalloutHandlerRequest">
+ <dc:Bounds height="80.0" width="100.0" x="576.0" y="533.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_50" bpmnElement="CallActivity_callFalloutHandler">
+ <dc:Bounds height="80.0" width="100.0" x="720.0" y="533.0"/>
+ </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="676.0" y="573.0"/>
+ <di:waypoint xsi:type="dc:Point" x="720.0" y="573.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="694.0" y="573.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="820.0" y="573.0"/>
+ <di:waypoint xsi:type="dc:Point" x="876.0" y="573.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="842.0" y="573.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_251" bpmnElement="ExclusiveGateway_isSyncResponseSent" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="348.0" y="547.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="129.0" x="309.0" y="602.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_syncResponseSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_307">
+ <di:waypoint xsi:type="dc:Point" x="398.0" y="572.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="572.0"/>
+ <di:waypoint xsi:type="dc:Point" x="493.0" y="573.0"/>
+ <di:waypoint xsi:type="dc:Point" x="576.0" y="573.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="450.0" y="572.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="ScriptTask_sendSyncErrorResp">
+ <dc:Bounds height="80.0" width="100.0" x="324.0" y="672.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_syncResponseNotSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_308">
+ <di:waypoint xsi:type="dc:Point" x="373.0" y="597.0"/>
+ <di:waypoint xsi:type="dc:Point" x="373.0" y="634.0"/>
+ <di:waypoint xsi:type="dc:Point" x="374.0" y="634.0"/>
+ <di:waypoint xsi:type="dc:Point" x="374.0" y="672.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="363.0" y="634.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_ScriptTask_307">
+ <di:waypoint xsi:type="dc:Point" x="424.0" y="712.0"/>
+ <di:waypoint xsi:type="dc:Point" x="608.0" y="712.0"/>
+ <di:waypoint xsi:type="dc:Point" x="626.0" y="712.0"/>
+ <di:waypoint xsi:type="dc:Point" x="626.0" y="613.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="530.0" y="712.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_51" bpmnElement="CallActivity_callGenericGetSI">
+ <dc:Bounds height="80.0" width="100.0" x="720.0" y="134.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="887.0" y="148.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="912.0" y="203.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_51" targetElement="_BPMNShape_ExclusiveGateway_254">
+ <di:waypoint xsi:type="dc:Point" x="820.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="853.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="853.0" y="173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="887.0" y="173.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_serviceInstanceFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_CallActivity_36">
+ <di:waypoint xsi:type="dc:Point" x="937.0" y="173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="966.0" y="173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="966.0" y="174.0"/>
+ <di:waypoint xsi:type="dc:Point" x="996.0" y="174.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_serviceInstanceNotFound">
+ <dc:Bounds height="36.0" width="36.0" x="895.0" y="389.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="913.0" y="430.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_serviceInstanceNotFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ScriptTask_312">
+ <di:waypoint xsi:type="dc:Point" x="912.0" y="198.0"/>
+ <di:waypoint xsi:type="dc:Point" x="912.0" y="264.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="919.0" y="226.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="ScriptTask_buildServiceInstanceNotFoundError">
+ <dc:Bounds height="80.0" width="100.0" x="862.0" y="264.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_312" targetElement="_BPMNShape_EndEvent_237">
+ <di:waypoint xsi:type="dc:Point" x="912.0" y="344.0"/>
+ <di:waypoint xsi:type="dc:Point" x="913.0" y="389.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="910.0" y="370.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn
new file mode 100644
index 0000000000..e8d27b6014
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVnfInfra.bpmn
@@ -0,0 +1,284 @@
+<?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="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.openecomp.mso.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.openecomp.mso.bpmn.infrastructure.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendResponse" targetRef="CreateVNF" />
+ <bpmn2:callActivity id="CreateVNF" name="Create VNF" calledElement="DoCreateVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="CREVI_requestId" target="requestId" />
+ <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_cloudConfiguration" target="cloudConfiguration" />
+ <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" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0lso26t</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.openecomp.mso.bpmn.infrastructure.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;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.openecomp.mso.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.openecomp.mso.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_0lso26t</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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;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_0lso26t" sourceRef="CreateVNF" targetRef="postProcess" />
+ </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="360" 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="360" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="347" y="240" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="CreateVNF">
+ <dc:Bounds x="504" 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="460" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="485" y="240" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
+ <dc:Bounds x="985" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1003" y="263" width="0" 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="663" 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="763" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="816" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="790" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_69" bpmnElement="callCompletionHandler">
+ <dc:Bounds x="816" 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="916" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="985" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="951" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lso26t_di" bpmnElement="SequenceFlow_0lso26t">
+ <di:waypoint xsi:type="dc:Point" x="604" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="663" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="634" y="215" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.bpmn
new file mode 100644
index 0000000000..4488e8de1c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DelServiceInstance.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="DelServiceInstance" name="DelServiceInstance" 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.openecomp.mso.bpmn.infrastructure.scripts.utils.*
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi= new DelServiceInstance()
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+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.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new DelServiceInstance()
+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="DelServiceInstance">
+ <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>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn
new file mode 100644
index 0000000000..eeb32599d3
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteGenericMacroServiceNetworkVnf.bpmn
@@ -0,0 +1,771 @@
+<?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="DeleteGenericMacroServiceNetworkVnf" name="DeleteGenericMacroServiceNetworkVnf" 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.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" />
+ <bpmn2:startEvent id="createVIPR_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVIPR_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.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.preProcessRequest(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vIPR-ATM">
+ <bpmn2:outgoing>SequenceFlow_10o22u2</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vIPR-ATM" />
+ </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.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.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="DELVAS_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("DeleteGenericMacroServiceNetworkVnfSuccessIndicator", true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="DeleteVIPR_EndEvent" />
+ <bpmn2:endEvent id="DeleteVIPR_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.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.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="doDeleteNetworkInstance_CallActivity" name="DoDelete&#10;Network&#10;Instance" calledElement="DoDeleteNetworkInstance">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
+ <camunda:in source="tenantId" target="tenantId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rollbackData" target="DELNWKI_rollbackData" />
+ <camunda:out source="rolledBack" target="DELNWKI_rolledBack" />
+ <camunda:out source="wasDeleted" target="wasDeleted" />
+ <camunda:in source="networkId" target="networkId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1bwbn7r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12ag2bk</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_PrepareNetworkDelete" name="Prepare for Network Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0cmebdc</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0dfkfh1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1bwbn7r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.prepareNetworkDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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:callActivity id="doDeleteVNFandModules_CallActivity" 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="vnftId" target="vnftId" />
+ <camunda:in source="sdncVersion" target="sdncVersion" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1h77psn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1dmn40p</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_3" name="Prepare to Delete VNF" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0bvecvm</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0mr8jgt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1h77psn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.prepareVnfAndModulesDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_4" name="GoToStartNetworks">
+ <bpmn2:incoming>SequenceFlow_0xowenu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition id="_LinkEventDefinition_41" name="StartNetworks" />
+ </bpmn2:intermediateThrowEvent>
+ <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="DELVAS_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.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.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:sequenceFlow id="SequenceFlow_1bwbn7r" sourceRef="ScriptTask_PrepareNetworkDelete" targetRef="doDeleteNetworkInstance_CallActivity" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1n7r495" name="No" sourceRef="ExclusiveGateway_0fe690i" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1h77psn" sourceRef="ScriptTask_3" targetRef="doDeleteVNFandModules_CallActivity" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1nh09nr" name="StartNetworks">
+ <bpmn2:outgoing>SequenceFlow_1vwssu7</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartNetworks" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo FinishProcess">
+ <bpmn2:incoming>SequenceFlow_04ao07f</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="FinishProcess" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0b9wd4f" name="Delete Network(s)?" default="SequenceFlow_1f26zbk">
+ <bpmn2:incoming>SequenceFlow_1vwssu7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0cmebdc</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1f26zbk</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0fe690i" name="Delete Additional Networks?" default="SequenceFlow_1n7r495">
+ <bpmn2:incoming>SequenceFlow_04vlq8r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1n7r495</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0dfkfh1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0dfkfh1" name="Yes" sourceRef="ExclusiveGateway_0fe690i" targetRef="ScriptTask_PrepareNetworkDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_networksDeletedCount") < execution.getVariable("DELVAS_networksCount")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0cmebdc" name="Yes" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ScriptTask_PrepareNetworkDelete">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_networksCount") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1os8cm5">
+ <bpmn2:incoming>SequenceFlow_1n7r495</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1f26zbk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1j7n6qx</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1f26zbk" name="No" sourceRef="ExclusiveGateway_0b9wd4f" targetRef="ExclusiveGateway_1os8cm5" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0nreq15" name="GoTo vIPR-ATM">
+ <bpmn2:incoming>SequenceFlow_1j7n6qx</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="vIPR-ATM" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vwssu7" sourceRef="IntermediateCatchEvent_1nh09nr" targetRef="ExclusiveGateway_0b9wd4f" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1j7n6qx" sourceRef="ExclusiveGateway_1os8cm5" targetRef="IntermediateThrowEvent_0nreq15" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0rlqdvq" name="StartVnfs">
+ <bpmn2:outgoing>SequenceFlow_10tbv62</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1nlocis" name="Delete VNF?" default="SequenceFlow_0w7328u">
+ <bpmn2:incoming>SequenceFlow_10tbv62</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0bvecvm</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0w7328u</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_04q1qud">
+ <bpmn2:incoming>SequenceFlow_0w7328u</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1wc8h5g</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xowenu</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10tbv62" sourceRef="IntermediateCatchEvent_0rlqdvq" targetRef="ExclusiveGateway_1nlocis" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0bvecvm" name="Yes" sourceRef="ExclusiveGateway_1nlocis" targetRef="ScriptTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_vnfsCount") > 0}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0w7328u" name="No" sourceRef="ExclusiveGateway_1nlocis" targetRef="ExclusiveGateway_04q1qud" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xowenu" sourceRef="ExclusiveGateway_04q1qud" targetRef="IntermediateThrowEvent_4" />
+ <bpmn2:scriptTask id="ScriptTask_04o8gb3" name="Validate Network Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12ag2bk</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_04vlq8r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.validateNetworkDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_12ag2bk" sourceRef="doDeleteNetworkInstance_CallActivity" targetRef="ScriptTask_04o8gb3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_04vlq8r" sourceRef="ScriptTask_04o8gb3" targetRef="ExclusiveGateway_0fe690i" />
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf = new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.prepareServiceInstanceDelete(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="GoToStartVnfs">
+ <bpmn2:incoming>SequenceFlow_18103ca</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartVnfs" />
+ </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:scriptTask id="ScriptTask_1ildy3f" name="Validate VNF delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1dmn40p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0g2cw86</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def DeleteGenericMacroServiceNetworkVnf= new DeleteGenericMacroServiceNetworkVnf()
+DeleteGenericMacroServiceNetworkVnf.validateVnfDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1uds6yu" name="Delete Additional VNFs?" default="SequenceFlow_1wc8h5g">
+ <bpmn2:incoming>SequenceFlow_0g2cw86</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0mr8jgt</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1wc8h5g</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dmn40p" sourceRef="doDeleteVNFandModules_CallActivity" targetRef="ScriptTask_1ildy3f" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0g2cw86" sourceRef="ScriptTask_1ildy3f" targetRef="ExclusiveGateway_1uds6yu" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0mr8jgt" name="Yes" sourceRef="ExclusiveGateway_1uds6yu" targetRef="ScriptTask_3">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVAS_vnfsDeletedCountt") < execution.getVariable("DELVAS_vnfsCount")}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1wc8h5g" name="No" sourceRef="ExclusiveGateway_1uds6yu" targetRef="ExclusiveGateway_04q1qud" />
+ </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="DeleteGenericMacroServiceNetworkVnf">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVIPR_startEvent">
+ <dc:Bounds x="96" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="82" y="131" width="65" height="22" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds x="285" y="68" 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="108" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="171" y="108" width="6" height="6" />
+ </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="108" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="69" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds x="476" y="68" 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="DeleteVIPR_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="108" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="108" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="652" y="93" 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_CallActivity_76" bpmnElement="doDeleteNetworkInstance_CallActivity">
+ <dc:Bounds x="555" y="722" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <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_51" bpmnElement="IntermediateThrowEvent_4">
+ <dc:Bounds x="1036" y="524" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1011" y="565" width="85" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_341" bpmnElement="ScriptTask_PrepareNetworkDelete">
+ <dc:Bounds x="413" y="719" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_342" bpmnElement="ScriptTask_3">
+ <dc:Bounds x="413" y="435" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_81" bpmnElement="doDeleteVNFandModules_CallActivity">
+ <dc:Bounds x="555" y="435" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="728" y="90" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="703" y="131" width="86" height="26" />
+ </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:BPMNEdge id="SequenceFlow_1bwbn7r_di" bpmnElement="SequenceFlow_1bwbn7r">
+ <di:waypoint xsi:type="dc:Point" x="513" y="761" />
+ <di:waypoint xsi:type="dc:Point" x="555" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="534" y="746" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7r495_di" bpmnElement="SequenceFlow_1n7r495">
+ <di:waypoint xsi:type="dc:Point" x="891" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="792" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="908" y="747" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h77psn_di" bpmnElement="SequenceFlow_1h77psn">
+ <di:waypoint xsi:type="dc:Point" x="513" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="555" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="534" y="460" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_1nh09nr_di" bpmnElement="IntermediateCatchEvent_1nh09nr">
+ <dc:Bounds x="96" y="786" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="822" width="68" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <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="ExclusiveGateway_0b9wd4f_di" bpmnElement="ExclusiveGateway_0b9wd4f" isMarkerVisible="true">
+ <dc:Bounds x="345" y="779" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="408" y="811" width="57" height="26" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0fe690i_di" bpmnElement="ExclusiveGateway_0fe690i" isMarkerVisible="true">
+ <dc:Bounds x="841" y="737" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="795" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dfkfh1_di" bpmnElement="SequenceFlow_0dfkfh1">
+ <di:waypoint xsi:type="dc:Point" x="866" y="737" />
+ <di:waypoint xsi:type="dc:Point" x="866" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="657" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="717" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="657" y="642" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cmebdc_di" bpmnElement="SequenceFlow_0cmebdc">
+ <di:waypoint xsi:type="dc:Point" x="370" y="779" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="759" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="759" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="375" y="769" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1os8cm5_di" bpmnElement="ExclusiveGateway_1os8cm5" isMarkerVisible="true">
+ <dc:Bounds x="911" y="792" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="936" y="847" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f26zbk_di" bpmnElement="SequenceFlow_1f26zbk">
+ <di:waypoint xsi:type="dc:Point" x="370" y="829" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="896" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="896" />
+ <di:waypoint xsi:type="dc:Point" x="936" y="842" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="646" y="881" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0nreq15_di" bpmnElement="IntermediateThrowEvent_0nreq15">
+ <dc:Bounds x="1046" y="799" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1024" y="840" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vwssu7_di" bpmnElement="SequenceFlow_1vwssu7">
+ <di:waypoint xsi:type="dc:Point" x="132" y="804" />
+ <di:waypoint xsi:type="dc:Point" x="345" y="804" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="239" y="789" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j7n6qx_di" bpmnElement="SequenceFlow_1j7n6qx">
+ <di:waypoint xsi:type="dc:Point" x="961" y="817" />
+ <di:waypoint xsi:type="dc:Point" x="1046" y="817" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1004" y="792" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0rlqdvq_di" bpmnElement="IntermediateCatchEvent_0rlqdvq">
+ <dc:Bounds x="86" y="540" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="80" y="576" width="45" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1nlocis_di" bpmnElement="ExclusiveGateway_1nlocis" isMarkerVisible="true">
+ <dc:Bounds x="335" y="533" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="395" y="565" width="62" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_04q1qud_di" bpmnElement="ExclusiveGateway_04q1qud" isMarkerVisible="true">
+ <dc:Bounds x="901" y="517" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="926" y="572" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10tbv62_di" bpmnElement="SequenceFlow_10tbv62">
+ <di:waypoint xsi:type="dc:Point" x="122" y="558" />
+ <di:waypoint xsi:type="dc:Point" x="335" y="558" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="229" y="533" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bvecvm_di" bpmnElement="SequenceFlow_0bvecvm">
+ <di:waypoint xsi:type="dc:Point" x="360" y="533" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="494" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0w7328u_di" bpmnElement="SequenceFlow_0w7328u">
+ <di:waypoint xsi:type="dc:Point" x="360" y="584" />
+ <di:waypoint xsi:type="dc:Point" x="360" y="607" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="607" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="568" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="583" width="14" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xowenu_di" bpmnElement="SequenceFlow_0xowenu">
+ <di:waypoint xsi:type="dc:Point" x="951" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="1036" y="542" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="994" y="517" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_04o8gb3_di" bpmnElement="ScriptTask_04o8gb3">
+ <dc:Bounds x="699" y="722" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ag2bk_di" bpmnElement="SequenceFlow_12ag2bk">
+ <di:waypoint xsi:type="dc:Point" x="655" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="699" y="762" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="677" y="737" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04vlq8r_di" bpmnElement="SequenceFlow_04vlq8r">
+ <di:waypoint xsi:type="dc:Point" x="799" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="820" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="820" y="762" />
+ <di:waypoint xsi:type="dc:Point" x="841" y="762" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="835" y="762" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0nmoax4_di" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="285" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_05m3m2e_di" bpmnElement="ScriptTask_05m3m2e">
+ <dc:Bounds x="476" y="223" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_112zjtp_di" bpmnElement="IntermediateCatchEvent_112zjtp">
+ <dc:Bounds x="96" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="72" y="281" width="82" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_162gs5w_di" bpmnElement="IntermediateThrowEvent_162gs5w">
+ <dc:Bounds x="732" y="245" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="713" y="286" width="72" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jek18q_di" bpmnElement="SequenceFlow_0jek18q">
+ <di:waypoint xsi:type="dc:Point" x="132" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="285" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="209" y="248" 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="263" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="654" y="248" 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="263" />
+ <di:waypoint xsi:type="dc:Point" x="422" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="422" y="263" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="263" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="437" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ildy3f_di" bpmnElement="ScriptTask_1ildy3f">
+ <dc:Bounds x="687" y="435" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1uds6yu_di" bpmnElement="ExclusiveGateway_1uds6yu" isMarkerVisible="true">
+ <dc:Bounds x="828" y="450" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="797" y="508" width="80" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dmn40p_di" bpmnElement="SequenceFlow_1dmn40p">
+ <di:waypoint xsi:type="dc:Point" x="655" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="671" y="450" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g2cw86_di" bpmnElement="SequenceFlow_0g2cw86">
+ <di:waypoint xsi:type="dc:Point" x="787" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="828" y="475" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="808" y="460" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mr8jgt_di" bpmnElement="SequenceFlow_0mr8jgt">
+ <di:waypoint xsi:type="dc:Point" x="853" y="453" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="364" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="364" />
+ <di:waypoint xsi:type="dc:Point" x="463" y="435" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="649" y="349" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wc8h5g_di" bpmnElement="SequenceFlow_1wc8h5g">
+ <di:waypoint xsi:type="dc:Point" x="878" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="926" y="517" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="895" y="460" width="14" height="12" />
+ </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:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn
new file mode 100644
index 0000000000..951ae3c0b5
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn
@@ -0,0 +1,371 @@
+<?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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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">${URN_mso_adapters_db_endpoint}</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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn
index d30042c4f6..04369acba0 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn
@@ -1,324 +1,329 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_F0omAMXGEeW834CKd-K10Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <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 com.att.bpm.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 com.att.bpm.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 com.att.bpm.scripts.*
-def dvfm = new DeleteVfModuleInfra()
-dvfm.prepDoDeleteVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:callActivity id="ScriptTask_6" name="DoDeleteVfModule" calledElement="DoDeleteVfModule">
- <bpmn2:extensionElements>
- <camunda:in source="DeleteVfModuleRequest" target="DoDeleteVfModuleRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:in source="isVidRequest" target="isVidRequest"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- </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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.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:connectorId>soap-http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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: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: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 com.att.bpm.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 com.att.bpm.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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" camunda:asyncAfter="true" 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" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="144.0" y="72.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="145.0" y="113.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="605.0" y="370.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="598.0" y="411.0"/>
- </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.0" y="90.0"/>
- <di:waypoint xsi:type="dc:Point" x="299.0" y="90.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="230.0" y="90.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="299.0" y="50.0"/>
- </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.0" y="90.0"/>
- <di:waypoint xsi:type="dc:Point" x="449.0" y="90.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="433.0" y="90.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="449.0" y="50.0"/>
- </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.0" y="130.0"/>
- <di:waypoint xsi:type="dc:Point" x="498.0" y="160.0"/>
- <di:waypoint xsi:type="dc:Point" x="199.0" y="160.0"/>
- <di:waypoint xsi:type="dc:Point" x="199.0" y="190.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="717.0" y="169.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
- <dc:Bounds height="80.0" width="100.0" x="449.0" y="348.0"/>
- </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.0" y="388.0"/>
- <di:waypoint xsi:type="dc:Point" x="605.0" y="388.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="723.0" y="186.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">
- <dc:Bounds height="80.0" width="100.0" x="149.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
- <dc:Bounds height="80.0" width="100.0" x="149.0" y="348.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
- <dc:Bounds height="80.0" width="100.0" x="299.0" y="348.0"/>
- </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.0" y="388.0"/>
- <di:waypoint xsi:type="dc:Point" x="299.0" y="388.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="271.0" y="394.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds height="241.0" width="565.0" x="65.0" y="536.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="129.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="98.0" x="98.0" y="671.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
- <dc:Bounds height="80.0" width="100.0" x="209.0" y="608.0"/>
- </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.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="209.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="209.0" y="948.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="309.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="377.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="325.0" y="648.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="533.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="551.0" y="671.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="612.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="627.0" y="671.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="704.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="722.0" y="671.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.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="704.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="693.0" y="948.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
- <dc:Bounds height="80.0" width="100.0" x="377.0" y="608.0"/>
- </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.0" y="388.0"/>
- <di:waypoint xsi:type="dc:Point" x="449.0" y="388.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="439.0" y="356.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="477.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="533.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="373.0" y="456.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
- <dc:Bounds height="80.0" width="100.0" x="299.0" y="190.0"/>
- </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.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="299.0" y="230.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_182" bpmnElement="ScriptTask_5">
- <dc:Bounds height="80.0" width="100.0" x="453.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_183" bpmnElement="ScriptTask_8">
- <dc:Bounds height="80.0" width="100.0" x="598.0" y="190.0"/>
- </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.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="453.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="613.0" y="314.0"/>
- </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.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="598.0" y="230.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="575.0" y="230.0"/>
- </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.0" y="270.0"/>
- <di:waypoint xsi:type="dc:Point" x="647.0" y="304.0"/>
- <di:waypoint xsi:type="dc:Point" x="199.0" y="304.0"/>
- <di:waypoint xsi:type="dc:Point" x="199.0" y="348.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="345.0" y="280.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
+<?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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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" />
+ </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.openecomp.mso.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">${URN_mso_adapters_db_endpoint}</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: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.openecomp.mso.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.openecomp.mso.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/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn
index 49392553a7..d0051de976 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn
@@ -1,567 +1,567 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <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 com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <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.openecomp.mso.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" camunda:asyncAfter="true" 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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.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>
+ </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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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: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: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 com.att.bpm.scripts.*
+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:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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: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: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.openecomp.mso.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" errorCode="java.lang.Exception" name="java.lang.Exception"/>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleVolumeInfraV1">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
- <dc:Bounds height="36.0" width="36.0" x="103.0" y="94.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="65.0" x="89.0" y="135.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="355.0" y="72.0"/>
- </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.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="355.0" y="112.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="116.0" y="12.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
- <dc:Bounds height="80.0" width="100.0" x="864.0" y="72.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="438.0" y="360.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="985.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
- <dc:Bounds height="337.0" width="660.0" x="37.0" y="288.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
- <dc:Bounds height="36.0" width="36.0" x="60.0" y="383.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="67.0" x="45.0" y="424.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="288.0" y="360.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="877.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="660.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="769.0"/>
- </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.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="496.0" y="112.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="486.0" y="112.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="496.0" y="72.0"/>
- </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.0" y="401.0"/>
- <di:waypoint xsi:type="dc:Point" x="118.0" y="401.0"/>
- <di:waypoint xsi:type="dc:Point" x="118.0" y="400.0"/>
- <di:waypoint xsi:type="dc:Point" x="144.0" y="400.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="99.0" y="401.0"/>
- </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.0" y="400.0"/>
- <di:waypoint xsi:type="dc:Point" x="438.0" y="400.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="413.0" y="400.0"/>
- </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.0" y="849.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="877.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1258.0" y="857.0"/>
- </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.0" y="957.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="985.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1289.0" y="898.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTDeleteVolGrpId_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="528.0"/>
- </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.0" y="608.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="660.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1291.0" y="557.0"/>
- </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.0" y="740.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="769.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1258.0" y="751.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_22" bpmnElement="callVnfAdapterDeleteSubflow_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="300.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="prepareVnfAdapterDelete_ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="180.0"/>
- </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.0" y="260.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="300.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1112.0" y="280.0"/>
- </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.0" y="380.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="401.0"/>
- <di:waypoint xsi:type="dc:Point" x="1042.0" y="401.0"/>
- <di:waypoint xsi:type="dc:Point" x="1042.0" y="422.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1039.0" y="415.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="588.0" y="382.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="606.0" y="423.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.0" y="400.0"/>
- <di:waypoint xsi:type="dc:Point" x="588.0" y="400.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="558.0" y="400.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_167" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1025.0" y="1201.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1029.0" y="1242.0"/>
- </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.0" y="1065.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="1093.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1258.0" y="1083.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_4">
- <dc:Bounds height="80.0" width="100.0" x="120.0" y="492.0"/>
- </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.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="623.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="623.0" y="115.0"/>
- <di:waypoint xsi:type="dc:Point" x="636.0" y="115.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="613.0" y="112.0"/>
- </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.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="1017.0" y="111.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1067.0" y="113.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_203" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1017.0" y="86.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="102.0" x="984.0" y="60.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_240" bpmnElement="ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="1104.0" y="72.0"/>
- </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.0" y="136.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="180.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1040.0" y="122.0"/>
- </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.0" y="111.0"/>
- <di:waypoint xsi:type="dc:Point" x="1085.0" y="111.0"/>
- <di:waypoint xsi:type="dc:Point" x="1085.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="1104.0" y="112.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1216.0" y="113.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="1242.0" y="95.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1260.0" y="136.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.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="1222.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="1222.0" y="113.0"/>
- <di:waypoint xsi:type="dc:Point" x="1242.0" y="113.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1220.0" y="113.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="ScriptTask_3">
- <dc:Bounds height="80.0" width="100.0" x="993.0" y="1093.0"/>
- </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.0" y="1173.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="1201.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1040.0" y="1320.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="ScriptTask_callRestCloudRegion">
- <dc:Bounds height="80.0" width="100.0" x="636.0" y="75.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="774.0" y="89.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="125.0" x="735.0" y="40.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="781.0" y="170.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="799.0" y="211.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.0" y="139.0"/>
- <di:waypoint xsi:type="dc:Point" x="798.0" y="153.0"/>
- <di:waypoint xsi:type="dc:Point" x="799.0" y="153.0"/>
- <di:waypoint xsi:type="dc:Point" x="799.0" y="170.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="796.0" y="166.0"/>
- </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.0" y="115.0"/>
- <di:waypoint xsi:type="dc:Point" x="754.0" y="115.0"/>
- <di:waypoint xsi:type="dc:Point" x="754.0" y="114.0"/>
- <di:waypoint xsi:type="dc:Point" x="774.0" y="114.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="752.0" y="114.0"/>
- </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.0" y="114.0"/>
- <di:waypoint xsi:type="dc:Point" x="844.0" y="114.0"/>
- <di:waypoint xsi:type="dc:Point" x="844.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="864.0" y="112.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="841.0" y="113.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1017.0" y="422.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="164.0" x="960.0" y="477.0"/>
- </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.0" y="472.0"/>
- <di:waypoint xsi:type="dc:Point" x="1043.0" y="528.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1040.0" y="500.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_6">
- <dc:Bounds height="36.0" width="36.0" x="1168.0" y="430.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1186.0" y="471.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.0" y="447.0"/>
- <di:waypoint xsi:type="dc:Point" x="1117.0" y="447.0"/>
- <di:waypoint xsi:type="dc:Point" x="1117.0" y="448.0"/>
- <di:waypoint xsi:type="dc:Point" x="1168.0" y="448.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_synResponseSent" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="144.0" y="375.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="129.0" x="106.0" y="439.0"/>
- </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.0" y="425.0"/>
- <di:waypoint xsi:type="dc:Point" x="169.0" y="458.0"/>
- <di:waypoint xsi:type="dc:Point" x="170.0" y="458.0"/>
- <di:waypoint xsi:type="dc:Point" x="170.0" y="492.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="159.0" y="458.0"/>
- </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.0" y="400.0"/>
- <di:waypoint xsi:type="dc:Point" x="288.0" y="400.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="204.0" y="400.0"/>
- </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.0" y="532.0"/>
- <di:waypoint xsi:type="dc:Point" x="254.0" y="532.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="532.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="508.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="482.0"/>
- <di:waypoint xsi:type="dc:Point" x="337.0" y="440.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="317.0" y="532.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+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" errorCode="java.lang.Exception" name="java.lang.Exception"/>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
+ <dc:Bounds height="36.0" width="36.0" x="103.0" y="94.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="65.0" x="89.0" y="135.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="355.0" y="72.0"/>
+ </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.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="355.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="116.0" y="12.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="864.0" y="72.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="438.0" y="360.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="985.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds height="337.0" width="660.0" x="37.0" y="288.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds height="36.0" width="36.0" x="60.0" y="383.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="67.0" x="45.0" y="424.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="288.0" y="360.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="877.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="660.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="769.0"/>
+ </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.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="496.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="486.0" y="112.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="496.0" y="72.0"/>
+ </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.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="118.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="118.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="144.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="99.0" y="401.0"/>
+ </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.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="438.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="413.0" y="400.0"/>
+ </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.0" y="849.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="877.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1258.0" y="857.0"/>
+ </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.0" y="957.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="985.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1289.0" y="898.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTDeleteVolGrpId_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="528.0"/>
+ </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.0" y="608.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="660.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1291.0" y="557.0"/>
+ </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.0" y="740.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="769.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1258.0" y="751.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_22" bpmnElement="callVnfAdapterDeleteSubflow_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="300.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="prepareVnfAdapterDelete_ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="180.0"/>
+ </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.0" y="260.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="300.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1112.0" y="280.0"/>
+ </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.0" y="380.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1042.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1042.0" y="422.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1039.0" y="415.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="588.0" y="382.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="606.0" y="423.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.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="588.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="558.0" y="400.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_167" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="1025.0" y="1201.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1029.0" y="1242.0"/>
+ </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.0" y="1065.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="1093.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1258.0" y="1083.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="100.0" x="120.0" y="492.0"/>
+ </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.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="623.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="623.0" y="115.0"/>
+ <di:waypoint xsi:type="dc:Point" x="636.0" y="115.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="613.0" y="112.0"/>
+ </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.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1017.0" y="111.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1067.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_203" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1017.0" y="86.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="102.0" x="984.0" y="60.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_240" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="1104.0" y="72.0"/>
+ </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.0" y="136.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="180.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1040.0" y="122.0"/>
+ </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.0" y="111.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1085.0" y="111.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1085.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1104.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1216.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="1242.0" y="95.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1260.0" y="136.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.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1222.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1222.0" y="113.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1242.0" y="113.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1220.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="100.0" x="993.0" y="1093.0"/>
+ </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.0" y="1173.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="1201.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1040.0" y="1320.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="ScriptTask_callRestCloudRegion">
+ <dc:Bounds height="80.0" width="100.0" x="636.0" y="75.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="774.0" y="89.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="125.0" x="735.0" y="40.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="781.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="799.0" y="211.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.0" y="139.0"/>
+ <di:waypoint xsi:type="dc:Point" x="798.0" y="153.0"/>
+ <di:waypoint xsi:type="dc:Point" x="799.0" y="153.0"/>
+ <di:waypoint xsi:type="dc:Point" x="799.0" y="170.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="796.0" y="166.0"/>
+ </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.0" y="115.0"/>
+ <di:waypoint xsi:type="dc:Point" x="754.0" y="115.0"/>
+ <di:waypoint xsi:type="dc:Point" x="754.0" y="114.0"/>
+ <di:waypoint xsi:type="dc:Point" x="774.0" y="114.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="752.0" y="114.0"/>
+ </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.0" y="114.0"/>
+ <di:waypoint xsi:type="dc:Point" x="844.0" y="114.0"/>
+ <di:waypoint xsi:type="dc:Point" x="844.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="864.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="841.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1017.0" y="422.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="164.0" x="960.0" y="477.0"/>
+ </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.0" y="472.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1043.0" y="528.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1040.0" y="500.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_6">
+ <dc:Bounds height="36.0" width="36.0" x="1168.0" y="430.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1186.0" y="471.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.0" y="447.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1117.0" y="447.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1117.0" y="448.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1168.0" y="448.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_synResponseSent" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="144.0" y="375.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="129.0" x="106.0" y="439.0"/>
+ </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.0" y="425.0"/>
+ <di:waypoint xsi:type="dc:Point" x="169.0" y="458.0"/>
+ <di:waypoint xsi:type="dc:Point" x="170.0" y="458.0"/>
+ <di:waypoint xsi:type="dc:Point" x="170.0" y="492.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="159.0" y="458.0"/>
+ </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.0" y="400.0"/>
+ <di:waypoint xsi:type="dc:Point" x="288.0" y="400.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="204.0" y="400.0"/>
+ </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.0" y="532.0"/>
+ <di:waypoint xsi:type="dc:Point" x="254.0" y="532.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="532.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="508.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="482.0"/>
+ <di:waypoint xsi:type="dc:Point" x="337.0" y="440.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="317.0" y="532.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVnfInfra.bpmn
new file mode 100644
index 0000000000..b5b10a0fda
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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="requestId" />
+ <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/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn
new file mode 100644
index 0000000000..a19e0c632b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.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="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><![CDATA[import org.openecomp.mso.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><![CDATA[import org.openecomp.mso.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><![CDATA[import org.openecomp.mso.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><![CDATA[import org.openecomp.mso.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 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.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstance = new UpdateNetworkInstance()
+UpdateNetworkInstance.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">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${UPDNI_createDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="UPDNI_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDNI_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.openecomp.mso.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_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="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><![CDATA[import org.openecomp.mso.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><![CDATA[import org.openecomp.mso.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="-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="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 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="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="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="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="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="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="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/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn
index 8a203d1f6f..f49149b709 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstanceInfra.bpmn
@@ -1,1014 +1,1014 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="UpdateNetworkInstanceInfra" name="UpdateNetworkInstanceInfra" isExecutable="true">
- <bpmn2:startEvent id="updateNetwork_startEvent" camunda:asyncAfter="true" 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 com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="UpdateNetworkInstanceInfra" name="UpdateNetworkInstanceInfra" 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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">
- <bpmn2:extensionElements>
- <camunda:in source="UPDNETI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_rollbackSDNCReturnCode"/>
- <camunda:out source="sdncAdapterResponse" target="UPDNETI_rollbackSDNCResponse"/>
- </bpmn2:extensionElements>
- </bpmn2:callActivity>
- <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" attachedToRef="callAssignSDNCAdapter_CallActivity">
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
- </bpmn2:boundaryEvent>
- <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign 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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 &amp; Completion Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.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="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDNETI_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="UPDNETI_rollbackSDNCReturnCode"/>
+ <camunda:out source="sdncAdapterResponse" target="UPDNETI_rollbackSDNCResponse"/>
+ </bpmn2:extensionElements>
+ </bpmn2:callActivity>
+ <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" attachedToRef="callAssignSDNCAdapter_CallActivity">
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign 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 &amp; Completion Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>
- <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
- <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow">
- <bpmn2:incoming>SequenceFlow_23</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="InclusiveGateway_6"/>
- <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="isRollbackOn_Network_ExclusiveGateway"/>
- <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="InclusiveGateway_6">
- <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="isNetworkOk_ExclusiveGateway"/>
- <bpmn2:exclusiveGateway id="isNetworkOk_ExclusiveGateway" name="is Network Ok?" default="isNetworkOk_No_SequenceFlow">
- <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:outgoing>isNetworkOk_No_SequenceFlow</bpmn2:outgoing>
- <bpmn2:outgoing>isNetworkOk_Yes_SequenceFlow</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="isNetworkOk_No_SequenceFlow" name="No" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway"/>
- <bpmn2:sequenceFlow id="isNetworkOk_Yes_SequenceFlow" name="Yes" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isNetworkRollbackNeeded") == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway">
- <bpmn2:incoming>isNetworkOk_No_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>isNetworkOk_Yes_SequenceFlow</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="validateRollbacksResponse_ScriptTask_2"/>
- <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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>
+ <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+ <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow">
+ <bpmn2:incoming>SequenceFlow_23</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="InclusiveGateway_6"/>
+ <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="isRollbackOn_Network_ExclusiveGateway"/>
+ <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="InclusiveGateway_6">
+ <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="isNetworkOk_ExclusiveGateway"/>
+ <bpmn2:exclusiveGateway id="isNetworkOk_ExclusiveGateway" name="is Network Ok?" default="isNetworkOk_No_SequenceFlow">
+ <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:outgoing>isNetworkOk_No_SequenceFlow</bpmn2:outgoing>
+ <bpmn2:outgoing>isNetworkOk_Yes_SequenceFlow</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="isNetworkOk_No_SequenceFlow" name="No" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway"/>
+ <bpmn2:sequenceFlow id="isNetworkOk_Yes_SequenceFlow" name="Yes" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isNetworkRollbackNeeded") == true}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway">
+ <bpmn2:incoming>isNetworkOk_No_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isNetworkOk_Yes_SequenceFlow</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="validateRollbacksResponse_ScriptTask_2"/>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent"/>
- <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">
- <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2"/>
- <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent"/>
+ <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">
+ <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2"/>
+ <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>
- <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="UPDNETI_updateDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>
- <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
- <bpmn2:extensionElements>
- <camunda:in variables="all"/>
- <camunda:out variables="all"/>
- <camunda:in source="UPDNETI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_18</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="validateRollbacksResponse_ScriptTask_2" name="Validate Rollback Responses" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>
- <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>
+ <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="UPDNETI_updateDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ </camunda:connector>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>
+ <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all"/>
+ <camunda:out variables="all"/>
+ <camunda:in source="UPDNETI_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_18</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>
+ <bpmn2:endEvent id="EndEvent_4">
+ <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="validateRollbacksResponse_ScriptTask_2" name="Validate Rollback Responses" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>
+ <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.validateRollbackResponses(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="validateRollbacksResponse_ScriptTask_2" targetRef="InclusiveGateway_6"/>
- <bpmn2:inclusiveGateway id="InclusiveGateway_6">
- <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>
- <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.validateRollbackResponses(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="validateRollbacksResponse_ScriptTask_2" targetRef="InclusiveGateway_6"/>
+ <bpmn2:inclusiveGateway id="InclusiveGateway_6">
+ <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>
+ </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>
+ <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def buildErrorResponse = new UpdateNetworkInstanceInfra()
buildErrorResponse.buildErrorResponse(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>
- </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 com.att.bpm.scripts.*
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>
+ </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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>
- <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>
+ <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
UpdateNetworkInstanceInfra.prepareDBRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
- <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
- <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="UPDNETI_createDBResponse">${response}</camunda:outputParameter>
- <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- </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:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
- <bpmn2:extensionElements>
- <camunda:in variables="all"/>
- <camunda:out variables="all"/>
- <camunda:in source="UPDNETI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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_17</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_17</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 com.att.bpm.scripts.*
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
+ <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
+ <bpmn2:extensionElements>
+ <camunda:connector>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="UPDNETI_createDBResponse">${response}</camunda:outputParameter>
+ <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter>
+ </camunda:inputOutput>
+ </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:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+ <bpmn2:extensionElements>
+ <camunda:in variables="all"/>
+ <camunda:out variables="all"/>
+ <camunda:in source="UPDNETI_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_17</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_17</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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
UpdateNetworkInstanceInfra.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
- <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 com.att.bpm.scripts.*
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask"/>
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2"/>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>siFoundNo</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask"/>
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2"/>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>siFoundNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.*
ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2"/>
- <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&#xD;&#xA;Service&#xD;&#xA;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_28</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck"/>
- <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2"/>
+ <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&#xD;&#xA;Service&#xD;&#xA;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_28</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck"/>
+ <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/>
- <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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter>
- <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}/${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: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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.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:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}/${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: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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
-def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.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 com.att.bpm.scripts.*
+UpdateNetworkInstanceInfra.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.openecomp.mso.bpmn.infrastructure.scripts.*
def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
-UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask"/>
- <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/>
- </bpmn2:process>
- <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstanceInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent">
- <dc:Bounds height="36.0" width="36.0" x="192.0" y="185.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="193.0" y="226.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="350.0" y="163.0"/>
- </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="228.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="350.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="249.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1343.0" y="1311.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="996.0" y="806.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1176.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1343.0" y="276.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="137.0" y="1395.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
- <dc:Bounds height="567.0" width="1122.0" x="17.0" y="585.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
- <dc:Bounds height="36.0" width="36.0" x="48.0" y="1040.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="67.0" x="33.0" y="1081.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="756.0" y="806.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1523.0" y="520.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="125.0" x="1487.0" y="569.0"/>
- </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="1573.0" y="545.0"/>
- <di:waypoint xsi:type="dc:Point" x="1682.0" y="546.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1577.0" y="546.0"/>
- </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="1523.0" y="545.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="545.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="576.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1500.0" y="545.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="347.0" y="1392.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="792.0" y="1390.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
- <dc:Bounds height="80.0" width="100.0" x="564.0" y="1392.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
- <dc:Bounds height="36.0" width="36.0" x="1682.0" y="528.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="74.0" x="1663.0" y="569.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1341.0" y="395.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">
- <dc:Bounds height="36.0" width="36.0" x="1323.0" y="434.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="82.0" x="1280.0" y="474.0"/>
- </bpmndi:BPMNLabel>
- </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="1393.0" y="356.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="374.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="374.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="395.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1389.0" y="374.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="1441.0" y="435.0"/>
- <di:waypoint xsi:type="dc:Point" x="1499.0" y="435.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1473.0" y="435.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21">
- <di:waypoint xsi:type="dc:Point" x="1323.0" y="447.0"/>
- <di:waypoint xsi:type="dc:Point" x="1290.0" y="438.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
- <di:waypoint xsi:type="dc:Point" x="450.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="516.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="481.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="516.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">
- <di:waypoint xsi:type="dc:Point" x="84.0" y="1058.0"/>
- <di:waypoint xsi:type="dc:Point" x="131.0" y="1058.0"/>
- <di:waypoint xsi:type="dc:Point" x="131.0" y="1057.0"/>
- <di:waypoint xsi:type="dc:Point" x="161.0" y="1057.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="96.0" y="1058.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">
- <dc:Bounds height="36.0" width="36.0" x="470.0" y="867.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="96.0" x="440.0" y="906.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">
- <di:waypoint xsi:type="dc:Point" x="856.0" y="846.0"/>
- <di:waypoint xsi:type="dc:Point" x="996.0" y="846.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="881.0" y="846.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1499.0" y="395.0"/>
- </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="1549.0" y="475.0"/>
- <di:waypoint xsi:type="dc:Point" x="1549.0" y="492.0"/>
- <di:waypoint xsi:type="dc:Point" x="1548.0" y="492.0"/>
- <di:waypoint xsi:type="dc:Point" x="1548.0" y="520.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1545.0" y="503.0"/>
- </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="564.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="447.0" y="1432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="528.0" y="1432.0"/>
- </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="347.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="292.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="292.0" y="1435.0"/>
- <di:waypoint xsi:type="dc:Point" x="237.0" y="1435.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="290.0" y="1512.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">
- <dc:Bounds height="80.0" width="100.0" x="1190.0" y="384.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="984.0" y="100.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1176.0" y="1390.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="984.0" y="1392.0"/>
- </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.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="1084.0" y="1432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1143.0" y="1657.0"/>
- </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="792.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="691.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="691.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="664.0" y="1432.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="773.0" y="1430.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ScriptTask_83">
- <di:waypoint xsi:type="dc:Point" x="984.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="926.0" y="1432.0"/>
- <di:waypoint xsi:type="dc:Point" x="926.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="892.0" y="1430.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="947.0" y="1432.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1341.0" y="688.0"/>
- </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.0" y="768.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="810.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1388.0" y="781.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="1392.0" y="1256.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="1311.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1284.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1052.0"/>
- </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.0" y="1132.0"/>
- <di:waypoint xsi:type="dc:Point" x="1392.0" y="1176.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1389.0" y="1159.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="161.0" y="1032.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="98.0" x="138.0" y="1092.0"/>
- </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="186.0" y="1032.0"/>
- <di:waypoint xsi:type="dc:Point" x="186.0" y="1004.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="186.0" y="1020.0"/>
- </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="211.0" y="1057.0"/>
- <di:waypoint xsi:type="dc:Point" x="361.0" y="1057.0"/>
- <di:waypoint xsi:type="dc:Point" x="361.0" y="1004.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="211.0" y="1062.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1341.0" y="810.0"/>
- </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.0" y="890.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="926.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1388.0" y="900.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6">
- <dc:Bounds height="50.0" width="50.0" x="336.0" y="954.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="361.0" y="1009.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="161.0" y="954.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="60.0" x="88.0" y="969.0"/>
- </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="211.0" y="979.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="979.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="204.0" y="983.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_216">
- <di:waypoint xsi:type="dc:Point" x="186.0" y="954.0"/>
- <di:waypoint xsi:type="dc:Point" x="186.0" y="884.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="191.0" y="933.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="161.0" y="834.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="95.0" x="68.0" y="849.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_86" bpmnElement="isNetworkOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">
- <di:waypoint xsi:type="dc:Point" x="211.0" y="859.0"/>
- <di:waypoint xsi:type="dc:Point" x="273.0" y="859.0"/>
- <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="211.0" y="863.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_90" bpmnElement="isNetworkOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">
- <di:waypoint xsi:type="dc:Point" x="186.0" y="834.0"/>
- <di:waypoint xsi:type="dc:Point" x="186.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="192.0" y="814.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="336.0" y="756.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="78.0" x="323.0" y="722.0"/>
- </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="386.0" y="781.0"/>
- <di:waypoint xsi:type="dc:Point" x="438.0" y="781.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="386.0" y="779.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_262">
- <di:waypoint xsi:type="dc:Point" x="361.0" y="806.0"/>
- <di:waypoint xsi:type="dc:Point" x="362.0" y="845.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="366.0" y="806.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="169.0" y="1536.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="187.0" y="1577.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">
- <di:waypoint xsi:type="dc:Point" x="187.0" y="1475.0"/>
- <di:waypoint xsi:type="dc:Point" x="187.0" y="1536.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="184.0" y="1475.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1028.0" y="924.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1046.0" y="965.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">
- <di:waypoint xsi:type="dc:Point" x="1046.0" y="886.0"/>
- <di:waypoint xsi:type="dc:Point" x="1046.0" y="924.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1043.0" y="888.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">
- <di:waypoint xsi:type="dc:Point" x="676.0" y="846.0"/>
- <di:waypoint xsi:type="dc:Point" x="756.0" y="846.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="686.0" y="846.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">
- <dc:Bounds height="80.0" width="100.0" x="576.0" y="806.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="576.0" y="940.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">
- <di:waypoint xsi:type="dc:Point" x="626.0" y="940.0"/>
- <di:waypoint xsi:type="dc:Point" x="626.0" y="886.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="623.0" y="927.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1200.0" y="100.0"/>
- </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.0" y="140.0"/>
- <di:waypoint xsi:type="dc:Point" x="1394.0" y="140.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="259.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="276.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1314.0" y="140.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1581.0" y="377.0"/>
- </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="1617.0" y="395.0"/>
- <di:waypoint xsi:type="dc:Point" x="1700.0" y="394.0"/>
- <di:waypoint xsi:type="dc:Point" x="1700.0" y="528.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1697.0" y="467.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">
- <dc:Bounds height="79.0" width="100.0" x="438.0" y="742.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="312.0" y="845.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24" targetElement="_BPMNShape_ScriptTask_218">
- <di:waypoint xsi:type="dc:Point" x="386.0" y="979.0"/>
- <di:waypoint xsi:type="dc:Point" x="548.0" y="979.0"/>
- <di:waypoint xsi:type="dc:Point" x="548.0" y="980.0"/>
- <di:waypoint xsi:type="dc:Point" x="576.0" y="980.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="393.0" y="979.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261" targetElement="_BPMNShape_IntermediateThrowEvent_24">
- <di:waypoint xsi:type="dc:Point" x="488.0" y="820.0"/>
- <di:waypoint xsi:type="dc:Point" x="488.0" y="867.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="485.0" y="847.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_ScriptTask_262">
- <di:waypoint xsi:type="dc:Point" x="470.0" y="885.0"/>
- <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>
- <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>
- <di:waypoint xsi:type="dc:Point" x="412.0" y="885.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="448.0" y="885.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_262" targetElement="_BPMNShape_InclusiveGateway_24">
- <di:waypoint xsi:type="dc:Point" x="362.0" y="925.0"/>
- <di:waypoint xsi:type="dc:Point" x="361.0" y="954.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="358.0" y="948.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.0" y="1391.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1310.0" y="1430.0"/>
- <di:waypoint xsi:type="dc:Point" x="1276.0" y="1430.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1425.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
- <dc:Bounds height="188.0" width="394.0" x="21.0" y="381.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="54.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="72.0" y="499.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="169.0" y="436.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="330.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="348.0" y="499.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.0" y="476.0"/>
- <di:waypoint xsi:type="dc:Point" x="169.0" y="476.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="129.0" y="476.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="269.0" y="476.0"/>
- <di:waypoint xsi:type="dc:Point" x="330.0" y="476.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="301.0" y="476.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
- <dc:Bounds height="80.0" width="100.0" x="686.0" y="163.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="836.0" y="177.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="79.0" x="891.0" y="195.0"/>
- </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.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="805.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="805.0" y="202.0"/>
- <di:waypoint xsi:type="dc:Point" x="836.0" y="202.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="799.0" y="203.0"/>
- </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.0" y="177.0"/>
- <di:waypoint xsi:type="dc:Point" x="861.0" y="140.0"/>
- <di:waypoint xsi:type="dc:Point" x="910.0" y="140.0"/>
- <di:waypoint xsi:type="dc:Point" x="984.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="868.0" y="157.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="1155.0" y="278.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1173.0" y="319.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
- <dc:Bounds height="80.0" width="100.0" x="984.0" y="256.0"/>
- </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.0" y="227.0"/>
- <di:waypoint xsi:type="dc:Point" x="861.0" y="296.0"/>
- <di:waypoint xsi:type="dc:Point" x="984.0" y="296.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="871.0" y="233.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">
- <di:waypoint xsi:type="dc:Point" x="1084.0" y="296.0"/>
- <di:waypoint xsi:type="dc:Point" x="1155.0" y="296.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1103.0" y="296.0"/>
- </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.0" y="140.0"/>
- <di:waypoint xsi:type="dc:Point" x="1200.0" y="140.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1127.0" y="140.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72">
- <di:waypoint xsi:type="dc:Point" x="616.0" y="203.0"/>
- <di:waypoint xsi:type="dc:Point" x="686.0" y="203.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="632.0" y="203.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1341.0" y="926.0"/>
- </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.0" y="1006.0"/>
- <di:waypoint xsi:type="dc:Point" x="1392.0" y="1052.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1388.0" y="1028.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask">
- <dc:Bounds height="80.0" width="100.0" x="1343.0" y="576.0"/>
- </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.0" y="656.0"/>
- <di:waypoint xsi:type="dc:Point" x="1393.0" y="672.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="672.0"/>
- <di:waypoint xsi:type="dc:Point" x="1391.0" y="688.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1390.0" y="666.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+UpdateNetworkInstanceInfra.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.openecomp.mso.bpmn.infrastructure.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask"/>
+ <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstanceInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent">
+ <dc:Bounds height="36.0" width="36.0" x="192.0" y="185.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="193.0" y="226.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="350.0" y="163.0"/>
+ </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="228.0" y="203.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="203.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="249.0" y="203.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1343.0" y="1311.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="996.0" y="806.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask">
+ <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1176.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1343.0" y="276.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="137.0" y="1395.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+ <dc:Bounds height="567.0" width="1122.0" x="17.0" y="585.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds height="36.0" width="36.0" x="48.0" y="1040.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="67.0" x="33.0" y="1081.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="756.0" y="806.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1523.0" y="520.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="125.0" x="1487.0" y="569.0"/>
+ </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="1573.0" y="545.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1682.0" y="546.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="1577.0" y="546.0"/>
+ </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="1523.0" y="545.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="545.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="576.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1500.0" y="545.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="347.0" y="1392.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="792.0" y="1390.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
+ <dc:Bounds height="80.0" width="100.0" x="564.0" y="1392.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+ <dc:Bounds height="36.0" width="36.0" x="1682.0" y="528.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="74.0" x="1663.0" y="569.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="1341.0" y="395.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">
+ <dc:Bounds height="36.0" width="36.0" x="1323.0" y="434.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="82.0" x="1280.0" y="474.0"/>
+ </bpmndi:BPMNLabel>
+ </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="1393.0" y="356.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="374.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1391.0" y="374.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1391.0" y="395.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1389.0" y="374.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="1441.0" y="435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1499.0" y="435.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1473.0" y="435.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21">
+ <di:waypoint xsi:type="dc:Point" x="1323.0" y="447.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1290.0" y="438.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+ <di:waypoint xsi:type="dc:Point" x="450.0" y="203.0"/>
+ <di:waypoint xsi:type="dc:Point" x="516.0" y="203.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="481.0" y="203.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="516.0" y="163.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">
+ <di:waypoint xsi:type="dc:Point" x="84.0" y="1058.0"/>
+ <di:waypoint xsi:type="dc:Point" x="131.0" y="1058.0"/>
+ <di:waypoint xsi:type="dc:Point" x="131.0" y="1057.0"/>
+ <di:waypoint xsi:type="dc:Point" x="161.0" y="1057.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="96.0" y="1058.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">
+ <dc:Bounds height="36.0" width="36.0" x="470.0" y="867.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="96.0" x="440.0" y="906.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">
+ <di:waypoint xsi:type="dc:Point" x="856.0" y="846.0"/>
+ <di:waypoint xsi:type="dc:Point" x="996.0" y="846.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="881.0" y="846.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1499.0" y="395.0"/>
+ </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="1549.0" y="475.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1549.0" y="492.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1548.0" y="492.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1548.0" y="520.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1545.0" y="503.0"/>
+ </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="564.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="447.0" y="1432.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="528.0" y="1432.0"/>
+ </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="347.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="292.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="292.0" y="1435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="237.0" y="1435.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="290.0" y="1512.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">
+ <dc:Bounds height="80.0" width="100.0" x="1190.0" y="384.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="984.0" y="100.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1176.0" y="1390.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="984.0" y="1392.0"/>
+ </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.0" y="1430.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="1430.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1084.0" y="1432.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1143.0" y="1657.0"/>
+ </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="792.0" y="1430.0"/>
+ <di:waypoint xsi:type="dc:Point" x="691.0" y="1430.0"/>
+ <di:waypoint xsi:type="dc:Point" x="691.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="664.0" y="1432.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="773.0" y="1430.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ScriptTask_83">
+ <di:waypoint xsi:type="dc:Point" x="984.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="926.0" y="1432.0"/>
+ <di:waypoint xsi:type="dc:Point" x="926.0" y="1430.0"/>
+ <di:waypoint xsi:type="dc:Point" x="892.0" y="1430.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="947.0" y="1432.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1341.0" y="688.0"/>
+ </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.0" y="768.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1391.0" y="810.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1388.0" y="781.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="1392.0" y="1256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="1311.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1284.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1052.0"/>
+ </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.0" y="1132.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1392.0" y="1176.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1389.0" y="1159.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="161.0" y="1032.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="98.0" x="138.0" y="1092.0"/>
+ </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="186.0" y="1032.0"/>
+ <di:waypoint xsi:type="dc:Point" x="186.0" y="1004.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="186.0" y="1020.0"/>
+ </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="211.0" y="1057.0"/>
+ <di:waypoint xsi:type="dc:Point" x="361.0" y="1057.0"/>
+ <di:waypoint xsi:type="dc:Point" x="361.0" y="1004.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="211.0" y="1062.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1341.0" y="810.0"/>
+ </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.0" y="890.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1391.0" y="926.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1388.0" y="900.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6">
+ <dc:Bounds height="50.0" width="50.0" x="336.0" y="954.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="361.0" y="1009.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="161.0" y="954.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="60.0" x="88.0" y="969.0"/>
+ </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="211.0" y="979.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="979.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="204.0" y="983.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_216">
+ <di:waypoint xsi:type="dc:Point" x="186.0" y="954.0"/>
+ <di:waypoint xsi:type="dc:Point" x="186.0" y="884.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="191.0" y="933.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="161.0" y="834.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="95.0" x="68.0" y="849.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_86" bpmnElement="isNetworkOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">
+ <di:waypoint xsi:type="dc:Point" x="211.0" y="859.0"/>
+ <di:waypoint xsi:type="dc:Point" x="273.0" y="859.0"/>
+ <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="211.0" y="863.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_90" bpmnElement="isNetworkOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">
+ <di:waypoint xsi:type="dc:Point" x="186.0" y="834.0"/>
+ <di:waypoint xsi:type="dc:Point" x="186.0" y="781.0"/>
+ <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>
+ <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="192.0" y="814.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="336.0" y="756.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="78.0" x="323.0" y="722.0"/>
+ </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="386.0" y="781.0"/>
+ <di:waypoint xsi:type="dc:Point" x="438.0" y="781.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="386.0" y="779.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_262">
+ <di:waypoint xsi:type="dc:Point" x="361.0" y="806.0"/>
+ <di:waypoint xsi:type="dc:Point" x="362.0" y="845.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="366.0" y="806.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="169.0" y="1536.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="187.0" y="1577.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">
+ <di:waypoint xsi:type="dc:Point" x="187.0" y="1475.0"/>
+ <di:waypoint xsi:type="dc:Point" x="187.0" y="1536.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="184.0" y="1475.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="1028.0" y="924.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1046.0" y="965.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">
+ <di:waypoint xsi:type="dc:Point" x="1046.0" y="886.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1046.0" y="924.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1043.0" y="888.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">
+ <di:waypoint xsi:type="dc:Point" x="676.0" y="846.0"/>
+ <di:waypoint xsi:type="dc:Point" x="756.0" y="846.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="686.0" y="846.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="576.0" y="806.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="576.0" y="940.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">
+ <di:waypoint xsi:type="dc:Point" x="626.0" y="940.0"/>
+ <di:waypoint xsi:type="dc:Point" x="626.0" y="886.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="623.0" y="927.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1200.0" y="100.0"/>
+ </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.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1394.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="259.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="276.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1314.0" y="140.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="1581.0" y="377.0"/>
+ </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="1617.0" y="395.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1700.0" y="394.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1700.0" y="528.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1697.0" y="467.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">
+ <dc:Bounds height="79.0" width="100.0" x="438.0" y="742.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="312.0" y="845.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24" targetElement="_BPMNShape_ScriptTask_218">
+ <di:waypoint xsi:type="dc:Point" x="386.0" y="979.0"/>
+ <di:waypoint xsi:type="dc:Point" x="548.0" y="979.0"/>
+ <di:waypoint xsi:type="dc:Point" x="548.0" y="980.0"/>
+ <di:waypoint xsi:type="dc:Point" x="576.0" y="980.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="393.0" y="979.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261" targetElement="_BPMNShape_IntermediateThrowEvent_24">
+ <di:waypoint xsi:type="dc:Point" x="488.0" y="820.0"/>
+ <di:waypoint xsi:type="dc:Point" x="488.0" y="867.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="485.0" y="847.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_ScriptTask_262">
+ <di:waypoint xsi:type="dc:Point" x="470.0" y="885.0"/>
+ <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>
+ <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>
+ <di:waypoint xsi:type="dc:Point" x="412.0" y="885.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="448.0" y="885.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_262" targetElement="_BPMNShape_InclusiveGateway_24">
+ <di:waypoint xsi:type="dc:Point" x="362.0" y="925.0"/>
+ <di:waypoint xsi:type="dc:Point" x="361.0" y="954.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="358.0" y="948.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.0" y="1391.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="1430.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1310.0" y="1430.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1276.0" y="1430.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1425.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
+ <dc:Bounds height="188.0" width="394.0" x="21.0" y="381.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="54.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="72.0" y="499.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="169.0" y="436.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="330.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="348.0" y="499.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.0" y="476.0"/>
+ <di:waypoint xsi:type="dc:Point" x="169.0" y="476.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="129.0" y="476.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="269.0" y="476.0"/>
+ <di:waypoint xsi:type="dc:Point" x="330.0" y="476.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="301.0" y="476.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
+ <dc:Bounds height="80.0" width="100.0" x="686.0" y="163.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="836.0" y="177.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="79.0" x="891.0" y="195.0"/>
+ </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.0" y="203.0"/>
+ <di:waypoint xsi:type="dc:Point" x="805.0" y="203.0"/>
+ <di:waypoint xsi:type="dc:Point" x="805.0" y="202.0"/>
+ <di:waypoint xsi:type="dc:Point" x="836.0" y="202.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="799.0" y="203.0"/>
+ </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.0" y="177.0"/>
+ <di:waypoint xsi:type="dc:Point" x="861.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="910.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="984.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="868.0" y="157.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="1155.0" y="278.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1173.0" y="319.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
+ <dc:Bounds height="80.0" width="100.0" x="984.0" y="256.0"/>
+ </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.0" y="227.0"/>
+ <di:waypoint xsi:type="dc:Point" x="861.0" y="296.0"/>
+ <di:waypoint xsi:type="dc:Point" x="984.0" y="296.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="871.0" y="233.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">
+ <di:waypoint xsi:type="dc:Point" x="1084.0" y="296.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1155.0" y="296.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1103.0" y="296.0"/>
+ </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.0" y="140.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1200.0" y="140.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1127.0" y="140.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72">
+ <di:waypoint xsi:type="dc:Point" x="616.0" y="203.0"/>
+ <di:waypoint xsi:type="dc:Point" x="686.0" y="203.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="632.0" y="203.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1341.0" y="926.0"/>
+ </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.0" y="1006.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1392.0" y="1052.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1388.0" y="1028.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask">
+ <dc:Bounds height="80.0" width="100.0" x="1343.0" y="576.0"/>
+ </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.0" y="656.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1393.0" y="672.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1391.0" y="672.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1391.0" y="688.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1390.0" y="666.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleInfra.bpmn
index fdd2b65d4f..1d20bd099c 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleInfra.bpmn
@@ -1,275 +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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_F0omAMXGEeW834CKd-K10Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <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 com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_F0omAMXGEeW834CKd-K10Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.bpmn.infrastructure.scripts.*
def uvfm = new UpdateVfModuleInfra()
-uvfm.prepDoUpdateVfModule(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:callActivity id="ScriptTask_6" name="DoUpdateVfModule" calledElement="DoUpdateVfModule">
- <bpmn2:extensionElements>
- <camunda:in source="UPDVfModI_Request" target="DoUpdateVfModuleRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</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="UPDVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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>
+uvfm.prepDoUpdateVfModule(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="ScriptTask_6" name="DoUpdateVfModule" calledElement="DoUpdateVfModule">
+ <bpmn2:extensionElements>
+ <camunda:in source="UPDVfModI_Request" target="DoUpdateVfModuleRequest"/>
+ <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_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</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="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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+]]></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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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" camunda:asyncAfter="true" name="Start">
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_2"/>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_10"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleInfra">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="149.0" y="72.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="150.0" y="113.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="605.0" y="370.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="598.0" y="411.0"/>
- </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.0" y="90.0"/>
- <di:waypoint xsi:type="dc:Point" x="299.0" y="90.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="235.0" y="90.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="299.0" y="50.0"/>
- </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.0" y="90.0"/>
- <di:waypoint xsi:type="dc:Point" x="449.0" y="90.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="433.0" y="90.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="449.0" y="50.0"/>
- </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.0" y="130.0"/>
- <di:waypoint xsi:type="dc:Point" x="498.0" y="160.0"/>
- <di:waypoint xsi:type="dc:Point" x="199.0" y="160.0"/>
- <di:waypoint xsi:type="dc:Point" x="199.0" y="190.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="717.0" y="169.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
- <dc:Bounds height="80.0" width="100.0" x="449.0" y="348.0"/>
- </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.0" y="388.0"/>
- <di:waypoint xsi:type="dc:Point" x="605.0" y="388.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="723.0" y="186.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">
- <dc:Bounds height="80.0" width="100.0" x="149.0" y="190.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
- <dc:Bounds height="80.0" width="100.0" x="149.0" y="348.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
- <dc:Bounds height="80.0" width="100.0" x="299.0" y="348.0"/>
- </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.0" y="388.0"/>
- <di:waypoint xsi:type="dc:Point" x="299.0" y="388.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="271.0" y="394.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds height="241.0" width="565.0" x="65.0" y="536.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="129.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="98.0" x="98.0" y="671.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
- <dc:Bounds height="80.0" width="100.0" x="209.0" y="608.0"/>
- </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.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="209.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="209.0" y="948.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="309.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="377.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="325.0" y="648.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="533.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="551.0" y="671.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="612.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="627.0" y="671.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="704.0" y="630.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="722.0" y="671.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.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="704.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="693.0" y="948.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
- <dc:Bounds height="80.0" width="100.0" x="377.0" y="608.0"/>
- </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.0" y="388.0"/>
- <di:waypoint xsi:type="dc:Point" x="449.0" y="388.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="439.0" y="356.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="477.0" y="648.0"/>
- <di:waypoint xsi:type="dc:Point" x="533.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="373.0" y="456.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
- <dc:Bounds height="80.0" width="100.0" x="299.0" y="190.0"/>
- </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.0" y="230.0"/>
- <di:waypoint xsi:type="dc:Point" x="299.0" y="230.0"/>
- </bpmndi:BPMNEdge>
- <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.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="624.0" y="233.0"/>
- <di:waypoint xsi:type="dc:Point" x="624.0" y="294.0"/>
- <di:waypoint xsi:type="dc:Point" x="99.0" y="294.0"/>
- <di:waypoint xsi:type="dc:Point" x="99.0" y="388.0"/>
- <di:waypoint xsi:type="dc:Point" x="149.0" y="388.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="500.0" y="232.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+]]></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:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_10"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleInfra">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="149.0" y="72.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="150.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="605.0" y="370.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="598.0" y="411.0"/>
+ </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.0" y="90.0"/>
+ <di:waypoint xsi:type="dc:Point" x="299.0" y="90.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="235.0" y="90.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="299.0" y="50.0"/>
+ </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.0" y="90.0"/>
+ <di:waypoint xsi:type="dc:Point" x="449.0" y="90.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="433.0" y="90.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="449.0" y="50.0"/>
+ </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.0" y="130.0"/>
+ <di:waypoint xsi:type="dc:Point" x="498.0" y="160.0"/>
+ <di:waypoint xsi:type="dc:Point" x="199.0" y="160.0"/>
+ <di:waypoint xsi:type="dc:Point" x="199.0" y="190.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="717.0" y="169.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="100.0" x="449.0" y="348.0"/>
+ </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.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="605.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="723.0" y="186.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">
+ <dc:Bounds height="80.0" width="100.0" x="149.0" y="190.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
+ <dc:Bounds height="80.0" width="100.0" x="149.0" y="348.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
+ <dc:Bounds height="80.0" width="100.0" x="299.0" y="348.0"/>
+ </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.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="299.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="271.0" y="394.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds height="241.0" width="565.0" x="65.0" y="536.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="129.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="98.0" x="98.0" y="671.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="100.0" x="209.0" y="608.0"/>
+ </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.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="209.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="209.0" y="948.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="309.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="377.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="325.0" y="648.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">
+ <dc:Bounds height="36.0" width="36.0" x="533.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="551.0" y="671.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="612.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="627.0" y="671.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="704.0" y="630.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="722.0" y="671.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.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="704.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="693.0" y="948.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">
+ <dc:Bounds height="80.0" width="100.0" x="377.0" y="608.0"/>
+ </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.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="449.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="439.0" y="356.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="477.0" y="648.0"/>
+ <di:waypoint xsi:type="dc:Point" x="533.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="373.0" y="456.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">
+ <dc:Bounds height="80.0" width="100.0" x="299.0" y="190.0"/>
+ </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.0" y="230.0"/>
+ <di:waypoint xsi:type="dc:Point" x="299.0" y="230.0"/>
+ </bpmndi:BPMNEdge>
+ <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.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="233.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="294.0"/>
+ <di:waypoint xsi:type="dc:Point" x="99.0" y="294.0"/>
+ <di:waypoint xsi:type="dc:Point" x="99.0" y="388.0"/>
+ <di:waypoint xsi:type="dc:Point" x="149.0" y="388.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="500.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn
index b98a4de8e2..96c0681c48 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn
@@ -1,516 +1,516 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_ZBLUcCkQEeaY6ZhIaNLwzg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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:connectorId>http-connector</camunda:connectorId>
- <camunda:inputOutput>
- <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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: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: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 com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_ZBLUcCkQEeaY6ZhIaNLwzg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <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:connectorId>http-connector</camunda:connectorId>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</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: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: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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:out source="vnfAdapterRestV1Response" target="UPDVfModVol_vnfAdapterRestResponse"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+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.openecomp.mso.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>
+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 com.att.bpm.scripts.*
+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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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?">
- <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 com.att.bpm.scripts.*
+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?">
+ <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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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" camunda:asyncAfter="true" 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 com.att.bpm.scripts.*
+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.openecomp.mso.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">#{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 com.att.bpm.scripts.*
+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">#{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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.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" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleVolumeInfraV1">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_62" bpmnElement="StartEvent_1">
- <dc:Bounds height="37.0" width="37.0" x="191.0" y="131.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="192.0" y="173.0"/>
- </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.0" y="149.0"/>
- <di:waypoint xsi:type="dc:Point" x="268.0" y="149.0"/>
- <di:waypoint xsi:type="dc:Point" x="268.0" y="150.0"/>
- <di:waypoint xsi:type="dc:Point" x="295.0" y="150.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="248.0" y="149.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_42" bpmnElement="CallActivity_callVNFAdapterRest">
- <dc:Bounds height="80.0" width="100.0" x="591.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_230" bpmnElement="ScriptTask_postProcessTemp">
- <dc:Bounds height="80.0" width="109.0" x="1318.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_231" bpmnElement="ScriptTask_preProcessRequest">
- <dc:Bounds height="78.0" width="109.0" x="295.0" y="111.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_232" bpmnElement="ScriptTask_sendSynchResponse">
- <dc:Bounds height="76.0" width="109.0" x="454.0" y="112.0"/>
- </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.0" y="150.0"/>
- <di:waypoint xsi:type="dc:Point" x="454.0" y="150.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="418.0" y="150.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_233" bpmnElement="ScriptTask_prepDbInfraRequest">
- <dc:Bounds height="80.0" width="109.0" x="730.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_101" bpmnElement="ServiceTask_callUpdateInfraDb">
- <dc:Bounds height="80.0" width="109.0" x="868.0" y="420.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="868.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="853.0" y="491.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="1014.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="959.0" y="497.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_prepCompletionHandlerRequest">
- <dc:Bounds height="80.0" width="109.0" x="1014.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_43" bpmnElement="CallActivity_completionHandler">
- <dc:Bounds height="61.0" width="109.0" x="1162.0" y="429.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="1162.0" y="459.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1134.0" y="477.0"/>
- </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.0" y="459.0"/>
- <di:waypoint xsi:type="dc:Point" x="1318.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1216.0" y="521.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_235" bpmnElement="ScriptTask_queryAAI">
- <dc:Bounds height="73.0" width="109.0" x="742.0" y="113.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_126" bpmnElement="ExclusiveGateway_isTenantMatch" isMarkerVisible="true">
- <dc:Bounds height="34.0" width="34.0" x="931.0" y="132.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="102.0" x="898.0" y="113.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_tenantIdMismatch">
- <dc:Bounds height="75.0" width="97.0" x="1064.0" y="112.0"/>
- </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.0" y="149.0"/>
- <di:waypoint xsi:type="dc:Point" x="931.0" y="149.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="877.0" y="149.0"/>
- </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.0" y="149.0"/>
- <di:waypoint xsi:type="dc:Point" x="1064.0" y="149.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="986.0" y="149.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_2">
- <dc:Bounds height="49.0" width="49.0" x="1225.0" y="125.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="1249.0" y="179.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.0" y="149.0"/>
- <di:waypoint xsi:type="dc:Point" x="1225.0" y="149.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1179.0" y="149.0"/>
- </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.0" y="166.0"/>
- <di:waypoint xsi:type="dc:Point" x="948.0" y="244.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="915.0" y="173.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="730.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="712.0" y="531.0"/>
- </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.0" y="150.0"/>
- <di:waypoint xsi:type="dc:Point" x="581.0" y="150.0"/>
- <di:waypoint xsi:type="dc:Point" x="581.0" y="149.0"/>
- <di:waypoint xsi:type="dc:Point" x="612.0" y="149.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="578.0" y="150.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_prepVnfRest">
- <dc:Bounds height="80.0" width="109.0" x="454.0" y="420.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="591.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="446.0" y="460.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_18" bpmnElement="SubProcess_errorHandler" isExpanded="true">
- <dc:Bounds height="187.0" width="781.0" x="250.0" y="786.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_catchAllErrors">
- <dc:Bounds height="37.0" width="37.0" x="301.0" y="844.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="98.0" x="270.0" y="886.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_238" bpmnElement="ScriptTask_preFalloutHandler">
- <dc:Bounds height="61.0" width="109.0" x="445.0" y="832.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_44" bpmnElement="CallActivity_falloutHandler">
- <dc:Bounds height="61.0" width="109.0" x="639.0" y="832.0"/>
- </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.0" y="862.0"/>
- <di:waypoint xsi:type="dc:Point" x="639.0" y="862.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="573.0" y="946.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_170" bpmnElement="EndEvent_3">
- <dc:Bounds height="37.0" width="37.0" x="862.0" y="844.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="880.0" y="886.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.0" y="862.0"/>
- <di:waypoint xsi:type="dc:Point" x="862.0" y="862.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="765.0" y="1030.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_171" bpmnElement="EndEvent_4">
- <dc:Bounds height="43.0" width="43.0" x="1461.0" y="438.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="1457.0" y="486.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="1461.0" y="459.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1442.0" y="467.0"/>
- </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.0" y="862.0"/>
- <di:waypoint xsi:type="dc:Point" x="445.0" y="862.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="385.0" y="1030.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="34.0" width="34.0" x="931.0" y="244.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="135.0" x="881.0" y="283.0"/>
- </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.0" y="261.0"/>
- <di:waypoint xsi:type="dc:Point" x="634.0" y="261.0"/>
- <di:waypoint xsi:type="dc:Point" x="634.0" y="262.0"/>
- <di:waypoint xsi:type="dc:Point" x="405.0" y="262.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="729.0" y="261.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="ScriptTask_queryAaiForVfModule">
- <dc:Bounds height="80.0" width="109.0" x="297.0" y="222.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_personaModelIdMatch" isMarkerVisible="true">
- <dc:Bounds height="34.0" width="34.0" x="333.0" y="346.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="156.0" x="272.0" y="385.0"/>
- </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.0" y="302.0"/>
- <di:waypoint xsi:type="dc:Point" x="350.0" y="329.0"/>
- <di:waypoint xsi:type="dc:Point" x="350.0" y="346.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="347.0" y="318.0"/>
- </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.0" y="363.0"/>
- <di:waypoint xsi:type="dc:Point" x="491.0" y="363.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="398.0" y="363.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="34.0" width="34.0" x="491.0" y="346.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="508.0" y="385.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.0" y="278.0"/>
- <di:waypoint xsi:type="dc:Point" x="948.0" y="363.0"/>
- <di:waypoint xsi:type="dc:Point" x="701.0" y="363.0"/>
- <di:waypoint xsi:type="dc:Point" x="525.0" y="363.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="795.0" y="363.0"/>
- </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.0" y="380.0"/>
- <di:waypoint xsi:type="dc:Point" x="350.0" y="401.0"/>
- <di:waypoint xsi:type="dc:Point" x="351.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="350.0" y="409.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="ScriptTask_handlePersonaModelIdMismatch">
- <dc:Bounds height="80.0" width="109.0" x="297.0" y="460.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_172" bpmnElement="EndEvent_personaModelIdMismatch">
- <dc:Bounds height="43.0" width="43.0" x="330.0" y="600.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="351.0" y="648.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.0" y="540.0"/>
- <di:waypoint xsi:type="dc:Point" x="351.0" y="600.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="348.0" y="560.0"/>
- </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.0" y="380.0"/>
- <di:waypoint xsi:type="dc:Point" x="508.0" y="420.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="ScriptTask_queryAaiGenricVnf">
- <dc:Bounds height="75.0" width="97.0" x="612.0" y="112.0"/>
- </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.0" y="149.0"/>
- <di:waypoint xsi:type="dc:Point" x="742.0" y="149.0"/>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+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.openecomp.mso.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" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleVolumeInfraV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_62" bpmnElement="StartEvent_1">
+ <dc:Bounds height="37.0" width="37.0" x="191.0" y="131.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="192.0" y="173.0"/>
+ </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.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="268.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="268.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="295.0" y="150.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="248.0" y="149.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_42" bpmnElement="CallActivity_callVNFAdapterRest">
+ <dc:Bounds height="80.0" width="100.0" x="591.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_230" bpmnElement="ScriptTask_postProcessTemp">
+ <dc:Bounds height="80.0" width="109.0" x="1318.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_231" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds height="78.0" width="109.0" x="295.0" y="111.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_232" bpmnElement="ScriptTask_sendSynchResponse">
+ <dc:Bounds height="76.0" width="109.0" x="454.0" y="112.0"/>
+ </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.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="454.0" y="150.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="418.0" y="150.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_233" bpmnElement="ScriptTask_prepDbInfraRequest">
+ <dc:Bounds height="80.0" width="109.0" x="730.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_101" bpmnElement="ServiceTask_callUpdateInfraDb">
+ <dc:Bounds height="80.0" width="109.0" x="868.0" y="420.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="868.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="853.0" y="491.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1014.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="959.0" y="497.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_prepCompletionHandlerRequest">
+ <dc:Bounds height="80.0" width="109.0" x="1014.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_43" bpmnElement="CallActivity_completionHandler">
+ <dc:Bounds height="61.0" width="109.0" x="1162.0" y="429.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1162.0" y="459.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1134.0" y="477.0"/>
+ </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.0" y="459.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1318.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1216.0" y="521.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_235" bpmnElement="ScriptTask_queryAAI">
+ <dc:Bounds height="73.0" width="109.0" x="742.0" y="113.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_126" bpmnElement="ExclusiveGateway_isTenantMatch" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="931.0" y="132.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="102.0" x="898.0" y="113.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_tenantIdMismatch">
+ <dc:Bounds height="75.0" width="97.0" x="1064.0" y="112.0"/>
+ </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.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="931.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="877.0" y="149.0"/>
+ </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.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1064.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="986.0" y="149.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_2">
+ <dc:Bounds height="49.0" width="49.0" x="1225.0" y="125.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="1249.0" y="179.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.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1225.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1179.0" y="149.0"/>
+ </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.0" y="166.0"/>
+ <di:waypoint xsi:type="dc:Point" x="948.0" y="244.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="915.0" y="173.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="730.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="712.0" y="531.0"/>
+ </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.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="581.0" y="150.0"/>
+ <di:waypoint xsi:type="dc:Point" x="581.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="612.0" y="149.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="578.0" y="150.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_prepVnfRest">
+ <dc:Bounds height="80.0" width="109.0" x="454.0" y="420.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="591.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="446.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_18" bpmnElement="SubProcess_errorHandler" isExpanded="true">
+ <dc:Bounds height="187.0" width="781.0" x="250.0" y="786.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_catchAllErrors">
+ <dc:Bounds height="37.0" width="37.0" x="301.0" y="844.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="98.0" x="270.0" y="886.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_238" bpmnElement="ScriptTask_preFalloutHandler">
+ <dc:Bounds height="61.0" width="109.0" x="445.0" y="832.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_44" bpmnElement="CallActivity_falloutHandler">
+ <dc:Bounds height="61.0" width="109.0" x="639.0" y="832.0"/>
+ </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.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="639.0" y="862.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="573.0" y="946.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_170" bpmnElement="EndEvent_3">
+ <dc:Bounds height="37.0" width="37.0" x="862.0" y="844.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="880.0" y="886.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.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="862.0" y="862.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="765.0" y="1030.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_171" bpmnElement="EndEvent_4">
+ <dc:Bounds height="43.0" width="43.0" x="1461.0" y="438.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="1457.0" y="486.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1461.0" y="459.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1442.0" y="467.0"/>
+ </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.0" y="862.0"/>
+ <di:waypoint xsi:type="dc:Point" x="445.0" y="862.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="385.0" y="1030.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="931.0" y="244.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="135.0" x="881.0" y="283.0"/>
+ </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.0" y="261.0"/>
+ <di:waypoint xsi:type="dc:Point" x="634.0" y="261.0"/>
+ <di:waypoint xsi:type="dc:Point" x="634.0" y="262.0"/>
+ <di:waypoint xsi:type="dc:Point" x="405.0" y="262.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="729.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="ScriptTask_queryAaiForVfModule">
+ <dc:Bounds height="80.0" width="109.0" x="297.0" y="222.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_personaModelIdMatch" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="333.0" y="346.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="156.0" x="272.0" y="385.0"/>
+ </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.0" y="302.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="329.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="346.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="347.0" y="318.0"/>
+ </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.0" y="363.0"/>
+ <di:waypoint xsi:type="dc:Point" x="491.0" y="363.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="398.0" y="363.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="34.0" width="34.0" x="491.0" y="346.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="508.0" y="385.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.0" y="278.0"/>
+ <di:waypoint xsi:type="dc:Point" x="948.0" y="363.0"/>
+ <di:waypoint xsi:type="dc:Point" x="701.0" y="363.0"/>
+ <di:waypoint xsi:type="dc:Point" x="525.0" y="363.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="795.0" y="363.0"/>
+ </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.0" y="380.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="401.0"/>
+ <di:waypoint xsi:type="dc:Point" x="351.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="350.0" y="409.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="ScriptTask_handlePersonaModelIdMismatch">
+ <dc:Bounds height="80.0" width="109.0" x="297.0" y="460.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_172" bpmnElement="EndEvent_personaModelIdMismatch">
+ <dc:Bounds height="43.0" width="43.0" x="330.0" y="600.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="351.0" y="648.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.0" y="540.0"/>
+ <di:waypoint xsi:type="dc:Point" x="351.0" y="600.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="348.0" y="560.0"/>
+ </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.0" y="380.0"/>
+ <di:waypoint xsi:type="dc:Point" x="508.0" y="420.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="ScriptTask_queryAaiGenricVnf">
+ <dc:Bounds height="75.0" width="97.0" x="612.0" y="112.0"/>
+ </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.0" y="149.0"/>
+ <di:waypoint xsi:type="dc:Point" x="742.0" y="149.0"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties b/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties
new file mode 100644
index 0000000000..d071fdabf8
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/processengine.properties
@@ -0,0 +1,20 @@
+###
+# ============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=========================================================
+###
+processEngineName=infrastructure
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
new file mode 100644
index 0000000000..ecd23f0ca9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
@@ -0,0 +1,1380 @@
+<?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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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 &#39;1702&#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") == '1702'} ]]></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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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">${URN_mso_adapters_network_rest_endpoint}</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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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 &#39;1702&#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") == '1702'} ]]></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 &#39;1702&#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") == '1702'} ]]></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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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="25" y="610" width="1266" height="686" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+ <dc:Bounds x="101" y="1168" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="95" y="1209" 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="137" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="164" y="1186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="151" y="1171" 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="298" y="1062" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="242" y="1080" 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="348" y="1087" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="1087" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="1161" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="1090" 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="323" y="1062" />
+ <di:waypoint xsi:type="dc:Point" x="323" y="1005" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="333" y="1053" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="521" y="847" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="579" y="860" 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="546" y="847" />
+ <di:waypoint xsi:type="dc:Point" x="546" y="778" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="778" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="553" y="831" 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="545" y="896" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="707" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="553" y="897" 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="880" y="832" 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_EndEvent_247" bpmnElement="EndEvent_2">
+ <dc:Bounds x="791" y="527" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="568" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <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:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">
+ <di:waypoint xsi:type="dc:Point" x="809" y="475" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="527" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="824" y="501" width="0" height="0" />
+ </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="298" y="955" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="204" y="968" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0cly7z2_di" bpmnElement="SequenceFlow_0cly7z2">
+ <di:waypoint xsi:type="dc:Point" x="323" y="955" />
+ <di:waypoint xsi:type="dc:Point" x="323" y="912" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="939" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12tlymf_di" bpmnElement="SequenceFlow_12tlymf">
+ <di:waypoint xsi:type="dc:Point" x="348" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="451" y="897" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="990" 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="1394" y="304" width="76" 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="707" y="753" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="701" y="712" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0suu90e_di" bpmnElement="isSdncRpc4Yes_SequenceFlow4">
+ <di:waypoint xsi:type="dc:Point" x="732" y="803" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="832" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="737" y="802" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xnyl6e_di" bpmnElement="isSdncRpc4No_SequenceFlow4">
+ <di:waypoint xsi:type="dc:Point" x="757" y="778" />
+ <di:waypoint xsi:type="dc:Point" x="930" y="778" />
+ <di:waypoint xsi:type="dc:Point" x="930" y="832" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="766" y="757" 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="1347" y="1619" width="76" height="24" />
+ </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="682" y="832" 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="1154" y="1077" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1173" y="1113" 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="682" y="1055" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0b8j5rw_di" bpmnElement="SequenceFlow_0b8j5rw">
+ <di:waypoint xsi:type="dc:Point" x="373" y="872" />
+ <di:waypoint xsi:type="dc:Point" x="426" y="872" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="400" y="857" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_17adm0m_di" bpmnElement="Task_1imzwi3">
+ <dc:Bounds x="273" y="832" 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="835" y="1055" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vzsyrd_di" bpmnElement="SequenceFlow_0vzsyrd">
+ <di:waypoint xsi:type="dc:Point" x="935" y="1095" />
+ <di:waypoint xsi:type="dc:Point" x="1001" y="1095" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="968" y="1080" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bwpkkb_di" bpmnElement="SequenceFlow_0bwpkkb">
+ <di:waypoint xsi:type="dc:Point" x="732" y="912" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="955" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="924" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0lndbvr_di" bpmnElement="SequenceFlow_0lndbvr">
+ <di:waypoint xsi:type="dc:Point" x="930" y="911" />
+ <di:waypoint xsi:type="dc:Point" x="930" y="980" />
+ <di:waypoint xsi:type="dc:Point" x="757" y="980" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="946" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_096tad6_di" bpmnElement="SequenceFlow_096tad6">
+ <di:waypoint xsi:type="dc:Point" x="782" y="1095" />
+ <di:waypoint xsi:type="dc:Point" x="835" y="1095" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="1080" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="TextAnnotation_1py1p84_di" bpmnElement="TextAnnotation_1py1p84">
+ <dc:Bounds x="1030" y="903" width="252" height="119" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0nketgd_di" bpmnElement="Association_0nketgd">
+ <di:waypoint xsi:type="dc:Point" x="935" y="1071" />
+ <di:waypoint xsi:type="dc:Point" x="1035" y="1022" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0w2ekuz_di" bpmnElement="ScriptTask_0w2ekuz">
+ <dc:Bounds x="1001" y="1055" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qwubew_di" bpmnElement="SequenceFlow_1qwubew">
+ <di:waypoint xsi:type="dc:Point" x="1101" y="1095" />
+ <di:waypoint xsi:type="dc:Point" x="1154" y="1095" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1128" y="1070" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1r7vhm5_di" bpmnElement="isRollbackOn_ExclusiveGateway" isMarkerVisible="true">
+ <dc:Bounds x="298" y="1161" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="284" y="1211" 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="323" y="1161" />
+ <di:waypoint xsi:type="dc:Point" x="323" y="1112" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="331" y="1144" 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="348" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="426" y="1186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="349" y="1192" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0zl5xa8_di" bpmnElement="ExclusiveGateway_1qb2vwe">
+ <dc:Bounds x="707" y="955" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="732" y="1005" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15sffxc_di" bpmnElement="SequenceFlow_15sffxc">
+ <di:waypoint xsi:type="dc:Point" x="732" y="1005" />
+ <di:waypoint xsi:type="dc:Point" x="732" y="1055" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="747" y="1030" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="InclusiveGateway_0t3i8it_di" bpmnElement="ExclusiveGateway_1bk0tqd">
+ <dc:Bounds x="426" y="847" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="897" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k7y7b5_di" bpmnElement="SequenceFlow_0k7y7b5">
+ <di:waypoint xsi:type="dc:Point" x="476" y="872" />
+ <di:waypoint xsi:type="dc:Point" x="521" y="872" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="847" 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="426" y="1161" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="1211" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_17nx822_di" bpmnElement="SequenceFlow_17nx822">
+ <di:waypoint xsi:type="dc:Point" x="476" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="1051" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="1051" y="1135" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="764" y="1171" 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="335" y="737" width="180" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="Association_0eolbkz_di" bpmnElement="Association_0eolbkz">
+ <di:waypoint xsi:type="dc:Point" x="446" y="852" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="773" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0j3058g_di" bpmnElement="ScriptTask_0j3058g">
+ <dc:Bounds x="164" y="1146" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10ttvwn_di" bpmnElement="SequenceFlow_10ttvwn">
+ <di:waypoint xsi:type="dc:Point" x="264" y="1186" />
+ <di:waypoint xsi:type="dc:Point" x="298" y="1186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="281" y="1161" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000000..00ef41c168
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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.openecomp.mso.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.openecomp.mso.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") == '1702'} ]]></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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
new file mode 100644
index 0000000000..a770c8c11a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
@@ -0,0 +1,390 @@
+<?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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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_10</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="getAAICustomerById_scriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterServiceTopologyAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallSDNCAdapterServiceTopologyAssign" targetRef="PostProcessSDNCAssignRequest" />
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="EndEvent_3" />
+ <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_129ih1g</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_129ih1g" sourceRef="callGenericPutService" targetRef="ScriptTask_0q37vn9" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="sdncVersion is 1610 or serviceInstance name is populated?" 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("serviceInstanceName" ) != null && execution.getVariable("serviceInstanceName" ) != "" ) || execution.getVariable("sdncVersion" ) == "1610" }]]></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 />
+ </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.openecomp.mso.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.openecomp.mso.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?" default="SequenceFlow_156ih25">
+ <bpmn2:incoming>SequenceFlow_1dd86x8</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("sdncVersion" ) == "1610"}]]></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.openecomp.mso.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:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1dd86x8</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateServiceInstance()
+ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dd86x8" sourceRef="ScriptTask_0q37vn9" targetRef="ExclusiveGateway_1nk6aol" />
+ </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="1142" y="886" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1160" y="927" width="0" 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="578" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="PostProcessSDNCAssignRequest">
+ <dc:Bounds x="972" y="864" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_74" bpmnElement="CallSDNCAdapterServiceTopologyAssign">
+ <dc:Bounds x="972" y="721" 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="658" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="692" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="692" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="715" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1035" y="692" width="0" 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="801" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="864" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1037" y="840" width="0" 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="1072" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="1111" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="1111" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="1142" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1126" y="904" width="0" 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:BPMNEdge id="SequenceFlow_129ih1g_di" bpmnElement="SequenceFlow_129ih1g">
+ <di:waypoint xsi:type="dc:Point" x="1023" y="286" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="336" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1023" y="296" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <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="7" width="81" height="62" />
+ </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="460" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="903" y="472" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_156ih25_di" bpmnElement="SequenceFlow_156ih25">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="545" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="575" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1039" y="510.8721806797853" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_10659gr_di" bpmnElement="EndEvent_10659gr">
+ <dc:Bounds x="1103" y="467" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1121" y="508" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_00v4npo_di" bpmnElement="SequenceFlow_00v4npo">
+ <di:waypoint xsi:type="dc:Point" x="1047" y="485" />
+ <di:waypoint xsi:type="dc:Point" x="1103" y="485" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1063" y="461" 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_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
+ <dc:Bounds x="972" y="336" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dd86x8_di" bpmnElement="SequenceFlow_1dd86x8">
+ <di:waypoint xsi:type="dc:Point" x="1022" y="416" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="460" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1037" y="438" 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:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn
new file mode 100644
index 0000000000..80ace28ae7
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateServiceInstanceRollback.bpmn
@@ -0,0 +1,338 @@
+<?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="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.openecomp.mso.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.openecomp.mso.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:callActivity id="callGenericDeleteService" name="Call AAI GenericDelete Service " calledElement="GenericDeleteService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceId" target="GENDS_serviceInstanceId" />
+ <camunda:in source="subscriptionServiceType" target="GENDS_serviceType" />
+ <camunda:in source="globalSubscriberId" target="GENDS_globalCustomerId" />
+ <camunda:in sourceExpression="service-instance" target="GENDS_type" />
+ <camunda:out source="GENDS_FoundIndicator" target="GENDS_FoundIndicator" />
+ <camunda:in sourceExpression="&#34;&#34;" target="GENGS_serviceType" />
+ <camunda:out source="GENDS_SuccessIndicator" target="GENDS_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowExecption" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1x9eh33</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05wu9i7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <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_0khjo7l</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="callGenericDeleteService" targetRef="PostProcess_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1x9eh33" name="yes" sourceRef="ExclusiveGateway_0ii31dq" targetRef="callGenericDeleteService">
+ <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 Rollback" calledElement="sdncAdapter">
+ <bpmn2:extensionElements>
+ <camunda:in source="sdncRollbackRequest" 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_11fnnkb</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Rollback " scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0khjo7l</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def rbk= new DoCreateServiceInstanceRollback()
+rbk.validateSDNCResponse(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0khjo7l" sourceRef="ScriptTask_1uxr0cx" targetRef="ExclusiveGateway_0ii31dq" />
+ <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.openecomp.mso.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.openecomp.mso.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: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="1166" y="358" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1184" y="399" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">
+ <dc:Bounds x="286" y="318" width="467" height="193" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">
+ <dc:Bounds x="354" y="384" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="372" y="425" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">
+ <dc:Bounds x="647" y="384" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="665" y="425" 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="390" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="458" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="425" y="387" 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="367" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="367" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="393" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="382" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericDeleteService">
+ <dc:Bounds x="1134" y="53" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
+ <dc:Bounds x="527" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="512" y="129" width="80" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
+ <di:waypoint xsi:type="dc:Point" x="577" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="601" y="101.351489674803" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
+ <di:waypoint xsi:type="dc:Point" x="552" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="-23" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="72" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="635" y="-43" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ii31dq_di" bpmnElement="ExclusiveGateway_0ii31dq" isMarkerVisible="true">
+ <dc:Bounds x="996" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="939" y="113" width="66" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1n7wade_di" bpmnElement="SequenceFlow_1n7wade">
+ <di:waypoint xsi:type="dc:Point" x="1021" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="1021" y="246" />
+ <di:waypoint xsi:type="dc:Point" x="1134" y="246" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1030" y="124.63737966405313" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05wu9i7_di" bpmnElement="SequenceFlow_05wu9i7">
+ <di:waypoint xsi:type="dc:Point" x="1184" y="133" />
+ <di:waypoint xsi:type="dc:Point" x="1184" y="206" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1199" y="169.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1x9eh33_di" bpmnElement="SequenceFlow_1x9eh33">
+ <di:waypoint xsi:type="dc:Point" x="1046" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1134" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1082" y="82" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib">
+ <di:waypoint xsi:type="dc:Point" x="743" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="820" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="782" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb">
+ <dc:Bounds x="640" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx">
+ <dc:Bounds x="823" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0khjo7l_di" bpmnElement="SequenceFlow_0khjo7l">
+ <di:waypoint xsi:type="dc:Point" x="923" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="996" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="960" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_19tbjgn_di" bpmnElement="ExclusiveGateway_19tbjgn" isMarkerVisible="true">
+ <dc:Bounds x="393" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="385" y="38" width="65" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="458" y="362" 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="558" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="603" y="387" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1wk55es_di" bpmnElement="PostProcess_ScriptTask">
+ <dc:Bounds x="1134" y="206" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01l4ssl_di" bpmnElement="SequenceFlow_01l4ssl">
+ <di:waypoint xsi:type="dc:Point" x="1184" y="286" />
+ <di:waypoint xsi:type="dc:Point" x="1184" y="358" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1199" y="322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06aasqh_di" bpmnElement="SequenceFlow_06aasqh">
+ <di:waypoint xsi:type="dc:Point" x="443" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="527" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="479" y="82" width="12" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rzlaoy_di" bpmnElement="SequenceFlow_1rzlaoy">
+ <di:waypoint xsi:type="dc:Point" x="418" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="418" y="268" />
+ <di:waypoint xsi:type="dc:Point" x="1131" y="272" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="424" y="195" width="18" height="14" />
+ </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:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
new file mode 100644
index 0000000000..fecb720666
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
@@ -0,0 +1,1167 @@
+<?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" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupNamePresent(execution)]]></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_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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.openecomp.mso.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_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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_22" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="PreProcessSDNCGetRequest" />
+ <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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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_28</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="ExclusiveGateway_5" targetRef="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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" language="groovy"><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="QueryCloudRegion" targetRef="ConfirmVolumeGroupTenant" />
+ <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">
+ <bpmn2:scriptTask id="ScriptTask_1" name="Process Error" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.processBPMNException(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_2" />
+ <bpmn2:startEvent id="StartEvent_2">
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_1" />
+ <bpmn2:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="PreProcessRequest" targetRef="ExclusiveGateway_0ffvqla" />
+ <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="newVfModuleId" 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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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_4</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: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="530" y="153" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="571" 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="744" y="670" 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="1236" y="672" width="121" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="UpdateAAIVfModule_1">
+ <dc:Bounds x="768" y="830" width="117" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="CallSDNCAdapterVFModuleTopologyActivate">
+ <dc:Bounds x="1090" y="828" width="119" height="99" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_92" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="1435" y="853" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1432" y="825" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="CreateAAIVfModuleVolumeGroup">
+ <dc:Bounds x="1693" y="986" width="121" height="112" />
+ </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="1460" y="903" />
+ <di:waypoint xsi:type="dc:Point" x="1460" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1520" y="1042" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1452" y="928" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_93" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
+ <dc:Bounds x="1818" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1843" y="909" 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="1813" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="944" />
+ <di:waypoint xsi:type="dc:Point" x="1843" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1839" y="1042" 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="1485" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1651" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1651" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="1818" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1519" y="878" 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="294" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" 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="588" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_214" bpmnElement="PostProcessSDNCGetRequest">
+ <dc:Bounds x="924" y="672" width="121" height="94" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_ScriptTask_213">
+ <di:waypoint xsi:type="dc:Point" x="555" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="588" y="719" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_213" targetElement="_BPMNShape_ScriptTask_158">
+ <di:waypoint xsi:type="dc:Point" x="708" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="718" />
+ </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="876" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="718" />
+ <di:waypoint xsi:type="dc:Point" x="899" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="719" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="PreProcessUpdateAAIVfModule_1">
+ <dc:Bounds x="609" y="830" width="118" height="97" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_33" bpmnElement="PreProcessSDNCActivateRequest">
+ <dc:Bounds x="935" y="829" width="118" height="98" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_4" bpmnElement="PostProcessSDNCActivateRequest">
+ <dc:Bounds x="1252" y="830" 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="727" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="768" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="748" y="853" 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="884" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="935" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="910" y="853" 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="1053" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1090" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1086" y="868" 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="1208" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1252" y="877" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1230" y="852" 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="1372" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="877" />
+ <di:waypoint xsi:type="dc:Point" x="1404" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="1435" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1419" y="868" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_175" bpmnElement="EndEvent_1">
+ <dc:Bounds x="2112" y="861" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2130" y="902" 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="1868" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="1934" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1901" y="863.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_45" bpmnElement="IntermediateThrowEvent_2">
+ <dc:Bounds x="1771" y="701" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1747" y="742" width="84" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_30" bpmnElement="IntermediateCatchEvent_3">
+ <dc:Bounds x="24" y="860" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="16" y="901" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_7" bpmnElement="PrepareCreateAAIVfModuleVolumeGroupRequest">
+ <dc:Bounds x="1520" y="986" 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="1640" y="1042" />
+ <di:waypoint xsi:type="dc:Point" x="1693" y="1042" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1667" y="1017" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_25" bpmnElement="PreProcessVNFAdapterRequest">
+ <dc:Bounds x="1073" y="672" width="121" height="96" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_Task_35" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="1397" y="674" 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="1044" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1059" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1073" y="720" />
+ </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="1193" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1236" y="720" />
+ </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="1356" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1397" y="720" />
+ </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="1934" y="831" 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="2062" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="2112" y="878" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2087" y="863.5" 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_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="29" y="1197" width="405" height="203" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_2">
+ <dc:Bounds x="58" y="1281" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="76" y="1322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_2">
+ <dc:Bounds x="370" y="1281" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="1322" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_284" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="165" y="1258" width="134" height="81" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_55" targetElement="_BPMNShape_ScriptTask_284">
+ <di:waypoint xsi:type="dc:Point" x="94" y="1299" />
+ <di:waypoint xsi:type="dc:Point" x="165" y="1298" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="118" y="1299" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_284" targetElement="_BPMNShape_EndEvent_181">
+ <di:waypoint xsi:type="dc:Point" x="299" y="1298" />
+ <di:waypoint xsi:type="dc:Point" x="370" y="1299" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="329" y="1298" width="0" height="0" />
+ </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="1565.9780439121755" y="696" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1546" y="746" width="89" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ushk1d_di" bpmnElement="SequenceFlow_1ushk1d">
+ <di:waypoint xsi:type="dc:Point" x="1513" y="720" />
+ <di:waypoint xsi:type="dc:Point" x="1566" y="721" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1540" y="705.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ery1pk_di" bpmnElement="SequenceFlow_0ery1pk">
+ <di:waypoint xsi:type="dc:Point" x="1591" y="696" />
+ <di:waypoint xsi:type="dc:Point" x="1591" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1621" y="616" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1558" y="658" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xfanpi_di" bpmnElement="SequenceFlow_0xfanpi">
+ <di:waypoint xsi:type="dc:Point" x="1616" y="721" />
+ <di:waypoint xsi:type="dc:Point" x="1771" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1688" y="695" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0abffyj_di" bpmnElement="SequenceFlow_0abffyj">
+ <di:waypoint xsi:type="dc:Point" x="1721" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1746" y="616" />
+ <di:waypoint xsi:type="dc:Point" x="1746" y="719" />
+ <di:waypoint xsi:type="dc:Point" x="1771" y="719" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1761" y="667.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1dv7amn_di" bpmnElement="CreateNetworkPoliciesInAAI">
+ <dc:Bounds x="1621" y="576" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0f54imv_di" bpmnElement="ExclusiveGateway_0f54imv" isMarkerVisible="true">
+ <dc:Bounds x="114.59500000000003" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="101" y="819" width="77" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1edqxlf_di" bpmnElement="ExclusiveGateway_1edqxlf" isMarkerVisible="true">
+ <dc:Bounds x="482.595" y="854" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="508" y="904" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bi38s7_di" bpmnElement="SequenceFlow_0bi38s7">
+ <di:waypoint xsi:type="dc:Point" x="140" y="904" />
+ <di:waypoint xsi:type="dc:Point" x="140" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="193" y="1057" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="980.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qm81ym_di" bpmnElement="SequenceFlow_1qm81ym">
+ <di:waypoint xsi:type="dc:Point" x="293" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="329" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="365" y="1057" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="344" y="1057" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_112los9_di" bpmnElement="SequenceFlow_112los9">
+ <di:waypoint xsi:type="dc:Point" x="465" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="1057" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="904" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="487" y="1042" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1k5uku2_di" bpmnElement="SequenceFlow_1k5uku2">
+ <di:waypoint xsi:type="dc:Point" x="165" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="483" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="318" y="864" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1avfxsz_di" bpmnElement="SequenceFlow_1avfxsz">
+ <di:waypoint xsi:type="dc:Point" x="533" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="571" y="879" />
+ <di:waypoint xsi:type="dc:Point" x="609" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="586" y="879" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0363dz7_di" bpmnElement="SequenceFlow_0363dz7">
+ <di:waypoint xsi:type="dc:Point" x="60" y="878" />
+ <di:waypoint xsi:type="dc:Point" x="115" y="879" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="853.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0o3bcyq_di" bpmnElement="PreProcessUpdateAAIGenericVnf">
+ <dc:Bounds x="193" y="1018" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0j45ic9_di" bpmnElement="UpdateAAIGenericVNFTask">
+ <dc:Bounds x="365" y="1017" 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="478" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="548" y="189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="513" y="267" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0ffvqla_di" bpmnElement="ExclusiveGateway_0ffvqla" isMarkerVisible="true">
+ <dc:Bounds x="294" y="145.86" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="276" y="97.86000000000001" width="86" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0270n5c_di" bpmnElement="SequenceFlow_0270n5c">
+ <di:waypoint xsi:type="dc:Point" x="344" y="171" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="171" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="401" 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="319" y="196" />
+ <di:waypoint xsi:type="dc:Point" x="319" y="282" />
+ <di:waypoint xsi:type="dc:Point" x="378" y="282" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="328" y="239" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_14nvmgk_di" bpmnElement="Task_0kuj2a1">
+ <dc:Bounds x="378" y="242" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
index 49e612f543..7a7f369e42 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
@@ -1,520 +1,665 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <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_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:scriptTask id="PrepareUpdateAAIVfModulePrep" name="PrepareUpdateAAIVfModule Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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_5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:scriptTask id="PrepareUpdateAAIVfModulePrep" name="PrepareUpdateAAIVfModule Prep" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
-dcvfmr.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke&#xD;&#xA;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_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="yes" sourceRef="ExclusiveGateway_1" targetRef="PrepareUpdateAAIVfModulePrep">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackPrepareUpdateVfModule") == "true"}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule"/>
- <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 VNF Adapter Create?" 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&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+dcvfmr.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_6" name="yes" sourceRef="ExclusiveGateway_1" targetRef="PrepareUpdateAAIVfModulePrep">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackPrepareUpdateVfModule") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule" />
+ <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 Network Policies Creation?" 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.openecomp.mso.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&#xD;&#xA;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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="yes" sourceRef="ExclusiveGateway_2" targetRef="VNFAdapterPrep">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackVnfAdapterCreate") == "true"}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="InvokeVNFAdapterRestV1" targetRef="ExclusiveGateway_3"/>
- <bpmn2:sequenceFlow id="SequenceFlow_15" name="no" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_3"/>
- <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+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_11</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="yes" sourceRef="ExclusiveGateway_2" targetRef="Task_08csf14">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackCreateNetworkPoliciesAAI") == "true"}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="InvokeVNFAdapterRestV1" targetRef="ExclusiveGateway_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="no" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_0a0hroy" />
+ <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.openecomp.mso.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&#xD;&#xA;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_11</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_15</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="SDNCAdapterPrep2">
- <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&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+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_11</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_03i4czf</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="SDNCAdapterPrep2">
+ <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_19</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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&#xD;&#xA;SDNCAdapterV1" calledElement="sdncAdapter">
- <bpmn2:extensionElements>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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:outgoing>SequenceFlow_21</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="ExclusiveGateway_5" targetRef="EndEvent_9"/>
- <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&#xD;&#xA;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:endEvent id="EndEvent_9">
- <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule&#xD;&#xA;Prep" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+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:outgoing>SequenceFlow_21</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="ExclusiveGateway_5" targetRef="EndEvent_9" />
+ <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="EndEvent_9" />
+ <bpmn2:endEvent id="EndEvent_9">
+ <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_21</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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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_12" name="" sourceRef="CatchExceptions" targetRef="LogSaveWorkflowException"/>
- <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+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_12" name="" sourceRef="CatchExceptions" targetRef="LogSaveWorkflowException" />
+ <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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: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 com.att.bpm.scripts.*
+dcvfmr.saveWorkflowException(execution, 'DCVFMR_CaughtWorkflowException1')]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="LogSaveWorkflowException" targetRef="EndEvent_1" />
+ </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.openecomp.mso.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
-dcvfmr.preProcessRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="InitializeVariables" targetRef="ExclusiveGateway_1"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <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 height="36.0" width="36.0" x="13.0" y="100.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="31.0" y="141.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
- <dc:Bounds height="80.0" width="100.0" x="203.0" y="78.0"/>
- </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.0" y="118.0"/>
- <di:waypoint xsi:type="dc:Point" x="203.0" y="118.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="74.0" y="118.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">
- <dc:Bounds height="80.0" width="100.0" x="725.0" y="23.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="PrepareUpdateAAIVfModulePrep">
- <dc:Bounds height="80.0" width="100.0" x="552.0" y="23.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
- <dc:Bounds height="80.0" width="100.0" x="104.0" y="269.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
- <dc:Bounds height="80.0" width="100.0" x="262.0" y="269.0"/>
- </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.0" y="309.0"/>
- <di:waypoint xsi:type="dc:Point" x="262.0" y="309.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="221.0" y="309.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
- <dc:Bounds height="80.0" width="100.0" x="552.0" y="264.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
- <dc:Bounds height="80.0" width="100.0" x="732.0" y="264.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
- <dc:Bounds height="80.0" width="100.0" x="74.0" y="504.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
- <dc:Bounds height="80.0" width="100.0" x="214.0" y="504.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
- <dc:Bounds height="80.0" width="100.0" x="591.0" y="507.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
- <dc:Bounds height="80.0" width="100.0" x="747.0" y="507.0"/>
- </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="174.0" y="544.0"/>
- <di:waypoint xsi:type="dc:Point" x="214.0" y="544.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="191.0" y="544.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="691.0" y="547.0"/>
- <di:waypoint xsi:type="dc:Point" x="747.0" y="547.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="704.0" y="547.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
- <dc:Bounds height="36.0" width="36.0" x="929.0" y="615.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="947.0" y="656.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="847.0" y="547.0"/>
- <di:waypoint xsi:type="dc:Point" x="947.0" y="547.0"/>
- <di:waypoint xsi:type="dc:Point" x="947.0" y="615.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="872.0" y="547.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="404.0" y="92.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="228.0" x="326.0" y="167.0"/>
- </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="303.0" y="118.0"/>
- <di:waypoint xsi:type="dc:Point" x="383.0" y="118.0"/>
- <di:waypoint xsi:type="dc:Point" x="383.0" y="117.0"/>
- <di:waypoint xsi:type="dc:Point" x="404.0" y="117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="323.0" y="118.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="912.0" y="92.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="184.0" x="846.0" y="167.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_168">
- <di:waypoint xsi:type="dc:Point" x="429.0" y="92.0"/>
- <di:waypoint xsi:type="dc:Point" x="429.0" y="63.0"/>
- <di:waypoint xsi:type="dc:Point" x="503.0" y="63.0"/>
- <di:waypoint xsi:type="dc:Point" x="552.0" y="63.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="473.0" y="63.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_160">
- <di:waypoint xsi:type="dc:Point" x="652.0" y="63.0"/>
- <di:waypoint xsi:type="dc:Point" x="725.0" y="63.0"/>
- </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.0" y="63.0"/>
- <di:waypoint xsi:type="dc:Point" x="862.0" y="63.0"/>
- <di:waypoint xsi:type="dc:Point" x="937.0" y="63.0"/>
- <di:waypoint xsi:type="dc:Point" x="937.0" y="92.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="888.0" y="63.0"/>
- </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="454.0" y="117.0"/>
- <di:waypoint xsi:type="dc:Point" x="912.0" y="117.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="676.0" y="117.0"/>
- </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.0" y="142.0"/>
- <di:waypoint xsi:type="dc:Point" x="937.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="29.0" y="229.0"/>
- <di:waypoint xsi:type="dc:Point" x="29.0" y="308.0"/>
- <di:waypoint xsi:type="dc:Point" x="104.0" y="309.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="571.0" y="229.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="414.0" y="343.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="195.0" x="342.0" y="398.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_CallActivity_13" targetElement="_BPMNShape_ExclusiveGateway_225">
- <di:waypoint xsi:type="dc:Point" x="362.0" y="309.0"/>
- <di:waypoint xsi:type="dc:Point" x="383.0" y="309.0"/>
- <di:waypoint xsi:type="dc:Point" x="439.0" y="309.0"/>
- <di:waypoint xsi:type="dc:Point" x="439.0" y="343.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="421.0" y="309.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_171">
- <di:waypoint xsi:type="dc:Point" x="464.0" y="368.0"/>
- <di:waypoint xsi:type="dc:Point" x="485.0" y="368.0"/>
- <di:waypoint xsi:type="dc:Point" x="485.0" y="304.0"/>
- <di:waypoint xsi:type="dc:Point" x="552.0" y="304.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="502.0" y="309.0"/>
- </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="652.0" y="304.0"/>
- <di:waypoint xsi:type="dc:Point" x="732.0" y="304.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="660.0" y="304.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="912.0" y="343.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="155.0" x="860.0" y="398.0"/>
- </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.0" y="117.0"/>
- <di:waypoint xsi:type="dc:Point" x="1025.0" y="117.0"/>
- <di:waypoint xsi:type="dc:Point" x="1025.0" y="212.0"/>
- <di:waypoint xsi:type="dc:Point" x="19.0" y="212.0"/>
- <di:waypoint xsi:type="dc:Point" x="19.0" y="368.0"/>
- <di:waypoint xsi:type="dc:Point" x="414.0" y="368.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="792.0" y="187.0"/>
- </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="464.0" y="368.0"/>
- <di:waypoint xsi:type="dc:Point" x="912.0" y="368.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="678.0" y="368.0"/>
- </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="832.0" y="304.0"/>
- <di:waypoint xsi:type="dc:Point" x="937.0" y="304.0"/>
- <di:waypoint xsi:type="dc:Point" x="937.0" y="343.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="907.0" y="304.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="937.0" y="393.0"/>
- <di:waypoint xsi:type="dc:Point" x="937.0" y="464.0"/>
- <di:waypoint xsi:type="dc:Point" x="483.0" y="464.0"/>
- <di:waypoint xsi:type="dc:Point" x="34.0" y="464.0"/>
- <di:waypoint xsi:type="dc:Point" x="34.0" y="544.0"/>
- <di:waypoint xsi:type="dc:Point" x="74.0" y="544.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="576.0" y="464.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="476.0" y="607.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="142.0" x="430.0" y="662.0"/>
- </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="962.0" y="368.0"/>
- <di:waypoint xsi:type="dc:Point" x="1029.0" y="368.0"/>
- <di:waypoint xsi:type="dc:Point" x="1029.0" y="448.0"/>
- <di:waypoint xsi:type="dc:Point" x="25.0" y="448.0"/>
- <di:waypoint xsi:type="dc:Point" x="25.0" y="632.0"/>
- <di:waypoint xsi:type="dc:Point" x="476.0" y="632.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="792.0" y="418.0"/>
- </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="526.0" y="632.0"/>
- <di:waypoint xsi:type="dc:Point" x="781.0" y="632.0"/>
- <di:waypoint xsi:type="dc:Point" x="781.0" y="633.0"/>
- <di:waypoint xsi:type="dc:Point" x="929.0" y="633.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="762.0" y="632.0"/>
- </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="526.0" y="632.0"/>
- <di:waypoint xsi:type="dc:Point" x="551.0" y="632.0"/>
- <di:waypoint xsi:type="dc:Point" x="551.0" y="576.0"/>
- <di:waypoint xsi:type="dc:Point" x="551.0" y="547.0"/>
- <di:waypoint xsi:type="dc:Point" x="591.0" y="547.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="27.0" x="561.0" y="553.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="348.0" y="504.0"/>
- </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="314.0" y="544.0"/>
- <di:waypoint xsi:type="dc:Point" x="348.0" y="544.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="330.0" y="544.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="448.0" y="544.0"/>
- <di:waypoint xsi:type="dc:Point" x="501.0" y="544.0"/>
- <di:waypoint xsi:type="dc:Point" x="501.0" y="607.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="498.0" y="549.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds height="150.0" width="469.0" x="48.0" y="708.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_59" bpmnElement="CatchExceptions">
- <dc:Bounds height="36.0" width="36.0" x="66.0" y="759.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="109.0" x="60.0" y="804.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_281" bpmnElement="LogSaveWorkflowException">
- <dc:Bounds height="80.0" width="100.0" x="204.0" y="737.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="379.0" y="758.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="499.0" y="754.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">
- <dc:Bounds height="36.0" width="36.0" x="623.0" y="754.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="641.0" y="795.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="102.0" y="777.0"/>
- <di:waypoint xsi:type="dc:Point" x="204.0" y="777.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="147.0" y="777.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="304.0" y="777.0"/>
- <di:waypoint xsi:type="dc:Point" x="341.0" y="777.0"/>
- <di:waypoint xsi:type="dc:Point" x="341.0" y="776.0"/>
- <di:waypoint xsi:type="dc:Point" x="379.0" y="776.0"/>
- </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="535.0" y="772.0"/>
- <di:waypoint xsi:type="dc:Point" x="623.0" y="772.0"/>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
+dcvfmr.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="InitializeVariables" targetRef="ExclusiveGateway_1" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0a0hroy" name="Rollback Update AAI Generic VNF?" default="SequenceFlow_185bo77">
+ <bpmn2:incoming>SequenceFlow_0djpj3r</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_15</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_10</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0djpj3r</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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.openecomp.mso.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_3" />
+ </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="203" 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="203" y="118" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="74" y="118" width="6" height="6" />
+ </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_168" bpmnElement="PrepareUpdateAAIVfModulePrep">
+ <dc:Bounds x="552" y="23" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
+ <dc:Bounds x="95" y="507" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
+ <dc:Bounds x="253" y="507" 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="195" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="253" y="547" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="216" y="547" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
+ <dc:Bounds x="543" y="502" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
+ <dc:Bounds x="723" y="502" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
+ <dc:Bounds x="65" y="742" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
+ <dc:Bounds x="205" y="742" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
+ <dc:Bounds x="582" y="745" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
+ <dc:Bounds x="738" y="745" 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="165" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="205" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="185" y="782" 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="682" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="698" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
+ <dc:Bounds x="920" y="853" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="938" y="894" 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="838" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="938" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="938" y="853" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="866" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds x="404" y="92" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326" y="167" width="228" height="22" />
+ </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="303" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="383" y="118" />
+ <di:waypoint xsi:type="dc:Point" x="383" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="404" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="323" y="118" width="6" height="6" />
+ </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="892" y="152" width="90" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_168">
+ <di:waypoint xsi:type="dc:Point" x="429" y="92" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="503" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="552" y="63" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="473" y="63" width="6" height="6" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_160">
+ <di:waypoint xsi:type="dc:Point" x="652" y="63" />
+ <di:waypoint xsi:type="dc:Point" x="725" y="63" />
+ </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="454" y="117" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="676" y="117" width="6" height="6" />
+ </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="291" />
+ <di:waypoint xsi:type="dc:Point" x="203" y="291" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="496" y="233" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds x="405" y="581" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="389" y="636" width="83" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_CallActivity_13" targetElement="_BPMNShape_ExclusiveGateway_225">
+ <di:waypoint xsi:type="dc:Point" x="353" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="374" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="430" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="430" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="415" y="547" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_171">
+ <di:waypoint xsi:type="dc:Point" x="455" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="543" y="542" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="498" y="547" width="17" height="13" />
+ </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="643" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="723" y="542" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="654" y="542" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
+ <dc:Bounds x="903" y="581" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="636" width="78" height="25" />
+ </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="357" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="357" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="501" y="187" width="12" height="13" />
+ </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="455" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="903" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="665" y="606" width="13" height="13" />
+ </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="823" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="542" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="901" y="542" 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="928" y="631" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="474" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="25" y="702" />
+ <di:waypoint xsi:type="dc:Point" x="25" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="65" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="564" y="702" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
+ <dc:Bounds x="467" y="845" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="456" y="900" width="71" height="25" />
+ </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="953" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="1020" y="686" />
+ <di:waypoint xsi:type="dc:Point" x="16" y="686" />
+ <di:waypoint xsi:type="dc:Point" x="16" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="870" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786" y="656" width="13" height="13" />
+ </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="517" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="772" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="772" y="871" />
+ <di:waypoint xsi:type="dc:Point" x="920" y="871" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="750" y="870" width="13" height="13" />
+ </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="517" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="870" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="814" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="785" />
+ <di:waypoint xsi:type="dc:Point" x="582" y="785" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="557" y="791" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_1">
+ <dc:Bounds x="339" y="742" 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="305" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="339" y="782" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="324" y="782" 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="439" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="782" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="845" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="492" y="787" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds x="18" y="1012" width="469" height="150" />
+ </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="174" y="1041" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">
+ <dc:Bounds x="349" y="1062" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="367" y="1098" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="469" y="1058" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="487" y="1094" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">
+ <dc:Bounds x="593" y="1058" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="611" 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="174" y="1081" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="120" y="1081" 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="274" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="1080" />
+ <di:waypoint xsi:type="dc:Point" x="349" y="1080" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326" y="1071" 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="505" y="1076" />
+ <di:waypoint xsi:type="dc:Point" x="593" y="1076" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="550" y="1051" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0a0hroy_di" bpmnElement="ExclusiveGateway_0a0hroy" isMarkerVisible="true">
+ <dc:Bounds x="404.308277027027" y="332.23902027027026" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="388" y="382.23902027027026" width="84" height="37" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0mnb4d7_di" bpmnElement="Task_08csf14">
+ <dc:Bounds x="203" y="251" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1shi2a6_di" bpmnElement="Task_18r7u02">
+ <dc:Bounds x="543" y="251" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0zvct4i_di" bpmnElement="Task_01ajtiy">
+ <dc:Bounds x="738" y="251" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0djpj3r_di" bpmnElement="SequenceFlow_0djpj3r">
+ <di:waypoint xsi:type="dc:Point" x="303" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="429" y="333" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="366" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0uvarlv_di" bpmnElement="ExclusiveGateway_0uvarlv" isMarkerVisible="true">
+ <dc:Bounds x="912" y="332.4552364864865" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="897" y="382.4552364864865" width="80" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_185bo77_di" bpmnElement="SequenceFlow_185bo77">
+ <di:waypoint xsi:type="dc:Point" x="454" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="357" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="692" y="357" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_111l1he_di" bpmnElement="SequenceFlow_111l1he">
+ <di:waypoint xsi:type="dc:Point" x="454" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="543" y="291" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="297" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ca4brn_di" bpmnElement="SequenceFlow_0ca4brn">
+ <di:waypoint xsi:type="dc:Point" x="643" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="684" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="684" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="738" y="291" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="699" y="291" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19r2uus_di" bpmnElement="SequenceFlow_19r2uus">
+ <di:waypoint xsi:type="dc:Point" x="838" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="291" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="332" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="888" y="276" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p0v6yk_di" bpmnElement="SequenceFlow_1p0v6yk">
+ <di:waypoint xsi:type="dc:Point" x="937" y="382" />
+ <di:waypoint xsi:type="dc:Point" x="937" y="468" />
+ <di:waypoint xsi:type="dc:Point" x="38" y="468" />
+ <di:waypoint xsi:type="dc:Point" x="38" y="547" />
+ <di:waypoint xsi:type="dc:Point" x="95" y="547" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="498" y="476" width="18" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03i4czf_di" bpmnElement="SequenceFlow_03i4czf">
+ <di:waypoint xsi:type="dc:Point" x="962" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="357" />
+ <di:waypoint xsi:type="dc:Point" x="1027" y="453" />
+ <di:waypoint xsi:type="dc:Point" x="21" y="453" />
+ <di:waypoint xsi:type="dc:Point" x="21" y="606" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="606" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="499" y="427" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn
index 9477aac5e8..de88284db6 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn
@@ -1,675 +1,675 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_FhrCQG2BEeaNdqnn65BT4A" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="DoCreateVfModuleVolumeV1" name="DoCreateVfModuleVolumeV1" isExecutable="true">
- <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_FhrCQG2BEeaNdqnn65BT4A" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="DoCreateVfModuleVolumeV1" name="DoCreateVfModuleVolumeV1" isExecutable="true">
+ <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_callRestAaiCloudRegion"/>
- <bpmn2:scriptTask id="ScriptTask_callRestAaiCloudRegion" name="Call REST AAI Cloud Region" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_callRestAaiCloudRegion"/>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiCloudRegion" name="Call REST AAI Cloud Region" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.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 com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.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.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.executeMethod('buildWorkflowException', execution, 2500, "Volume group $DCVFMODVOLV1_volumeGroupName 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">#{DCVFMODVOLV1_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 com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.executeMethod('buildWorkflowException', execution, 2500, "Volume group $DCVFMODVOLV1_volumeGroupName 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">#{DCVFMODVOLV1_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.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.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 com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.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.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.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 com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.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.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.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="DCVFMODVOLV1_createVnfARequest" target="vnfAdapterRestV1Request"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:out source="vnfAdapterRestV1Response" target="DCVFMODVOLV1_createVnfAResponse"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- <camunda:out source="VNFREST_vnfAdapterStatusCode" target="DCVFMODVOLV1_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_3</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="CallActivity_callVnfAdapterCreate" targetRef="ExclusiveGateway_isVnfAdaptyerCallSuccess"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_5" name="" attachedToRef="ScriptTask_callRestAaiVolumeGrp">
- <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_5"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="BoundaryEvent_5" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_isVnfAdaptyerCallSuccess" name="Is VNF Adapter call success?" default="SequenceFlow_vnfAdapterFail">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_vnfAdapterFail</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_vnfAdapterSuccess</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterFail" name="No" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ExclusiveGateway_isRollbackEnabled2"/>
- <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterSuccess" name="Yes" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ScriptTask_callRestAaiRequeryVolGrpNm">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_callRestAaiRequeryVolGrpNm" name="Call REST AAI Requery Volume Group Name" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_vnfAdapterSuccess</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.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="DCVFMODVOLV1_createVnfARequest" 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:out source="vnfAdapterRestV1Response" target="DCVFMODVOLV1_createVnfAResponse"/>
+ <camunda:out source="WorkflowException" target="WorkflowException"/>
+ <camunda:out source="VNFREST_vnfAdapterStatusCode" target="DCVFMODVOLV1_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_3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="CallActivity_callVnfAdapterCreate" targetRef="ExclusiveGateway_isVnfAdaptyerCallSuccess"/>
+ <bpmn2:boundaryEvent id="BoundaryEvent_5" name="" attachedToRef="ScriptTask_callRestAaiVolumeGrp">
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_5"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="BoundaryEvent_5" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isVnfAdaptyerCallSuccess" name="Is VNF Adapter call success?" default="SequenceFlow_vnfAdapterFail">
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterFail</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_vnfAdapterSuccess</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterFail" name="No" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ExclusiveGateway_isRollbackEnabled2"/>
+ <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterSuccess" name="Yes" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ScriptTask_callRestAaiRequeryVolGrpNm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_callRestAaiRequeryVolGrpNm" name="Call REST AAI Requery Volume Group Name" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterSuccess</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="ScriptTask_callRestAaiRequeryVolGrpNm" targetRef="ScriptTask_callRestAaiVolumeGrp"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_compensateCreateVolGrp" name="" attachedToRef="ScriptTask_callRestAaiCreateVolumeGrp">
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_2" waitForCompletion="true"/>
- </bpmn2:boundaryEvent>
- <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 com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="ScriptTask_callRestAaiRequeryVolGrpNm" targetRef="ScriptTask_callRestAaiVolumeGrp"/>
+ <bpmn2:boundaryEvent id="BoundaryEvent_compensateCreateVolGrp" name="" attachedToRef="ScriptTask_callRestAaiCreateVolumeGrp">
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_2" waitForCompletion="true"/>
+ </bpmn2:boundaryEvent>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="EndEvent_1"/>
- <bpmn2:scriptTask id="ScriptTask_deleteVolumeGroup" name="Delete Volume Group" isForCompensation="true" scriptFormat="groovy">
- <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="EndEvent_1"/>
+ <bpmn2:scriptTask id="ScriptTask_deleteVolumeGroup" name="Delete Volume Group" isForCompensation="true" scriptFormat="groovy">
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.executeMethod('callRESTDeleteAAIVolumeGroup', execution, isDebugLogEnabled)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <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 com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.executeMethod('callRESTDeleteAAIVolumeGroup', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.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 com.att.bpm.scripts.*
+doCreateVfModuleVolumeV1.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.openecomp.mso.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
-doCreateVfModuleVolumeV1.executeMethod('prepareVnfAdapterCreateRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_prepareVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCreate"/>
- <bpmn2:boundaryEvent id="BoundaryEvent_compensateVnfAdapterCreate" name="" attachedToRef="CallActivity_callVnfAdapterCreate">
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
- </bpmn2:boundaryEvent>
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" name="Rollback AAI Create Volume Group">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackAaiCreateVolumeGroup" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" targetRef="EndEvent_4"/>
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackVnfAdapterCreate" name="Rollback VNF Adapter Create">
- <bpmn2:incoming>SequenceFlow_rollbackIsEnabled1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_3" activityRef="CallActivity_callVnfAdapterCreate" waitForCompletion="true"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="IntermediateThrowEvent_rollbackVnfAdapterCreate" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbakcEnabled1" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled1">
- <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled1</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled1</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled1" name="Yes" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="IntermediateThrowEvent_rollbackVnfAdapterCreate">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled1" name="No" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="EndEvent_4"/>
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" name="Rollback AAI Create Volume Group">
- <bpmn2:incoming>SequenceFlow_rollbackIsEnabled2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackCreateVolGrpName1" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" targetRef="EndEvent_5"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbackEnabled2" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled2">
- <bpmn2:incoming>SequenceFlow_vnfAdapterFail</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled2</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled2</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled2" name="Yes" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled2" name="No" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="EndEvent_5"/>
- <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:callActivity id="CallActivity_callVnfAdapterCallback" name="Call VNF Adapter Rollback" isForCompensation="true" calledElement="vnfAdapterRestV1">
- <bpmn2:extensionElements>
- <camunda:in source="DCVFMODVOLV1_rollbackVnfARequest" target="vnfAdapterRestV1Request"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:out source="vnfAdapterRestV1Response" target="CCINVOL_rollbackVnfAResponse"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- </bpmn2:extensionElements>
- </bpmn2:callActivity>
- <bpmn2:subProcess id="SubProcess_catchTriggeredException" name="Catch Triggered MsoException" triggeredByEvent="true">
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolume21" name="Rollback Create AAi Volume Group">
- <bpmn2:incoming>SequenceFlow_rollbackEnabledYes91</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
- <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackdreateVolume21" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
- </bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolume21" targetRef="EndEvent_3"/>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_isRolbackEnabled90" name="Is Rollback Enabled?" default="SequenceFlow_rollbackNotEnabled92">
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_rollbackEnabledYes91</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_rollbackNotEnabled92</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_rollbackEnabledYes91" name="Yes" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolume21">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_rollbackNotEnabled92" name="No" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="EndEvent_3"/>
- <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch MsoException">
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_4" errorRef="Error_2"/>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ExclusiveGateway_isRolbackEnabled90"/>
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_rollbackNotEnabled92</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:boundaryEvent id="BoundaryEvent_catchError2" name="" attachedToRef="ScriptTask_callRestAaiRequeryVolGrpNm">
- <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_9"/>
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="BoundaryEvent_catchError2" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>
- <bpmn2:endEvent id="EndEvent_4" name="End">
- <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled1</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_5" name="End">
- <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled2</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_6" name="End">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- </bpmn2:endEvent>
- <bpmn2:textAnnotation id="TextAnnotation_2">
- <bpmn2:text>WorkflowException should already have been created in VNF create subflow</bpmn2:text>
- </bpmn2:textAnnotation>
- <bpmn2:association id="Association_2" sourceRef="TextAnnotation_2" targetRef="EndEvent_5"/>
- <bpmn2:association id="Association_3" sourceRef="BoundaryEvent_compensateCreateVolGrp" targetRef="ScriptTask_deleteVolumeGroup"/>
- <bpmn2:association id="Association_1" sourceRef="BoundaryEvent_compensateVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCallback"/>
- <bpmn2:textAnnotation id="TextAnnotation_1">
- <bpmn2:text>Catch MsoException triggered by Plugin. The vnfAdapterRest subflow is currently not directly throwing the BPMNError(MSOException.</bpmn2:text>
- </bpmn2:textAnnotation>
- <bpmn2:association id="Association_4" sourceRef="TextAnnotation_1" targetRef="SubProcess_catchTriggeredException"/>
- </bpmn2:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleVolumeV1">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_doCreateVfModuleVolume">
- <dc:Bounds height="36.0" width="36.0" x="252.0" y="129.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="253.0" y="170.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="ScriptTask_preProcessRequest">
- <dc:Bounds height="80.0" width="100.0" x="420.0" y="107.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_287" bpmnElement="ScriptTask_callRestAaiCloudRegion">
- <dc:Bounds height="80.0" width="100.0" x="588.0" y="106.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="ScriptTask_callRestAaiQueryVolGrpName">
- <dc:Bounds height="80.0" width="100.0" x="937.0" y="107.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_247" bpmnElement="ExclusiveGateway_aaiReturnCode404" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1118.0" y="121.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="128.0" x="1079.0" y="176.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="ScriptTask_callRestAaiCreateVolumeGrp">
- <dc:Bounds height="80.0" width="100.0" x="252.0" y="396.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="ScriptTask_prepareVnfAdapterCreate">
- <dc:Bounds height="80.0" width="100.0" x="420.0" y="396.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_32" bpmnElement="CallActivity_callVnfAdapterCreate">
- <dc:Bounds height="80.0" width="100.0" x="576.0" y="396.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="ScriptTask_callRestAaiRequeryVolGrpNm">
- <dc:Bounds height="80.0" width="100.0" x="923.0" y="396.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="ScriptTask_callRestAaiVolumeGrp">
- <dc:Bounds height="80.0" width="100.0" x="1068.0" y="396.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_294" bpmnElement="ScriptTask_prepareDbInfraRequest">
- <dc:Bounds height="80.0" width="100.0" x="1068.0" y="648.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1100.0" y="782.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1104.0" y="823.0"/>
- </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="288.0" y="147.0"/>
- <di:waypoint xsi:type="dc:Point" x="420.0" y="147.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="315.0" y="147.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="1143.0" y="171.0"/>
- <di:waypoint xsi:type="dc:Point" x="1144.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="811.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="301.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="302.0" y="396.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="573.0" y="232.0"/>
- </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="352.0" y="436.0"/>
- <di:waypoint xsi:type="dc:Point" x="420.0" y="436.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="383.0" y="544.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.0" y="436.0"/>
- <di:waypoint xsi:type="dc:Point" x="576.0" y="436.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="545.0" y="544.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ScriptTask_287">
- <di:waypoint xsi:type="dc:Point" x="520.0" y="147.0"/>
- <di:waypoint xsi:type="dc:Point" x="560.0" y="147.0"/>
- <di:waypoint xsi:type="dc:Point" x="560.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="588.0" y="146.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="557.0" y="147.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="688.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="720.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="720.0" y="147.0"/>
- <di:waypoint xsi:type="dc:Point" x="750.0" y="147.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="713.0" y="146.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_248" bpmnElement="ExclusiveGateway_isVnfAdaptyerCallSuccess" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="768.0" y="410.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="179.0" x="704.0" y="465.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_32" targetElement="_BPMNShape_ExclusiveGateway_248">
- <di:waypoint xsi:type="dc:Point" x="676.0" y="436.0"/>
- <di:waypoint xsi:type="dc:Point" x="715.0" y="436.0"/>
- <di:waypoint xsi:type="dc:Point" x="715.0" y="435.0"/>
- <di:waypoint xsi:type="dc:Point" x="768.0" y="435.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="712.0" y="435.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="ScriptTask_createVolGrpExistsException">
- <dc:Bounds height="80.0" width="100.0" x="1248.0" y="106.0"/>
- </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="1348.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="1414.0" y="146.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1373.0" y="146.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="1037.0" y="89.0"/>
- <di:waypoint xsi:type="dc:Point" x="1037.0" y="59.0"/>
- <di:waypoint xsi:type="dc:Point" x="1143.0" y="59.0"/>
- <di:waypoint xsi:type="dc:Point" x="1143.0" y="121.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1050.0" y="59.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="1168.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="1248.0" y="146.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1196.0" y="146.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_vnfAdapterFail" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ExclusiveGateway_253">
- <di:waypoint xsi:type="dc:Point" x="793.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="793.0" y="538.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="786.0" y="495.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_vnfAdapterSuccess" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="818.0" y="435.0"/>
- <di:waypoint xsi:type="dc:Point" x="870.0" y="435.0"/>
- <di:waypoint xsi:type="dc:Point" x="870.0" y="436.0"/>
- <di:waypoint xsi:type="dc:Point" x="923.0" y="436.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="856.0" y="436.0"/>
- </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="1023.0" y="436.0"/>
- <di:waypoint xsi:type="dc:Point" x="1068.0" y="436.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1043.0" y="436.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_3" bpmnElement="TextAnnotation_2">
- <dc:Bounds height="73.0" width="152.0" x="573.0" y="759.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_2" bpmnElement="Association_2" sourceElement="_BPMNShape_TextAnnotation_3" targetElement="_BPMNShape_EndEvent_240">
- <di:waypoint xsi:type="dc:Point" x="725.0" y="806.0"/>
- <di:waypoint xsi:type="dc:Point" x="775.0" y="813.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="ScriptTask_deleteVolumeGroup">
- <dc:Bounds height="80.0" width="100.0" x="372.0" y="518.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_57" bpmnElement="BoundaryEvent_compensateCreateVolGrp">
- <dc:Bounds height="36.0" width="36.0" x="334.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="349.0" y="499.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_3" bpmnElement="Association_3" sourceElement="_BPMNShape_BoundaryEvent_57" targetElement="_BPMNShape_ScriptTask_299">
- <di:waypoint xsi:type="dc:Point" x="367.0" y="494.0"/>
- <di:waypoint xsi:type="dc:Point" x="388.0" y="518.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_3" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup">
- <dc:Bounds height="36.0" width="36.0" x="1370.0" y="555.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="210.0" x="1283.0" y="596.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_60" bpmnElement="BoundaryEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="1150.0" y="378.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1165.0" y="419.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_BoundaryEvent_60" targetElement="_BPMNShape_ExclusiveGateway_252">
- <di:waypoint xsi:type="dc:Point" x="1168.0" y="378.0"/>
- <di:waypoint xsi:type="dc:Point" x="1168.0" y="347.0"/>
- <di:waypoint xsi:type="dc:Point" x="1364.0" y="347.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1193.0" y="387.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateThrowEvent_3" targetElement="_BPMNShape_EndEvent_239">
- <di:waypoint xsi:type="dc:Point" x="1388.0" y="591.0"/>
- <di:waypoint xsi:type="dc:Point" x="1388.0" y="717.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1383.0" y="715.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_35" bpmnElement="CallActivity_callVnfAdapterCallback">
- <dc:Bounds height="80.0" width="100.0" x="537.0" y="518.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_61" bpmnElement="BoundaryEvent_compensateVnfAdapterCreate">
- <dc:Bounds height="36.0" width="36.0" x="583.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="598.0" y="499.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_61" targetElement="_BPMNShape_CallActivity_35">
- <di:waypoint xsi:type="dc:Point" x="598.0" y="494.0"/>
- <di:waypoint xsi:type="dc:Point" x="594.0" y="518.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_4" bpmnElement="IntermediateThrowEvent_rollbackVnfAdapterCreate">
- <dc:Bounds height="36.0" width="36.0" x="1370.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="177.0" x="1300.0" y="499.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_IntermediateThrowEvent_4" targetElement="_BPMNShape_IntermediateThrowEvent_3">
- <di:waypoint xsi:type="dc:Point" x="1388.0" y="494.0"/>
- <di:waypoint xsi:type="dc:Point" x="1388.0" y="555.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1385.0" y="534.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="1118.0" y="476.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1115.0" y="670.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="1118.0" y="728.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="782.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1115.0" y="863.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="ScriptTask_callRestAaiQueryGenericVnf">
- <dc:Bounds height="80.0" width="100.0" x="750.0" y="106.0"/>
- </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="850.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="886.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="886.0" y="147.0"/>
- <di:waypoint xsi:type="dc:Point" x="937.0" y="147.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="883.0" y="147.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_62" bpmnElement="BoundaryEvent_catchAaiError">
- <dc:Bounds height="36.0" width="36.0" x="1019.0" y="89.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1034.0" y="130.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="1037.0" y="147.0"/>
- <di:waypoint xsi:type="dc:Point" x="1077.0" y="147.0"/>
- <di:waypoint xsi:type="dc:Point" x="1077.0" y="146.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="146.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_5" bpmnElement="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">
- <dc:Bounds height="36.0" width="36.0" x="775.0" y="648.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="210.0" x="818.0" y="656.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateThrowEvent_5" targetElement="_BPMNShape_EndEvent_240">
- <di:waypoint xsi:type="dc:Point" x="793.0" y="684.0"/>
- <di:waypoint xsi:type="dc:Point" x="793.0" y="798.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="790.0" y="732.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_isRollbakcEnabled1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1364.0" y="322.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="121.0" x="1329.0" y="377.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_rollbackIsEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_IntermediateThrowEvent_4">
- <di:waypoint xsi:type="dc:Point" x="1389.0" y="372.0"/>
- <di:waypoint xsi:type="dc:Point" x="1389.0" y="412.0"/>
- <di:waypoint xsi:type="dc:Point" x="1388.0" y="412.0"/>
- <di:waypoint xsi:type="dc:Point" x="1388.0" y="458.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1385.0" y="433.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_rollbackIsNotEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_EndEvent_239">
- <di:waypoint xsi:type="dc:Point" x="1414.0" y="347.0"/>
- <di:waypoint xsi:type="dc:Point" x="1524.0" y="347.0"/>
- <di:waypoint xsi:type="dc:Point" x="1524.0" y="550.0"/>
- <di:waypoint xsi:type="dc:Point" x="1524.0" y="735.0"/>
- <di:waypoint xsi:type="dc:Point" x="1406.0" y="735.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1513.0" y="392.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_253" bpmnElement="ExclusiveGateway_isRollbackEnabled2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="768.0" y="538.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="793.0" y="593.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_rollbackIsEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_IntermediateThrowEvent_5">
- <di:waypoint xsi:type="dc:Point" x="793.0" y="588.0"/>
- <di:waypoint xsi:type="dc:Point" x="793.0" y="648.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_rollbackIsNotEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_EndEvent_240">
- <di:waypoint xsi:type="dc:Point" x="818.0" y="563.0"/>
- <di:waypoint xsi:type="dc:Point" x="906.0" y="563.0"/>
- <di:waypoint xsi:type="dc:Point" x="906.0" y="815.0"/>
- <di:waypoint xsi:type="dc:Point" x="811.0" y="816.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="768.0" y="695.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_2" bpmnElement="SubProcess_catchTriggeredException" isExpanded="true">
- <dc:Bounds height="337.0" width="608.0" x="287.0" y="936.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_catchAllErrors">
- <dc:Bounds height="36.0" width="36.0" x="348.0" y="1112.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="127.0" x="303.0" y="1153.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_6" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolume21">
- <dc:Bounds height="36.0" width="36.0" x="540.0" y="1008.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="210.0" x="453.0" y="1049.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ExclusiveGateway_256">
- <di:waypoint xsi:type="dc:Point" x="384.0" y="1130.0"/>
- <di:waypoint xsi:type="dc:Point" x="454.0" y="1130.0"/>
- <di:waypoint xsi:type="dc:Point" x="454.0" y="1129.0"/>
- <di:waypoint xsi:type="dc:Point" x="532.0" y="1129.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="409.0" y="1130.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateThrowEvent_6" targetElement="_BPMNShape_EndEvent_238">
- <di:waypoint xsi:type="dc:Point" x="576.0" y="1026.0"/>
- <di:waypoint xsi:type="dc:Point" x="804.0" y="1026.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="729.0" y="1026.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_4" bpmnElement="TextAnnotation_1">
- <dc:Bounds height="97.0" width="229.0" x="123.0" y="792.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_Association_4" bpmnElement="Association_4" sourceElement="_BPMNShape_TextAnnotation_4" targetElement="_BPMNShape_SubProcess_2">
- <di:waypoint xsi:type="dc:Point" x="301.0" y="888.0"/>
- <di:waypoint xsi:type="dc:Point" x="366.0" y="936.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_64" bpmnElement="BoundaryEvent_catchError2">
- <dc:Bounds height="36.0" width="36.0" x="1005.0" y="378.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_BoundaryEvent_64" targetElement="_BPMNShape_ExclusiveGateway_252">
- <di:waypoint xsi:type="dc:Point" x="1023.0" y="378.0"/>
- <di:waypoint xsi:type="dc:Point" x="1023.0" y="290.0"/>
- <di:waypoint xsi:type="dc:Point" x="1389.0" y="294.0"/>
- <di:waypoint xsi:type="dc:Point" x="1389.0" y="322.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1118.0" y="291.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_isRolbackEnabled90" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="532.0" y="1104.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="128.0" x="493.0" y="1159.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_rollbackEnabledYes91" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_IntermediateThrowEvent_6">
- <di:waypoint xsi:type="dc:Point" x="557.0" y="1104.0"/>
- <di:waypoint xsi:type="dc:Point" x="557.0" y="1074.0"/>
- <di:waypoint xsi:type="dc:Point" x="558.0" y="1074.0"/>
- <di:waypoint xsi:type="dc:Point" x="558.0" y="1044.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="564.0" y="1084.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_rollbackNotEnabled92" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_EndEvent_238">
- <di:waypoint xsi:type="dc:Point" x="582.0" y="1129.0"/>
- <di:waypoint xsi:type="dc:Point" x="657.0" y="1129.0"/>
- <di:waypoint xsi:type="dc:Point" x="822.0" y="1129.0"/>
- <di:waypoint xsi:type="dc:Point" x="822.0" y="1044.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="636.0" y="1134.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="804.0" y="1008.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="822.0" y="1049.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
- <dc:Bounds height="36.0" width="36.0" x="1370.0" y="717.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1374.0" y="758.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_240" bpmnElement="EndEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="775.0" y="798.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="793.0" y="839.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_6">
- <dc:Bounds height="36.0" width="36.0" x="1414.0" y="128.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1418.0" y="169.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+doCreateVfModuleVolumeV1.executeMethod('prepareVnfAdapterCreateRequest', execution, isDebugLogEnabled)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_prepareVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCreate"/>
+ <bpmn2:boundaryEvent id="BoundaryEvent_compensateVnfAdapterCreate" name="" attachedToRef="CallActivity_callVnfAdapterCreate">
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" name="Rollback AAI Create Volume Group">
+ <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackAaiCreateVolumeGroup" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" targetRef="EndEvent_4"/>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackVnfAdapterCreate" name="Rollback VNF Adapter Create">
+ <bpmn2:incoming>SequenceFlow_rollbackIsEnabled1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_3" activityRef="CallActivity_callVnfAdapterCreate" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="IntermediateThrowEvent_rollbackVnfAdapterCreate" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbakcEnabled1" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled1">
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled1</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled1</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled1" name="Yes" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="IntermediateThrowEvent_rollbackVnfAdapterCreate">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled1" name="No" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="EndEvent_4"/>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" name="Rollback AAI Create Volume Group">
+ <bpmn2:incoming>SequenceFlow_rollbackIsEnabled2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackCreateVolGrpName1" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" targetRef="EndEvent_5"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbackEnabled2" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled2">
+ <bpmn2:incoming>SequenceFlow_vnfAdapterFail</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled2</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled2</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled2" name="Yes" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled2" name="No" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="EndEvent_5"/>
+ <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:callActivity id="CallActivity_callVnfAdapterCallback" name="Call VNF Adapter Rollback" isForCompensation="true" calledElement="vnfAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="DCVFMODVOLV1_rollbackVnfARequest" 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:out source="vnfAdapterRestV1Response" target="CCINVOL_rollbackVnfAResponse"/>
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
+ </bpmn2:extensionElements>
+ </bpmn2:callActivity>
+ <bpmn2:subProcess id="SubProcess_catchTriggeredException" name="Catch Triggered MsoException" triggeredByEvent="true">
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolume21" name="Rollback Create AAi Volume Group">
+ <bpmn2:incoming>SequenceFlow_rollbackEnabledYes91</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
+ <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackdreateVolume21" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolume21" targetRef="EndEvent_3"/>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_isRolbackEnabled90" name="Is Rollback Enabled?" default="SequenceFlow_rollbackNotEnabled92">
+ <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_rollbackEnabledYes91</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_rollbackNotEnabled92</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackEnabledYes91" name="Yes" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolume21">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_rollbackNotEnabled92" name="No" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="EndEvent_3"/>
+ <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch MsoException">
+ <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_4" errorRef="Error_2"/>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ExclusiveGateway_isRolbackEnabled90"/>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_rollbackNotEnabled92</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:subProcess>
+ <bpmn2:boundaryEvent id="BoundaryEvent_catchError2" name="" attachedToRef="ScriptTask_callRestAaiRequeryVolGrpNm">
+ <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_9"/>
+ </bpmn2:boundaryEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="BoundaryEvent_catchError2" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>
+ <bpmn2:endEvent id="EndEvent_4" name="End">
+ <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled1</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_5" name="End">
+ <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled2</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:endEvent id="EndEvent_6" name="End">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:textAnnotation id="TextAnnotation_2">
+ <bpmn2:text>WorkflowException should already have been created in VNF create subflow</bpmn2:text>
+ </bpmn2:textAnnotation>
+ <bpmn2:association id="Association_2" sourceRef="TextAnnotation_2" targetRef="EndEvent_5"/>
+ <bpmn2:association id="Association_3" sourceRef="BoundaryEvent_compensateCreateVolGrp" targetRef="ScriptTask_deleteVolumeGroup"/>
+ <bpmn2:association id="Association_1" sourceRef="BoundaryEvent_compensateVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCallback"/>
+ <bpmn2:textAnnotation id="TextAnnotation_1">
+ <bpmn2:text>Catch MsoException triggered by Plugin. The vnfAdapterRest subflow is currently not directly throwing the BPMNError(MSOException.</bpmn2:text>
+ </bpmn2:textAnnotation>
+ <bpmn2:association id="Association_4" sourceRef="TextAnnotation_1" targetRef="SubProcess_catchTriggeredException"/>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleVolumeV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_doCreateVfModuleVolume">
+ <dc:Bounds height="36.0" width="36.0" x="252.0" y="129.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="253.0" y="170.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="ScriptTask_preProcessRequest">
+ <dc:Bounds height="80.0" width="100.0" x="420.0" y="107.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_287" bpmnElement="ScriptTask_callRestAaiCloudRegion">
+ <dc:Bounds height="80.0" width="100.0" x="588.0" y="106.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="ScriptTask_callRestAaiQueryVolGrpName">
+ <dc:Bounds height="80.0" width="100.0" x="937.0" y="107.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_247" bpmnElement="ExclusiveGateway_aaiReturnCode404" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1118.0" y="121.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="128.0" x="1079.0" y="176.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="ScriptTask_callRestAaiCreateVolumeGrp">
+ <dc:Bounds height="80.0" width="100.0" x="252.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="ScriptTask_prepareVnfAdapterCreate">
+ <dc:Bounds height="80.0" width="100.0" x="420.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_32" bpmnElement="CallActivity_callVnfAdapterCreate">
+ <dc:Bounds height="80.0" width="100.0" x="576.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="ScriptTask_callRestAaiRequeryVolGrpNm">
+ <dc:Bounds height="80.0" width="100.0" x="923.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="ScriptTask_callRestAaiVolumeGrp">
+ <dc:Bounds height="80.0" width="100.0" x="1068.0" y="396.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_294" bpmnElement="ScriptTask_prepareDbInfraRequest">
+ <dc:Bounds height="80.0" width="100.0" x="1068.0" y="648.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1100.0" y="782.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1104.0" y="823.0"/>
+ </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="288.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="420.0" y="147.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="315.0" y="147.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="1143.0" y="171.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1144.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="811.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="301.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="302.0" y="396.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="573.0" y="232.0"/>
+ </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="352.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="420.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="383.0" y="544.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.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="576.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="545.0" y="544.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ScriptTask_287">
+ <di:waypoint xsi:type="dc:Point" x="520.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="560.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="560.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="588.0" y="146.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="557.0" y="147.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="688.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="720.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="720.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="750.0" y="147.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="713.0" y="146.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_248" bpmnElement="ExclusiveGateway_isVnfAdaptyerCallSuccess" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="768.0" y="410.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="179.0" x="704.0" y="465.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_32" targetElement="_BPMNShape_ExclusiveGateway_248">
+ <di:waypoint xsi:type="dc:Point" x="676.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="715.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="715.0" y="435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="768.0" y="435.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="712.0" y="435.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="ScriptTask_createVolGrpExistsException">
+ <dc:Bounds height="80.0" width="100.0" x="1248.0" y="106.0"/>
+ </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="1348.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1414.0" y="146.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1373.0" y="146.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="1037.0" y="89.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1037.0" y="59.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1143.0" y="59.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1143.0" y="121.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1050.0" y="59.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="1168.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1248.0" y="146.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1196.0" y="146.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_vnfAdapterFail" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ExclusiveGateway_253">
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="538.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="786.0" y="495.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_vnfAdapterSuccess" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ScriptTask_292">
+ <di:waypoint xsi:type="dc:Point" x="818.0" y="435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="870.0" y="435.0"/>
+ <di:waypoint xsi:type="dc:Point" x="870.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="923.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="856.0" y="436.0"/>
+ </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="1023.0" y="436.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1068.0" y="436.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1043.0" y="436.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_3" bpmnElement="TextAnnotation_2">
+ <dc:Bounds height="73.0" width="152.0" x="573.0" y="759.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_2" bpmnElement="Association_2" sourceElement="_BPMNShape_TextAnnotation_3" targetElement="_BPMNShape_EndEvent_240">
+ <di:waypoint xsi:type="dc:Point" x="725.0" y="806.0"/>
+ <di:waypoint xsi:type="dc:Point" x="775.0" y="813.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="ScriptTask_deleteVolumeGroup">
+ <dc:Bounds height="80.0" width="100.0" x="372.0" y="518.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_57" bpmnElement="BoundaryEvent_compensateCreateVolGrp">
+ <dc:Bounds height="36.0" width="36.0" x="334.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="349.0" y="499.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_3" bpmnElement="Association_3" sourceElement="_BPMNShape_BoundaryEvent_57" targetElement="_BPMNShape_ScriptTask_299">
+ <di:waypoint xsi:type="dc:Point" x="367.0" y="494.0"/>
+ <di:waypoint xsi:type="dc:Point" x="388.0" y="518.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_3" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup">
+ <dc:Bounds height="36.0" width="36.0" x="1370.0" y="555.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="210.0" x="1283.0" y="596.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_60" bpmnElement="BoundaryEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="1150.0" y="378.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1165.0" y="419.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_BoundaryEvent_60" targetElement="_BPMNShape_ExclusiveGateway_252">
+ <di:waypoint xsi:type="dc:Point" x="1168.0" y="378.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1168.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1364.0" y="347.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1193.0" y="387.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateThrowEvent_3" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="591.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="717.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1383.0" y="715.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_35" bpmnElement="CallActivity_callVnfAdapterCallback">
+ <dc:Bounds height="80.0" width="100.0" x="537.0" y="518.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_61" bpmnElement="BoundaryEvent_compensateVnfAdapterCreate">
+ <dc:Bounds height="36.0" width="36.0" x="583.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="598.0" y="499.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_61" targetElement="_BPMNShape_CallActivity_35">
+ <di:waypoint xsi:type="dc:Point" x="598.0" y="494.0"/>
+ <di:waypoint xsi:type="dc:Point" x="594.0" y="518.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_4" bpmnElement="IntermediateThrowEvent_rollbackVnfAdapterCreate">
+ <dc:Bounds height="36.0" width="36.0" x="1370.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="177.0" x="1300.0" y="499.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_IntermediateThrowEvent_4" targetElement="_BPMNShape_IntermediateThrowEvent_3">
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="494.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="555.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1385.0" y="534.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="1118.0" y="476.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1115.0" y="670.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="1118.0" y="728.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="782.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1115.0" y="863.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="ScriptTask_callRestAaiQueryGenericVnf">
+ <dc:Bounds height="80.0" width="100.0" x="750.0" y="106.0"/>
+ </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="850.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="886.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="937.0" y="147.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="883.0" y="147.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_62" bpmnElement="BoundaryEvent_catchAaiError">
+ <dc:Bounds height="36.0" width="36.0" x="1019.0" y="89.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1034.0" y="130.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="1037.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1077.0" y="147.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1077.0" y="146.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="146.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_5" bpmnElement="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">
+ <dc:Bounds height="36.0" width="36.0" x="775.0" y="648.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="210.0" x="818.0" y="656.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateThrowEvent_5" targetElement="_BPMNShape_EndEvent_240">
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="684.0"/>
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="798.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="790.0" y="732.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_isRollbakcEnabled1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1364.0" y="322.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="121.0" x="1329.0" y="377.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_rollbackIsEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_IntermediateThrowEvent_4">
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="372.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="412.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="412.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1388.0" y="458.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1385.0" y="433.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_rollbackIsNotEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_EndEvent_239">
+ <di:waypoint xsi:type="dc:Point" x="1414.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1524.0" y="347.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1524.0" y="550.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1524.0" y="735.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1406.0" y="735.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="1513.0" y="392.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_253" bpmnElement="ExclusiveGateway_isRollbackEnabled2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="768.0" y="538.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="793.0" y="593.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_rollbackIsEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_IntermediateThrowEvent_5">
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="588.0"/>
+ <di:waypoint xsi:type="dc:Point" x="793.0" y="648.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_rollbackIsNotEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_EndEvent_240">
+ <di:waypoint xsi:type="dc:Point" x="818.0" y="563.0"/>
+ <di:waypoint xsi:type="dc:Point" x="906.0" y="563.0"/>
+ <di:waypoint xsi:type="dc:Point" x="906.0" y="815.0"/>
+ <di:waypoint xsi:type="dc:Point" x="811.0" y="816.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="768.0" y="695.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_2" bpmnElement="SubProcess_catchTriggeredException" isExpanded="true">
+ <dc:Bounds height="337.0" width="608.0" x="287.0" y="936.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_catchAllErrors">
+ <dc:Bounds height="36.0" width="36.0" x="348.0" y="1112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="127.0" x="303.0" y="1153.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_6" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolume21">
+ <dc:Bounds height="36.0" width="36.0" x="540.0" y="1008.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="210.0" x="453.0" y="1049.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ExclusiveGateway_256">
+ <di:waypoint xsi:type="dc:Point" x="384.0" y="1130.0"/>
+ <di:waypoint xsi:type="dc:Point" x="454.0" y="1130.0"/>
+ <di:waypoint xsi:type="dc:Point" x="454.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="532.0" y="1129.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="409.0" y="1130.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateThrowEvent_6" targetElement="_BPMNShape_EndEvent_238">
+ <di:waypoint xsi:type="dc:Point" x="576.0" y="1026.0"/>
+ <di:waypoint xsi:type="dc:Point" x="804.0" y="1026.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="729.0" y="1026.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_4" bpmnElement="TextAnnotation_1">
+ <dc:Bounds height="97.0" width="229.0" x="123.0" y="792.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_Association_4" bpmnElement="Association_4" sourceElement="_BPMNShape_TextAnnotation_4" targetElement="_BPMNShape_SubProcess_2">
+ <di:waypoint xsi:type="dc:Point" x="301.0" y="888.0"/>
+ <di:waypoint xsi:type="dc:Point" x="366.0" y="936.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_64" bpmnElement="BoundaryEvent_catchError2">
+ <dc:Bounds height="36.0" width="36.0" x="1005.0" y="378.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_BoundaryEvent_64" targetElement="_BPMNShape_ExclusiveGateway_252">
+ <di:waypoint xsi:type="dc:Point" x="1023.0" y="378.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1023.0" y="290.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="294.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1389.0" y="322.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1118.0" y="291.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_isRolbackEnabled90" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="532.0" y="1104.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="128.0" x="493.0" y="1159.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_rollbackEnabledYes91" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_IntermediateThrowEvent_6">
+ <di:waypoint xsi:type="dc:Point" x="557.0" y="1104.0"/>
+ <di:waypoint xsi:type="dc:Point" x="557.0" y="1074.0"/>
+ <di:waypoint xsi:type="dc:Point" x="558.0" y="1074.0"/>
+ <di:waypoint xsi:type="dc:Point" x="558.0" y="1044.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="564.0" y="1084.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_rollbackNotEnabled92" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_EndEvent_238">
+ <di:waypoint xsi:type="dc:Point" x="582.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="657.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="822.0" y="1129.0"/>
+ <di:waypoint xsi:type="dc:Point" x="822.0" y="1044.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="636.0" y="1134.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="804.0" y="1008.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="822.0" y="1049.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds height="36.0" width="36.0" x="1370.0" y="717.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1374.0" y="758.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_240" bpmnElement="EndEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="775.0" y="798.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="793.0" y="839.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_6">
+ <dc:Bounds height="36.0" width="36.0" x="1414.0" y="128.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1418.0" y="169.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn
new file mode 100644
index 0000000000..5e88527676
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnf.bpmn
@@ -0,0 +1,492 @@
+<?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="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.openecomp.mso.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.openecomp.mso.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" />
+ </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="callGetVnf">
+ <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>found</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.openecomp.mso.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="Prepare&#10;&#10;Create Vnf Payload" scriptFormat="groovy">
+ <bpmn2:incoming>vnfExistNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.prepareCreateGenericVnf(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareCreateGenericVnf" targetRef="callPutVnf" />
+ <bpmn2:callActivity id="callPutVnf" name="Create (Put)&#10;&#10;Generic Vnf" calledElement="GenericPutVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoCVNF_genericVnfPayload" target="GENPV_vnfPayload" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DoCVNF_vnfId" target="GENPV_vnfId" />
+ <camunda:out source="GENPV_SuccessIndicator" target="GENPV_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="DoCVNF_type" target="GENPV_type" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0seif8n</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.openecomp.mso.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>SequenceFlow_15z3gpq</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0ay5l4b</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_0c5h00o" sourceRef="postProcessSDNCAssignRequest" targetRef="preProcessSDNCActivateRequest" />
+ <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="EndEvent_3" />
+ <bpmn2:scriptTask id="preProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ttqcwx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1q6udwm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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_0c5h00o</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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_0c5h00o</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1lalmvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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.openecomp.mso.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="SequenceFlow_0ay5l4b">
+ <bpmn2:incoming>SequenceFlow_1gc18ih</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ttqcwx</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0ay5l4b</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ttqcwx" name="yes" sourceRef="ExclusiveGateway_045rm8i" targetRef="preProcessSDNCAssignRequest">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion" ) == '1707'}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ay5l4b" name="no" sourceRef="ExclusiveGateway_045rm8i" targetRef="EndEvent_3" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0seif8n" sourceRef="callPutVnf" targetRef="postProcessCreateGenericVnf" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1gc18ih" sourceRef="postProcessCreateGenericVnf" targetRef="ExclusiveGateway_045rm8i" />
+ <bpmn2:scriptTask id="postProcessCreateGenericVnf" name="PostProcess Create Generic Vnf" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0seif8n</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1gc18ih</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.postProcessCreateGenericVnf(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="642" y="214" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="678" y="244" width="148" height="22" />
+ </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="642" y="239" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="574" y="224.5" 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="667" y="214" />
+ <di:waypoint xsi:type="dc:Point" x="667" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="720" y="155" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="174" width="22" height="22" />
+ </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="667" y="264" />
+ <di:waypoint xsi:type="dc:Point" x="667" y="328" />
+ <di:waypoint xsi:type="dc:Point" x="720" y="328" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="282" width="29" height="22" />
+ </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="935" 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="935" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="254" width="22" height="22" />
+ </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="1126" y="537" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1144" y="578" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_CallActivity_61">
+ <di:waypoint xsi:type="dc:Point" x="1035" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1080" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1058" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_61" bpmnElement="callPutVnf">
+ <dc:Bounds x="1080" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <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_0c5h00o_di" bpmnElement="SequenceFlow_0c5h00o">
+ <di:waypoint xsi:type="dc:Point" x="593" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="640" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="617" 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="740" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="794" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="767" 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="894" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="949" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="922" 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="1049" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1126" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1088" 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="640" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1ieo30p_di" bpmnElement="callSDNCAdapterVNFTopologyActivate">
+ <dc:Bounds x="794" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_04votlb_di" bpmnElement="postProcessSDNCActivateRequest">
+ <dc:Bounds x="949" y="515" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_045rm8i_di" bpmnElement="ExclusiveGateway_045rm8i" isMarkerVisible="true">
+ <dc:Bounds x="1336" y="215" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1334" y="163" width="54" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ttqcwx_di" bpmnElement="SequenceFlow_0ttqcwx">
+ <di:waypoint xsi:type="dc:Point" x="1361" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="1361" 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="726" y="460" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ay5l4b_di" bpmnElement="SequenceFlow_0ay5l4b">
+ <di:waypoint xsi:type="dc:Point" x="1361" y="265" />
+ <di:waypoint xsi:type="dc:Point" x="1361" y="555" />
+ <di:waypoint xsi:type="dc:Point" x="1162" y="555" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1400" y="398" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0seif8n_di" bpmnElement="SequenceFlow_0seif8n">
+ <di:waypoint xsi:type="dc:Point" x="1180" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1213" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1197" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gc18ih_di" bpmnElement="SequenceFlow_1gc18ih">
+ <di:waypoint xsi:type="dc:Point" x="1313" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1336" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1325" y="225" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0y55cyz_di" bpmnElement="postProcessCreateGenericVnf">
+ <dc:Bounds x="1213" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
new file mode 100644
index 0000000000..433957572d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModules.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.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.openecomp.mso.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="requestId" target="requestId" />
+ <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="&#34;true&#34;" 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" />
+ </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="CreateVNF" />
+ <bpmn:callActivity id="CreateAddOnVfModule" name="Create Add-On VF Module" calledElement="DoCreateVfModule">
+ <bpmn:extensionElements>
+ <camunda:in source="requestId" target="requestId" />
+ <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="&#34;false&#34;" 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" />
+ </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.openecomp.mso.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_07gl6gw</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1a6wyuu</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="requestId" target="requestId" />
+ <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="cloudConfiguration" target="cloudConfiguration" />
+ <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" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1xd3ri5</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_08i3uo6</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.openecomp.mso.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_08i3uo6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ifw9tw</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_08i3uo6" sourceRef="CreateVNF" targetRef="QueryCatalogDB" />
+ <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[![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[![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="FinishProcessingInitialCountDeployment" />
+ <bpmn:sequenceFlow id="SequenceFlow_07gl6gw" sourceRef="FinishProcessingInitialCountDeployment" targetRef="ExclusiveGateway_1vyqr5o" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ifw9tw" sourceRef="QueryCatalogDB" targetRef="GenerateBaseModuleName" />
+ <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" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1ifw9tw</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" />
+ </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:scriptTask id="FinishProcessingInitialCountDeployment" name="Finish Processing Initial Count Deployment" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1vrogpr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07gl6gw</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.finisthProcessingInitialCountDeployment(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
+def doCreateVnfAndModules = new DoCreateVnfAndModules()
+doCreateVnfAndModules.validateBaseModule(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:process>
+ <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="888" 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="430" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="393" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0auiwq0_di" bpmnElement="CreateAddOnVfModule">
+ <dc:Bounds x="1749" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1eeaxqn_di" bpmnElement="Task_1lfmdks">
+ <dc:Bounds x="1888" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1h41bs7_di" bpmnElement="EndEvent_0v6povc">
+ <dc:Bounds x="2011" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2029" 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="1849" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1888" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1869" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1vyqr5o_di" bpmnElement="ExclusiveGateway_1vyqr5o" isMarkerVisible="true">
+ <dc:Bounds x="1166" y="140" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1150" y="190" width="84" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_132bohl_di" bpmnElement="SequenceFlow_132bohl">
+ <di:waypoint xsi:type="dc:Point" x="1191" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1191" y="36" />
+ <di:waypoint xsi:type="dc:Point" x="2029" y="36" />
+ <di:waypoint xsi:type="dc:Point" x="2029" y="147" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1612" y="21" width="14" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0zr4ioh_di" bpmnElement="CreateVNF">
+ <dc:Bounds x="430" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tknqn1_di" bpmnElement="PreProcessAddOnModule">
+ <dc:Bounds x="1300" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1u6qcio_di" bpmnElement="QueryCatalogDB">
+ <dc:Bounds x="590" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08i3uo6_di" bpmnElement="SequenceFlow_08i3uo6">
+ <di:waypoint xsi:type="dc:Point" x="530" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="560" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hx9s0y_di" bpmnElement="ExclusiveGateway_1hx9s0y" isMarkerVisible="true">
+ <dc:Bounds x="1493" y="140" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1489" y="190" width="58" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jz6bqn_di" bpmnElement="SequenceFlow_0jz6bqn">
+ <di:waypoint xsi:type="dc:Point" x="1216" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1258" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1258" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1298" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1219" y="147" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kld3qt_di" bpmnElement="SequenceFlow_0kld3qt">
+ <di:waypoint xsi:type="dc:Point" x="1518" y="140" />
+ <di:waypoint xsi:type="dc:Point" x="1518" y="89" />
+ <di:waypoint xsi:type="dc:Point" x="1601" y="89" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1534" y="96" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mguf2m_di" bpmnElement="SequenceFlow_1mguf2m">
+ <di:waypoint xsi:type="dc:Point" x="1938" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1938" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1543" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1953" 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="1518" y="190" />
+ <di:waypoint xsi:type="dc:Point" x="1518" y="221" />
+ <di:waypoint xsi:type="dc:Point" x="1518" y="221" />
+ <di:waypoint xsi:type="dc:Point" x="1518" y="258" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1527" y="221" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07gl6gw_di" bpmnElement="SequenceFlow_07gl6gw">
+ <di:waypoint xsi:type="dc:Point" x="1468" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1192" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1191" y="190" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1330" y="283" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ifw9tw_di" bpmnElement="SequenceFlow_1ifw9tw">
+ <di:waypoint xsi:type="dc:Point" x="690" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="740" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="715" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hf7k7q_di" bpmnElement="SequenceFlow_1hf7k7q">
+ <di:waypoint xsi:type="dc:Point" x="840" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="888" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="864" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0rz8zl9_di" bpmnElement="GenerateBaseModuleName">
+ <dc:Bounds x="740" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0otq8mo_di" bpmnElement="GenerateAddOnModuleName">
+ <dc:Bounds x="1601" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1lh21yl_di" bpmnElement="SequenceFlow_1lh21yl">
+ <di:waypoint xsi:type="dc:Point" x="1701" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1749" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1725" 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="1400" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1493" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1447" y="140" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_144n0mg_di" bpmnElement="FinishProcessingInitialCountDeployment">
+ <dc:Bounds x="1468" y="258" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ixcnb6_di" bpmnElement="SequenceFlow_1ixcnb6">
+ <di:waypoint xsi:type="dc:Point" x="988" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1030" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1009" 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="1130" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1166" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1148" y="150" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1obevnp_di" bpmnElement="Task_054rz9i">
+ <dc:Bounds x="1030" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn
new file mode 100644
index 0000000000..2fba166dc4
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateVnfAndModulesRollback.bpmn
@@ -0,0 +1,282 @@
+<?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="LogSaveWorkflowException" />
+ <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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: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_0bmsi5h</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1srw52v</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_1r6wyy6</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1kr0r4a</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1yas9ol</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="EndEvent_1seag7u">
+ <bpmn2:incoming>SequenceFlow_04yd2yr</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1yas9ol</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.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvamr = new DoCreateVnfAndModulesRollback()
+dcvamr.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0bmsi5h" sourceRef="PreProcessRequest" targetRef="ExclusiveGateway_12v8g91" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ycq005" sourceRef="Task_1sbxjc8" targetRef="Task_0ifyxgt" />
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcvamr = new DoCreateVnfAndModulesRollback()
+dcvamr.preProcessCreateVfModuleRollback(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="Task_0ifyxgt" 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" />
+ </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_09ajxqr" />
+ <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_vnfId") != null}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_04yd2yr" sourceRef="Task_0p8fmrm" targetRef="EndEvent_1seag7u" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1yas9ol" name="no" sourceRef="ExclusiveGateway_09ajxqr" targetRef="EndEvent_1seag7u" />
+ <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="Task_0ifyxgt" 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.openecomp.mso.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: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="18" y="1012" width="469" height="150" />
+ </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="174" y="1041" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">
+ <dc:Bounds x="349" y="1062" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="367" y="1098" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds x="469" y="1058" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="487" y="1094" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">
+ <dc:Bounds x="593" y="1058" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="611" 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="174" y="1081" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="120" y="1081" 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="274" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="1081" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="1080" />
+ <di:waypoint xsi:type="dc:Point" x="349" y="1080" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="326" y="1071" 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="505" y="1076" />
+ <di:waypoint xsi:type="dc:Point" x="593" y="1076" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="550" y="1051" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="StartEvent_1gai4qr_di" bpmnElement="StartEvent_1gai4qr">
+ <dc:Bounds x="7.752742616033771" y="654.7502109704641" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="26" y="690.7502109704641" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_12v8g91_di" bpmnElement="ExclusiveGateway_12v8g91" isMarkerVisible="true">
+ <dc:Bounds x="284.2253164556962" y="648.1721518987342" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="273" y="698" width="73" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09ajxqr_di" bpmnElement="ExclusiveGateway_09ajxqr" isMarkerVisible="true">
+ <dc:Bounds x="833.4869198312236" y="648" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="828" y="698" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1seag7u_di" bpmnElement="EndEvent_1seag7u">
+ <dc:Bounds x="1101.651476793249" y="655" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1120" y="691" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1537b7m_di" bpmnElement="SequenceFlow_1537b7m">
+ <di:waypoint xsi:type="dc:Point" x="44" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="658" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0fckboe_di" bpmnElement="PreProcessRequest">
+ <dc:Bounds x="131" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bmsi5h_di" bpmnElement="SequenceFlow_0bmsi5h">
+ <di:waypoint xsi:type="dc:Point" x="231" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="257" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="257" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="284" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="272" 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="469" y="509" />
+ <di:waypoint xsi:type="dc:Point" x="502" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="486" y="494.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1sc2oye_di" bpmnElement="Task_1sbxjc8">
+ <dc:Bounds x="369" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1lj1iud_di" bpmnElement="Task_0ifyxgt">
+ <dc:Bounds x="502" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1r6wyy6_di" bpmnElement="SequenceFlow_1r6wyy6">
+ <di:waypoint xsi:type="dc:Point" x="309" y="698" />
+ <di:waypoint xsi:type="dc:Point" x="309" y="755" />
+ <di:waypoint xsi:type="dc:Point" x="769" y="755" />
+ <di:waypoint xsi:type="dc:Point" x="769" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="833" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="533" y="740" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0v85t87_di" bpmnElement="SequenceFlow_0v85t87">
+ <di:waypoint xsi:type="dc:Point" x="309" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="309" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="369" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="315" y="579" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kr0r4a_di" bpmnElement="SequenceFlow_1kr0r4a">
+ <di:waypoint xsi:type="dc:Point" x="858" y="648" />
+ <di:waypoint xsi:type="dc:Point" x="858" y="589" />
+ <di:waypoint xsi:type="dc:Point" x="945" y="589" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="864" y="619" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_04yd2yr_di" bpmnElement="SequenceFlow_04yd2yr">
+ <di:waypoint xsi:type="dc:Point" x="1045" y="589" />
+ <di:waypoint xsi:type="dc:Point" x="1120" y="589" />
+ <di:waypoint xsi:type="dc:Point" x="1120" y="655" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1083" y="574" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yas9ol_di" bpmnElement="SequenceFlow_1yas9ol">
+ <di:waypoint xsi:type="dc:Point" x="883" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="1102" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="987" y="658" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_01fs058_di" bpmnElement="Task_0p8fmrm">
+ <dc:Bounds x="945" y="549" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_181hb2a_di" bpmnElement="SequenceFlow_181hb2a">
+ <di:waypoint xsi:type="dc:Point" x="602" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="641" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="622" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_196e1px_di" bpmnElement="Task_0kf9oby">
+ <dc:Bounds x="641" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1srw52v_di" bpmnElement="SequenceFlow_1srw52v">
+ <di:waypoint xsi:type="dc:Point" x="691" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="691" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="334" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="706" y="611.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstance.bpmn
new file mode 100644
index 0000000000..3c581865cc
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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 &#39;1702&#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.openecomp.mso.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") == '1702'} ]]></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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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="1143" y="707" width="76" 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>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000000..2c5fa5ae4b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteNetworkInstanceRollback.bpmn
@@ -0,0 +1,546 @@
+<?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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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">${URN_mso_adapters_network_rest_endpoint}</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") == '1702'} ]]></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.openecomp.mso.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>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
new file mode 100644
index 0000000000..9d21cc8301
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
@@ -0,0 +1,332 @@
+<?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.6.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.openecomp.mso.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:callActivity id="callGenericDeleteService" name="Call AAI GenericDelete Service " calledElement="GenericDeleteService">
+ <bpmn2:extensionElements>
+ <camunda:in source="serviceInstanceId" target="GENDS_serviceInstanceId" />
+ <camunda:in source="subscriptionServiceType" target="GENDS_serviceType" />
+ <camunda:in source="globalSubscriberId" target="GENDS_globalCustomerId" />
+ <camunda:in sourceExpression="service-instance" target="GENDS_type" />
+ <camunda:out source="GENDS_FoundIndicator" target="GENDS_FoundIndicator" />
+ <camunda:in sourceExpression="&#34;&#34;" target="GENGS_serviceType" />
+ <camunda:out source="GENDS_SuccessIndicator" target="GENDS_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowExcpeton" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1w8ao21</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0riudmc</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05wu9i7</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_05wu9i7" sourceRef="callGenericDeleteService" targetRef="ScriptTask_1ybdq3e" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0k28xib" sourceRef="CallActivity_0ak0ezb" targetRef="ScriptTask_1uxr0cx" />
+ <bpmn2:callActivity id="CallActivity_0ak0ezb" 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="sdncAdapterResponse" />
+ <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0rtflal</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0k28xib</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1uxr0cx" name="Post Process SDNC Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0k28xib</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1w8ao21</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.postProcessSDNCDelete(execution)]]></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_0rtflal</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.preProcessSDNCDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0rtflal" sourceRef="ScriptTask_0xxwbdq" targetRef="CallActivity_0ak0ezb" />
+ <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="callGenericDeleteService" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1mrh7us" name="sdncVersion is 1610 " 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="yes" sourceRef="ExclusiveGateway_1mrh7us" targetRef="callGenericDeleteService">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("sdncVersion" ) == "1610" }]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_1dwch0k" name="no" 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.openecomp.mso.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="Post Process AAI Delete" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_05wu9i7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1wyvxwi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoDeleteServiceInstance()
+ddsi.postProcessAAIDEL(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.openecomp.mso.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: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="-229" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="1384" y="201" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1402" y="242" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericDeleteService">
+ <dc:Bounds x="1159" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05wu9i7_di" bpmnElement="SequenceFlow_05wu9i7">
+ <di:waypoint xsi:type="dc:Point" x="1259" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1350" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1305" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0k28xib_di" bpmnElement="SequenceFlow_0k28xib">
+ <di:waypoint xsi:type="dc:Point" x="902" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="972" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="937" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ak0ezb_di" bpmnElement="CallActivity_0ak0ezb">
+ <dc:Bounds x="802" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1uxr0cx_di" bpmnElement="ScriptTask_1uxr0cx">
+ <dc:Bounds x="972" 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="-262" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-262" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-229" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-247" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0xxwbdq_di" bpmnElement="ScriptTask_0xxwbdq">
+ <dc:Bounds x="617" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rtflal_di" bpmnElement="SequenceFlow_0rtflal">
+ <di:waypoint xsi:type="dc:Point" x="717" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="802" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="760" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0590oev_di" bpmnElement="ExclusiveGateway_0590oev" isMarkerVisible="true">
+ <dc:Bounds x="305" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="293" y="51" width="73" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hcfvcj_di" bpmnElement="SequenceFlow_1hcfvcj">
+ <di:waypoint xsi:type="dc:Point" x="355" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="420" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="459" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="384" y="99.03416045409814" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0ronxsz_di" bpmnElement="EndEvent_0ronxsz">
+ <dc:Bounds x="312" y="186" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="330" y="227" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05jfuko_di" bpmnElement="SequenceFlow_05jfuko">
+ <di:waypoint xsi:type="dc:Point" x="330" y="122" />
+ <di:waypoint xsi:type="dc:Point" x="330" y="186" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="310" y="127.1200546314796" width="13" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w8ao21_di" bpmnElement="SequenceFlow_1w8ao21">
+ <di:waypoint xsi:type="dc:Point" x="1072" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1127" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1156" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1100" y="82" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1mrh7us_di" bpmnElement="ExclusiveGateway_1mrh7us" isMarkerVisible="true">
+ <dc:Bounds x="463" y="72" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="451" y="122" width="73" height="25" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0riudmc_di" bpmnElement="SequenceFlow_0riudmc">
+ <di:waypoint xsi:type="dc:Point" x="488" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="488" y="-20" />
+ <di:waypoint xsi:type="dc:Point" x="1209" y="-20" />
+ <di:waypoint xsi:type="dc:Point" x="1209" y="57" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="841" y="-35" width="17" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dwch0k_di" bpmnElement="SequenceFlow_1dwch0k">
+ <di:waypoint xsi:type="dc:Point" x="513" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="558" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="617" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="526" y="73" width="12" height="13" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1s8pf0x_di" bpmnElement="CallActivity_1s8pf0x">
+ <dc:Bounds x="-64" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jqc16k_di" bpmnElement="SequenceFlow_1jqc16k">
+ <di:waypoint xsi:type="dc:Point" x="-129" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-100" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-100" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="-64" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-85" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_02da0lj_di" bpmnElement="ScriptTask_02da0lj">
+ <dc:Bounds x="107" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1grea1r_di" bpmnElement="SequenceFlow_1grea1r">
+ <di:waypoint xsi:type="dc:Point" x="36" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="73" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="73" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="107" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="88" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1up0j5r_di" bpmnElement="SequenceFlow_1up0j5r">
+ <di:waypoint xsi:type="dc:Point" x="207" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="305" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="271" y="97" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ybdq3e_di" bpmnElement="ScriptTask_1ybdq3e">
+ <dc:Bounds x="1352" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wyvxwi_di" bpmnElement="SequenceFlow_1wyvxwi">
+ <di:waypoint xsi:type="dc:Point" x="1402" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="1402" y="201" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1417" y="169" width="0" 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:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.bpmn
new file mode 100644
index 0000000000..ab0812343b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVfModule.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="_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.openecomp.mso.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_42</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1j9dvfx</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_1j9dvfx</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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.openecomp.mso.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_01cvxjf</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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule" />
+ <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.openecomp.mso.bpmn.infrastructure.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.deleteNetworkPoliciesFromAAI(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1j9dvfx" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="VNFAdapterPrep" />
+ <bpmn2:sequenceFlow id="SequenceFlow_01cvxjf" sourceRef="InvokeVNFAdapterRestV1" targetRef="PostProcessVNFAdapterRequest" />
+ <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNFAdapter Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_01cvxjf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0coa90m</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.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.openecomp.mso.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: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="480" 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="631" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">
+ <dc:Bounds x="776" y="36" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
+ <dc:Bounds x="871" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
+ <dc:Bounds x="1022" y="187" 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="971" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="997" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
+ <dc:Bounds x="97" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
+ <dc:Bounds x="229" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
+ <dc:Bounds x="504" y="467" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
+ <dc:Bounds x="647" y="467" 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="1072" y="267" />
+ <di:waypoint xsi:type="dc:Point" x="1072" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="53" y="426" />
+ <di:waypoint xsi:type="dc:Point" x="53" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="97" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="563" y="411" 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="197" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="213" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="213" y="508" />
+ <di:waypoint xsi:type="dc:Point" x="229" y="508" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="225" y="360" 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="329" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="361" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="345" y="507" 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="604" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="647" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="626" y="492" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
+ <dc:Bounds x="793" y="489" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="811" y="530" 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="747" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="793" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="770" y="492" 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="480" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="0" width="6" height="6" />
+ </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="731" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="753" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="753" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="776" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="768" y="76" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="validateSDNCResponse">
+ <dc:Bounds x="361" y="467" 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="461" y="507" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="507" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="483" y="492" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0la8haz_di" bpmnElement="DeleteNetworkPoliciesFromAAI">
+ <dc:Bounds x="301" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j9dvfx_di" bpmnElement="SequenceFlow_1j9dvfx">
+ <di:waypoint xsi:type="dc:Point" x="580" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="631" y="76" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="606" y="51" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01cvxjf_di" bpmnElement="SequenceFlow_01cvxjf">
+ <di:waypoint xsi:type="dc:Point" x="876" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="76" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="27" y="150" />
+ <di:waypoint xsi:type="dc:Point" x="27" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="144" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="497" y="135" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lewl6b_di" bpmnElement="PostProcessVNFAdapterRequest">
+ <dc:Bounds x="144" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0coa90m_di" bpmnElement="SequenceFlow_0coa90m">
+ <di:waypoint xsi:type="dc:Point" x="244" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="301" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="273" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1drlnlk_di" bpmnElement="ExclusiveGateway_1drlnlk" isMarkerVisible="true">
+ <dc:Bounds x="442" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="429" y="164" width="75" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_08g02ch_di" bpmnElement="SequenceFlow_08g02ch">
+ <di:waypoint xsi:type="dc:Point" x="401" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="442" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="422" y="212" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yehsyc_di" bpmnElement="SequenceFlow_1yehsyc">
+ <di:waypoint xsi:type="dc:Point" x="467" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="467" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="504" y="319" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="433" y="274.5" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a7lzhz_di" bpmnElement="SequenceFlow_1a7lzhz">
+ <di:waypoint xsi:type="dc:Point" x="604" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="651" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="681" y="319" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="666" y="319" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0lsru7z_di" bpmnElement="ExclusiveGateway_0lsru7z" isMarkerVisible="true">
+ <dc:Bounds x="786" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="811" y="252" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ep3hjm_di" bpmnElement="SequenceFlow_0ep3hjm">
+ <di:waypoint xsi:type="dc:Point" x="492" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="786" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="633" y="202" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_14l7olw_di" bpmnElement="SequenceFlow_14l7olw">
+ <di:waypoint xsi:type="dc:Point" x="781" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="811" y="252" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="796" y="304" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0fp1wqz_di" bpmnElement="SequenceFlow_0fp1wqz">
+ <di:waypoint xsi:type="dc:Point" x="836" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="871" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="854" y="202" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_18y0guc_di" bpmnElement="PreProcessUpdateAAIGenericVnf">
+ <dc:Bounds x="504" y="279" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0kbqf50_di" bpmnElement="UpdateAAIGenericVnfTask">
+ <dc:Bounds x="681" y="279" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn
new file mode 100644
index 0000000000..2e9d860ac9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnf.bpmn
@@ -0,0 +1,308 @@
+<?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.6.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.openecomp.mso.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.openecomp.mso.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="callDeleteVnf" />
+ <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.openecomp.mso.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:callActivity id="callDeleteVnf" name="Delete&#10;&#10;Generic Vnf" calledElement="GenericDeleteVnf">
+ <bpmn2:extensionElements>
+ <camunda:in source="DoDVNF_vnfId" target="GENDV_vnfId" />
+ <camunda:in source="DoDVNF_type" target="GENDV_type" />
+ <camunda:out source="GENDV_SuccessIndicator" target="GENDV_SuccessIndicator" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="DoDVNF_resourceVersion" target="GENDV_resourceVersion" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>notInUse</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <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="callDeleteVnf" 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.openecomp.mso.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: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:BPMNShape id="_BPMNShape_CallActivity_64" bpmnElement="callDeleteVnf">
+ <dc:Bounds x="912" y="384" 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="_BPMNShape_CallActivity_64">
+ <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="870" y="384" width="22" height="22" />
+ </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="_BPMNShape_CallActivity_64" 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="1036" y="423" width="6" 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:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn
new file mode 100644
index 0000000000..127030d789
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVnfAndModules.bpmn
@@ -0,0 +1,263 @@
+<?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.openecomp.mso.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.openecomp.mso.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_0lu7b1v</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: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_modulesSize")]]></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="&#34;1610&#34;" target="sdncVersion" />
+ <camunda:in source="&#34;true&#34;" target="isVidRequest" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1qoor0l</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1p4ycii</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0189gqf">
+ <bpmn2:incoming>SequenceFlow_1936oc0</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_05ujwz8</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" 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.openecomp.mso.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.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddvam = new DoDeleteVnfAndModules()
+ddvam.prepareNextModuleToDelete(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0lu7b1v" sourceRef="QueryVnf" targetRef="ExclusiveGateway_1amun4k" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qoor0l" sourceRef="PrepareModuleList" targetRef="DeleteVFModule" />
+ <bpmn2:scriptTask id="PostProcessDeleteVfModule" name="PostProcess Delete VF Module">
+ <bpmn2:incoming>SequenceFlow_1p4ycii</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0t4yszi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+int nextModule = execution.getVariable("nextModule")
+ execution.setVariable("nextModule", nextModule + 1)]]></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="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="1605" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1623" y="250" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
+ <dc:Bounds x="226" y="401" width="431" height="157" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
+ <dc:Bounds x="374" y="462" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="503" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
+ <dc:Bounds x="590" y="462" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="608" y="503" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
+ <dc:Bounds x="444" y="440" 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="410" y="480" />
+ <di:waypoint xsi:type="dc:Point" x="444" y="480" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="427" y="465" 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="544" y="480" />
+ <di:waypoint xsi:type="dc:Point" x="590" y="480" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="567" y="465" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1amun4k_di" bpmnElement="ExclusiveGateway_1amun4k" isMarkerVisible="true">
+ <dc:Bounds x="691" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="683" y="252" width="65" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0laaqvh_di" bpmnElement="DeleteVNF">
+ <dc:Bounds x="1436" y="187" 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="716" y="202" />
+ <di:waypoint xsi:type="dc:Point" x="716" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="788" y="104" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="722" y="156.4750449879038" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0qmp9y5_di" bpmnElement="DeleteVFModule">
+ <dc:Bounds x="962" y="64" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0189gqf_di" bpmnElement="ExclusiveGateway_0189gqf" isMarkerVisible="true">
+ <dc:Bounds x="1304" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1329" y="252" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1p4ycii_di" bpmnElement="SequenceFlow_1p4ycii">
+ <di:waypoint xsi:type="dc:Point" x="1062" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="1096" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="1127" y="104" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1111" y="104" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0t4yszi_di" bpmnElement="SequenceFlow_0t4yszi">
+ <di:waypoint xsi:type="dc:Point" x="1177" y="144" />
+ <di:waypoint xsi:type="dc:Point" x="1177" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="741" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1192" y="185.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="716" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="716" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="1329" y="301" />
+ <di:waypoint xsi:type="dc:Point" x="1329" y="252" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1017" y="286" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_05ujwz8_di" bpmnElement="SequenceFlow_05ujwz8">
+ <di:waypoint xsi:type="dc:Point" x="1354" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1436" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1395" y="202" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1uqlr6b_di" bpmnElement="SequenceFlow_1uqlr6b">
+ <di:waypoint xsi:type="dc:Point" x="1536" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="1605" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1571" y="212" 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="788" y="64" 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="691" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="652" y="202" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qoor0l_di" bpmnElement="SequenceFlow_1qoor0l">
+ <di:waypoint xsi:type="dc:Point" x="888" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="928" y="104" />
+ <di:waypoint xsi:type="dc:Point" x="962" y="104" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="943" y="104" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_11i0rnd_di" bpmnElement="PostProcessDeleteVfModule">
+ <dc:Bounds x="1127" y="64" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
new file mode 100644
index 0000000000..45e1a49f8a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
@@ -0,0 +1,847 @@
+<?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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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") == '1702'} ]]></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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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:endEvent id="EndEvent_2">
+ <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
+ <bpmn2:incoming>siFoundNo</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.utils.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2" />
+ <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.openecomp.mso.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">${URN_mso_adapters_network_rest_endpoint}/${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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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.openecomp.mso.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_EndEvent_247" bpmnElement="EndEvent_2">
+ <dc:Bounds x="1155" y="278" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1173" y="319" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <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_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">
+ <di:waypoint xsi:type="dc:Point" x="1084" y="296" />
+ <di:waypoint xsi:type="dc:Point" x="1155" y="296" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1103" y="296" width="6" height="6" />
+ </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/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn
new file mode 100644
index 0000000000..6fd0565f3a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateNetworkInstanceRollback.bpmn
@@ -0,0 +1,373 @@
+<?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.openecomp.mso.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">${URN_mso_adapters_network_rest_endpoint}</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.openecomp.mso.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") == '1702'} ]]></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.openecomp.mso.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.openecomp.mso.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="DoCreateNetworkInstanceRollback">
+ <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/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateVfModule.bpmn
index 2e96035388..5911067a49 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateVfModule.bpmn
@@ -1,650 +1,668 @@
-<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
- <bpmn2:process id="DoUpdateVfModule" name="DoUpdateVfModule" isExecutable="true">
- <bpmn2:documentation>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 com.att.bpm.scripts.*
+<?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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
+ <bpmn2:process id="DoUpdateVfModule" name="DoUpdateVfModule" isExecutable="true">
+ <bpmn2:documentation>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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+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.openecomp.mso.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_sdncTopologyRequest" target="sdncAdapterWorkflowRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_13" targetRef="ScriptTask_17"/>
- <bpmn2:scriptTask id="ScriptTask_17" name="Set Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_8</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: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 com.att.bpm.scripts.*
+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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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&#xD;&#xA;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">${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 com.att.bpm.scripts.*
+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&#xD;&#xA;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">${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.openecomp.mso.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_sdncTopologyRequest" target="sdncAdapterWorkflowRequest"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-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 com.att.bpm.scripts.*
+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.openecomp.mso.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 com.att.bpm.scripts.*
+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.openecomp.mso.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_aicCloudRegion" 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"/>
+ </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.openecomp.mso.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_aicCloudRegion" target="aicCloudRegion"/>
- <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
- <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>
- <camunda:out source="WorkflowException" target="WorkflowException"/>
- </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 com.att.bpm.scripts.*
+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 &#xD;&#xA;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">${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.openecomp.mso.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.openecomp.mso.bpmn.infrastructure.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncActivateResponse")
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 &#xD;&#xA;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">${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 com.att.bpm.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:process>
- <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateVfModule">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="150.0" y="214.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="34.0" x="151.0" y="255.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
- <dc:Bounds height="80.0" width="100.0" x="300.0" y="192.0"/>
- </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.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="300.0" y="232.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="208.0" y="232.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="PrepareUpdateAAIVfModule_prep">
- <dc:Bounds height="80.0" width="100.0" x="456.0" y="192.0"/>
- </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.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="456.0" y="232.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="492.0" y="232.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_164" bpmnElement="ScriptTask_1">
- <dc:Bounds height="80.0" width="100.0" x="624.0" y="192.0"/>
- </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.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="624.0" y="232.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="575.0" y="232.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_88" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="1039.0" y="206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="38.0" width="109.0" x="1011.0" y="172.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_165" bpmnElement="ScriptTask_2">
- <dc:Bounds height="80.0" width="100.0" x="1152.0" y="192.0"/>
- </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.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="1118.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="1152.0" y="232.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="29.0" x="1099.0" y="231.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_166" bpmnElement="ScriptTask_3">
- <dc:Bounds height="80.0" width="100.0" x="1308.0" y="192.0"/>
- </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.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="1308.0" y="232.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1271.0" y="232.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_167" bpmnElement="ScriptTask_4">
- <dc:Bounds height="80.0" width="100.0" x="72.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_5">
- <dc:Bounds height="80.0" width="100.0" x="239.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_169" bpmnElement="ScriptTask_6">
- <dc:Bounds height="80.0" width="100.0" x="535.0" y="420.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="239.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="197.0" y="460.0"/>
- </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.0" y="256.0"/>
- <di:waypoint xsi:type="dc:Point" x="1064.0" y="351.0"/>
- <di:waypoint xsi:type="dc:Point" x="122.0" y="351.0"/>
- <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="22.0" x="1073.0" y="271.0"/>
- </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.0" y="272.0"/>
- <di:waypoint xsi:type="dc:Point" x="1358.0" y="352.0"/>
- <di:waypoint xsi:type="dc:Point" x="639.0" y="352.0"/>
- <di:waypoint xsi:type="dc:Point" x="122.0" y="352.0"/>
- <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="927.0" y="352.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="ScriptTask_7">
- <dc:Bounds height="80.0" width="100.0" x="684.0" y="420.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="684.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="648.0" y="460.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="ScriptTask_8">
- <dc:Bounds height="80.0" width="100.0" x="996.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ScriptTask_9">
- <dc:Bounds height="80.0" width="100.0" x="1176.0" y="420.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="1176.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1133.0" y="460.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="ScriptTask_10">
- <dc:Bounds height="80.0" width="100.0" x="466.0" y="636.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="ScriptTask_11">
- <dc:Bounds height="80.0" width="100.0" x="624.0" y="636.0"/>
- </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.0" y="500.0"/>
- <di:waypoint xsi:type="dc:Point" x="1226.0" y="576.0"/>
- <di:waypoint xsi:type="dc:Point" x="194.0" y="576.0"/>
- <di:waypoint xsi:type="dc:Point" x="194.0" y="636.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="821.0" y="576.0"/>
- </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.0" y="676.0"/>
- <di:waypoint xsi:type="dc:Point" x="624.0" y="676.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="591.0" y="676.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="ScriptTask_12">
- <dc:Bounds height="80.0" width="100.0" x="804.0" y="636.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="ScriptTask_13">
- <dc:Bounds height="80.0" width="100.0" x="984.0" y="636.0"/>
- </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.0" y="676.0"/>
- <di:waypoint xsi:type="dc:Point" x="804.0" y="676.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="695.0" y="674.0"/>
- </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.0" y="676.0"/>
- <di:waypoint xsi:type="dc:Point" x="984.0" y="676.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="902.0" y="676.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="1016.0" y="876.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="50.0" x="1009.0" y="917.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds height="198.0" width="475.0" x="239.0" y="924.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="ScriptTask_16">
- <dc:Bounds height="80.0" width="100.0" x="399.0" y="984.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="617.0" y="1006.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="635.0" y="1047.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.0" y="1024.0"/>
- <di:waypoint xsi:type="dc:Point" x="617.0" y="1024.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="555.0" y="1024.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_46" bpmnElement="BoundaryEvent_1">
- <dc:Bounds height="36.0" width="36.0" x="696.0" y="1005.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="711.0" y="1046.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_164" bpmnElement="EndEvent_5">
- <dc:Bounds height="36.0" width="36.0" x="814.0" y="1005.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="832.0" y="1046.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.0" y="1023.0"/>
- <di:waypoint xsi:type="dc:Point" x="814.0" y="1023.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="770.0" y="1023.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_56" bpmnElement="StartEvent_3">
- <dc:Bounds height="36.0" width="36.0" x="305.0" y="1006.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="323.0" y="1047.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.0" y="1024.0"/>
- <di:waypoint xsi:type="dc:Point" x="399.0" y="1024.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="302.0" y="1084.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_180" bpmnElement="ScriptTask_17">
- <dc:Bounds height="80.0" width="100.0" x="984.0" y="768.0"/>
- </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="1034.0" y="848.0"/>
- <di:waypoint xsi:type="dc:Point" x="1034.0" y="876.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1031.0" y="868.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ScriptTask_180">
- <di:waypoint xsi:type="dc:Point" x="1034.0" y="716.0"/>
- <di:waypoint xsi:type="dc:Point" x="1034.0" y="768.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1031.0" y="741.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="ScriptTask_14">
- <dc:Bounds height="80.0" width="100.0" x="144.0" y="636.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_2" bpmnElement="CallActivity_1">
- <dc:Bounds height="80.0" width="100.0" x="300.0" y="636.0"/>
- </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.0" y="676.0"/>
- <di:waypoint xsi:type="dc:Point" x="466.0" y="676.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="431.0" y="676.0"/>
- </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.0" y="716.0"/>
- <di:waypoint xsi:type="dc:Point" x="195.0" y="793.0"/>
- <di:waypoint xsi:type="dc:Point" x="284.0" y="793.0"/>
- <di:waypoint xsi:type="dc:Point" x="324.0" y="793.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="191.0" y="746.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_213" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="324.0" y="768.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="349.0" y="823.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.0" y="768.0"/>
- <di:waypoint xsi:type="dc:Point" x="350.0" y="716.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="80.0" x="357.0" y="733.0"/>
- </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.0" y="793.0"/>
- <di:waypoint xsi:type="dc:Point" x="515.0" y="793.0"/>
- <di:waypoint xsi:type="dc:Point" x="516.0" y="716.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="97.0" x="380.0" y="768.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="ScriptTask_15">
- <dc:Bounds height="80.0" width="100.0" x="840.0" y="420.0"/>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="ScriptTask_18">
- <dc:Bounds height="80.0" width="100.0" x="384.0" y="420.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="384.0" y="460.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="535.0" y="460.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="511.0" y="460.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="840.0" y="460.0"/>
- </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.0" y="460.0"/>
- <di:waypoint xsi:type="dc:Point" x="996.0" y="460.0"/>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_214" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="965.0" y="206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="990.0" y="261.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
- <dc:Bounds height="50.0" width="50.0" x="770.0" y="206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="0.0" width="0.0" x="795.0" y="261.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="QueryAAIVfModule">
- <dc:Bounds height="80.0" width="100.0" x="849.0" y="72.0"/>
- </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.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="747.0" y="232.0"/>
- <di:waypoint xsi:type="dc:Point" x="747.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="770.0" y="231.0"/>
- </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.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="965.0" y="231.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="888.0" y="231.0"/>
- </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.0" y="231.0"/>
- <di:waypoint xsi:type="dc:Point" x="1039.0" y="231.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="1015.0" y="231.0"/>
- </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.0" y="206.0"/>
- <di:waypoint xsi:type="dc:Point" x="795.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="849.0" y="112.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="22.0" width="20.0" x="770.0" y="151.0"/>
- </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.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="966.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="990.0" y="112.0"/>
- <di:waypoint xsi:type="dc:Point" x="990.0" y="206.0"/>
- <bpmndi:BPMNLabel>
- <dc:Bounds height="6.0" width="6.0" x="987.0" y="136.0"/>
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
+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" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateVfModule">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="150.0" y="214.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="34.0" x="151.0" y="255.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">
+ <dc:Bounds height="80.0" width="100.0" x="300.0" y="192.0"/>
+ </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.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="300.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="208.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="PrepareUpdateAAIVfModule_prep">
+ <dc:Bounds height="80.0" width="100.0" x="456.0" y="192.0"/>
+ </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.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="456.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="492.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_164" bpmnElement="ScriptTask_1">
+ <dc:Bounds height="80.0" width="100.0" x="624.0" y="192.0"/>
+ </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.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="575.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_88" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="1039.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="38.0" width="109.0" x="1011.0" y="172.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_165" bpmnElement="ScriptTask_2">
+ <dc:Bounds height="80.0" width="100.0" x="1152.0" y="192.0"/>
+ </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.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1118.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1152.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="29.0" x="1099.0" y="231.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_166" bpmnElement="ScriptTask_3">
+ <dc:Bounds height="80.0" width="100.0" x="1308.0" y="192.0"/>
+ </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.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1308.0" y="232.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1271.0" y="232.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_167" bpmnElement="ScriptTask_4">
+ <dc:Bounds height="80.0" width="100.0" x="72.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_5">
+ <dc:Bounds height="80.0" width="100.0" x="239.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_169" bpmnElement="ScriptTask_6">
+ <dc:Bounds height="80.0" width="100.0" x="535.0" y="420.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="239.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="197.0" y="460.0"/>
+ </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.0" y="256.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1064.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="351.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="22.0" x="1073.0" y="271.0"/>
+ </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.0" y="272.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1358.0" y="352.0"/>
+ <di:waypoint xsi:type="dc:Point" x="639.0" y="352.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="352.0"/>
+ <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="927.0" y="352.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="ScriptTask_7">
+ <dc:Bounds height="80.0" width="100.0" x="684.0" y="420.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="684.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="648.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="ScriptTask_8">
+ <dc:Bounds height="80.0" width="100.0" x="996.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ScriptTask_9">
+ <dc:Bounds height="80.0" width="100.0" x="1176.0" y="420.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1176.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1133.0" y="460.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="ScriptTask_10">
+ <dc:Bounds height="80.0" width="100.0" x="466.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="ScriptTask_11">
+ <dc:Bounds height="80.0" width="100.0" x="624.0" y="636.0"/>
+ </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.0" y="500.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="576.0"/>
+ <di:waypoint xsi:type="dc:Point" x="194.0" y="576.0"/>
+ <di:waypoint xsi:type="dc:Point" x="194.0" y="636.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="821.0" y="576.0"/>
+ </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.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="624.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="591.0" y="676.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="ScriptTask_12">
+ <dc:Bounds height="80.0" width="100.0" x="804.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="ScriptTask_13">
+ <dc:Bounds height="80.0" width="100.0" x="984.0" y="636.0"/>
+ </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.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="804.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="695.0" y="674.0"/>
+ </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.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="984.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="902.0" y="676.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="1208.0" y="906.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="50.0" x="1201.0" y="947.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">
+ <dc:Bounds height="198.0" width="475.0" x="239.0" y="924.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="ScriptTask_16">
+ <dc:Bounds height="80.0" width="100.0" x="399.0" y="984.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="617.0" y="1006.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="635.0" y="1047.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.0" y="1024.0"/>
+ <di:waypoint xsi:type="dc:Point" x="617.0" y="1024.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="555.0" y="1024.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_46" bpmnElement="BoundaryEvent_1">
+ <dc:Bounds height="36.0" width="36.0" x="696.0" y="1005.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="711.0" y="1046.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_164" bpmnElement="EndEvent_5">
+ <dc:Bounds height="36.0" width="36.0" x="814.0" y="1005.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="832.0" y="1046.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.0" y="1023.0"/>
+ <di:waypoint xsi:type="dc:Point" x="814.0" y="1023.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="770.0" y="1023.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_56" bpmnElement="StartEvent_3">
+ <dc:Bounds height="36.0" width="36.0" x="305.0" y="1006.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="323.0" y="1047.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.0" y="1024.0"/>
+ <di:waypoint xsi:type="dc:Point" x="399.0" y="1024.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="302.0" y="1084.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_180" bpmnElement="ScriptTask_17">
+ <dc:Bounds height="80.0" width="100.0" x="1176.0" y="768.0"/>
+ </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.0" y="848.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="906.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1223.0" y="868.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="ScriptTask_14">
+ <dc:Bounds height="80.0" width="100.0" x="144.0" y="636.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_CallActivity_2" bpmnElement="CallActivity_1">
+ <dc:Bounds height="80.0" width="100.0" x="300.0" y="636.0"/>
+ </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.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="466.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="431.0" y="676.0"/>
+ </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.0" y="716.0"/>
+ <di:waypoint xsi:type="dc:Point" x="195.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="284.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="324.0" y="793.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="191.0" y="746.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_213" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="324.0" y="768.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="349.0" y="823.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.0" y="768.0"/>
+ <di:waypoint xsi:type="dc:Point" x="350.0" y="716.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="80.0" x="357.0" y="733.0"/>
+ </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.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="515.0" y="793.0"/>
+ <di:waypoint xsi:type="dc:Point" x="516.0" y="716.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="97.0" x="380.0" y="768.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="ScriptTask_15">
+ <dc:Bounds height="80.0" width="100.0" x="840.0" y="420.0"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="ScriptTask_18">
+ <dc:Bounds height="80.0" width="100.0" x="384.0" y="420.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="384.0" y="460.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="535.0" y="460.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="511.0" y="460.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="840.0" y="460.0"/>
+ </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.0" y="460.0"/>
+ <di:waypoint xsi:type="dc:Point" x="996.0" y="460.0"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_214" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="965.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="990.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="IsBaseVfModule" isMarkerVisible="true">
+ <dc:Bounds height="50.0" width="50.0" x="770.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="0.0" width="0.0" x="795.0" y="261.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="QueryAAIVfModule">
+ <dc:Bounds height="80.0" width="100.0" x="849.0" y="72.0"/>
+ </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.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="747.0" y="232.0"/>
+ <di:waypoint xsi:type="dc:Point" x="747.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="770.0" y="231.0"/>
+ </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.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="965.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="888.0" y="231.0"/>
+ </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.0" y="231.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1039.0" y="231.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1015.0" y="231.0"/>
+ </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.0" y="206.0"/>
+ <di:waypoint xsi:type="dc:Point" x="795.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="849.0" y="112.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="22.0" width="20.0" x="770.0" y="151.0"/>
+ </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.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="966.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="990.0" y="112.0"/>
+ <di:waypoint xsi:type="dc:Point" x="990.0" y="206.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="987.0" y="136.0"/>
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="ScriptTask_19">
+ <dc:Bounds height="80.0" width="100.0" x="1176.0" y="636.0"/>
+ </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.0" y="676.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1176.0" y="676.0"/>
+ <bpmndi:BPMNLabel>
+ <dc:Bounds height="6.0" width="6.0" x="1121.0" y="676.0"/>
+ </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.0" y="716.0"/>
+ <di:waypoint xsi:type="dc:Point" x="1226.0" y="768.0"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/urn.properties b/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties
index 44967b75f9..ccbeaa6e38 100644
--- a/bpmn/MSOGammaBPMN/src/main/resources/urn.properties
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/urn.properties
@@ -1,30 +1,29 @@
-###
-# ============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=========================================================
-###
-
-# URN mappings for this project.
-
-# TODO: Remove all the non-URN stuff that's in here.
-# TODO: Implement a real URN mapping capability.
-
-#AAIEndPoint= http://localhost:8080/SoapUIMocks
-#AAIEndPoint= http://calypso-36.cif.att.com:8080/SoapUIMocks
-AAIEndPoint= http://localhost:8090/
-SDNCEndPoint=http://localhost:8090/SDNCAdapter/
-msoRollback = true
+###
+# ============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=========================================================
+###
+
+# URN mappings for this project.
+
+# TODO: Remove all the non-URN stuff that's in here.
+# TODO: Implement a real URN mapping capability.
+
+#AAIEndPoint= http://localhost:8080/SoapUIMocks
+AAIEndPoint= http://localhost:28090/
+SDNCEndPoint=http://localhost:28090/SDNCAdapter/
+msoRollback = true
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000000..3dbfcce36f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,31 @@
+<!--
+ ============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=========================================================
+ -->
+
+<jboss-deployment-structure>
+ <deployment>
+ <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
+ <exclusions>
+ <module name="org.apache.log4j" />
+ <module name="org.slf4j" />
+ <module name="org.slf4j.impl" />
+ </exclusions>
+ </deployment>
+</jboss-deployment-structure>
+
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml
index 42717c5a76..a39a02178a 100644
--- a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/jboss-web.xml
@@ -1,26 +1,26 @@
-<?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=========================================================
- -->
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-<jboss-web>
- <security-domain>other</security-domain>
- <context-root>/mso</context-root>
-</jboss-web>
+<?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=========================================================
+ -->
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+<jboss-web>
+ <security-domain>other</security-domain>
+ <context-root>/mso</context-root>
+</jboss-web>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..eb5df6038e
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,74 @@
+<?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=========================================================
+ -->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+ <display-name>MSO Infrastructure BPMN Workflow Servlet</display-name>
+ <servlet>
+ <servlet-name>resteasy-servlet</servlet-name>
+ <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+ <init-param>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>org.openecomp.mso.bpmn.infrastructure.workflow.service.WorkflowResourceApplication</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>resteasy-servlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+ <context-param>
+ <param-name>mso.configuration</param-name>
+ <param-value>MSO_PROP_TOPOLOGY=topology.properties</param-value>
+ </context-param>
+ <context-param>
+ <param-name>log.configuration</param-name>
+ <param-value>logback.bpmn.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>resteasy.resources</param-name>
+ <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.bpmn.core.HealthCheckHandler</param-value>
+ </context-param>
+ <filter>
+ <filter-name>LogFilter</filter-name>
+ <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>LogFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>HTTPBasicAuth</web-resource-name>
+ <description>Authentication for Client Apps</description>
+ <url-pattern>/workflow/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>BPMN-Client</role-name>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>ApplicationRealm</realm-name>
+ </login-config>
+ <security-role>
+ <role-name>BPMN-Client</role-name>
+ </security-role>
+</web-app> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..4f5375719f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,209 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.mockito.ArgumentCaptor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.openecomp.mso.bpmn.common.scripts.MsoGroovyTest;
+
+
+@RunWith(MockitoJUnitRunner.class)
+import org.apache.commons.lang3.*
+
+
+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",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-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",
+ "modelCustomizationName": "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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns="http://org.openecomp/mso/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
+ 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')
+
+ 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/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..2e6b35eaba
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+
+import org.apache.commons.lang3.*
+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.openecomp.mso.bpmn.common.scripts.MsoGroovyTest
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+@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.openecomp.mso/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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns="http://org.openecomp/mso/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.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns="http://org.openecomp/mso/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("URN_mso_workflow_message_endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
+ when(mockExecution.getVariable("URN_mso_use_qualified_host")).thenReturn('')
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareVnfAdapterDeleteRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_deleteVnfARequest", deleteVnfAdapterRequestXml)
+
+ }
+
+ @Test
+ public void testPrepareDbRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("DELVfModVol_volumeOutputs")).thenReturn('')
+
+ 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/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy
new file mode 100644
index 0000000000..e9c27b040a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy
@@ -0,0 +1,218 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.MsoGroovyTest
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleVolumeV1Test extends MsoGroovyTest {
+
+ def volumeRequest =
+"""<volume-request xmlns="http://org.openecomp/mso/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>2.0</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>"""
+
+ def genericVnfResponseXml = """
+<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>
+"""
+ def String expectedCreateVnfRequestXml = """<createVolumeGroupRequest>
+ <cloudSiteId>MDTWNJ21</cloudSiteId>
+ <tenantId>897deadc2b954a6bac6d3c197fb3525e</tenantId>
+ <vnfId>TEST-VNF-ID-0123</vnfId>
+ <vnfName>STMTN5MMSC20</vnfName>
+ <volumeGroupId>test-vol-group-id-123</volumeGroupId>
+ <volumeGroupName>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volumeGroupName>
+ <vnfType>Test/vSAMP12</vnfType>
+ <vnfVersion>2.0</vnfVersion>
+ <vfModuleType>vSAMP12::base::module-0</vfModuleType>
+ <modelCustomizationUuid/>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>TEST-VNF-ID-0123</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>STMTN5MMSC20</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>test-vol-group-id-123</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>MSOTESTVOL101a-vSAMP12_base_vol_module-0</value>
+ </entry>
+ <entry>
+ <key>param1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>param2</key>
+ <value>value2</value>
+ </entry>
+ <entry>
+ <key>param3</key>
+ <value>value3</value>
+ </entry>
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>true</failIfExists>
+ <msoRequest>
+ <requestId>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <messageId>111</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMessage/12345678</notificationUrl>
+</createVolumeGroupRequest>
+"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ @Test
+ public void TestPreProcessRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV1')
+
+ when(mockExecution.getVariable("DoCreateVfModuleVolumeV1Request")).thenReturn(volumeRequest)
+ when(mockExecution.getVariable("vnf-id")).thenReturn('test-vnf-id-123')
+ when(mockExecution.getVariable("volume-group-id")).thenReturn('test-volume-group-id-123')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('test-request-id-123')
+
+ DoCreateVfModuleVolumeV1 myprocess = new DoCreateVfModuleVolumeV1()
+ myprocess.preProcessRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable('DCVFMODVOLV1_serviceId', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb')
+ verify(mockExecution).setVariable('DCVFMODVOLV1_source', 'SoapUI-bns-create-base-vol-1001-1')
+ verify(mockExecution, times(7)).setVariable(anyString(), anyString())
+ }
+
+ @Test
+ public void TestPrepareVnfAdapterCreateRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV1')
+
+ when(mockExecution.getVariable("DCVFMODVOLV1_Request")).thenReturn(volumeRequest)
+ when(mockExecution.getVariable("DCVFMODVOLV1_requestId")).thenReturn('d8d4fcfa-fd7e-4413-b19d-c95aa67291b8')
+ when(mockExecution.getVariable("DCVFMODVOLV1_serviceId")).thenReturn('a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb')
+ when(mockExecution.getVariable("DCVFMODVOLV1_AAIQueryGenericVfnResponse")).thenReturn(genericVnfResponseXml)
+ when(mockExecution.getVariable("DCVFMODVOLV1_rollbackEnabled")).thenReturn(true)
+ when(mockExecution.getVariable("volume-group-id")).thenReturn('test-vol-group-id-123')
+ when(mockExecution.getVariable("URN_mso_workflow_message_endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
+ when(mockExecution.getVariable("URN_mso_use_qualified_host")).thenReturn(true)
+
+ DoCreateVfModuleVolumeV1 myprocess = new DoCreateVfModuleVolumeV1()
+ myprocess.prepareVnfAdapterCreateRequest(mockExecution, 'true')
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(2)).setVariable(captor1.capture(), captor2.capture())
+
+ List<String> arg2List = captor2.getAllValues()
+ String createVnfRequestXml = arg2List.get(0)
+
+ //replace messageID value because it is random generated
+ createVnfRequestXml = createVnfRequestXml.replaceAll("<messageId>(.+?)</messageId>", "<messageId>111</messageId>")
+ .replaceAll("<notificationUrl>(.+?)</notificationUrl>", "<notificationUrl>http://localhost:28080/mso/WorkflowMessage/12345678</notificationUrl>")
+
+ Assert.assertEquals(expectedCreateVnfRequestXml.trim(), createVnfRequestXml.trim())
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy
new file mode 100644
index 0000000000..a90cf12ecb
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy
@@ -0,0 +1,3055 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetCloudRegion
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetwork
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkRouteTable
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding
+
+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.Ignore;
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.MsoUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+
+@RunWith(MockitoJUnitRunner.class)
+class UpdateNetworkInstanceInfraTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ def utils = new MsoUtils()
+
+ 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"
+ }
+ ]
+ }
+ }}"""
+
+ String jsonIncomingRequest_Missingname =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "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 jsonIncomingRequest_MissingCloudRegion =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "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>
+ <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>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>
+"""
+
+
+String expectedNetworkRequestMissingCloudRegion =
+"""<network-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-name>HSL_direct_net_2</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>
+ <network-params>
+ <param name="shared">1</param>
+ </network-params>
+</network-request>"""
+
+ // vnfRESTRequest
+ String networkRESTRequest =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
+ statusCode="200">
+ <rest:payload contentType="text/xml">
+ <vnfreq:network-request>
+ <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:physicalNetworkName>dvs-slcp3-01</vnfreq:physicalNetworkName>
+ <vnfreq:vlans>3008</vnfreq:vlans>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+ </vnfreq:network-request>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String networkInputsMissingName =
+ """<network-inputs xmlns="http://org.openecomp/mso/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.openecomp/mso/infra/vnf-request/v1">
+ <network-name>HSL_direct_net_2</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>"""
+
+ String expectedUpdateNetworkInstanceInfraRequest =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
+ contentType="text/xml">
+ <vnfreq:network-request>
+ <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:physicalNetworkName>dvs-slcp3-01</vnfreq:physicalNetworkName>
+ <vnfreq:vlans>3008</vnfreq:vlans>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+ </vnfreq:network-request>
+</rest:payload>"""
+
+ String expectedUpdateNetworkInstanceInfraRequest_Output =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
+ contentType="text/xml">
+ <vnfreq:network-request>
+ <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>
+</rest:payload>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <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>
+ <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>
+ <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>
+</network-request>"""
+
+String expectedNetworkInputs =
+"""<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>
+ <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>"""
+
+
+ String NetworkRequest_noPhysicalName =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.openecomp/mso/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: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.openecomp/mso/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.openecomp/mso/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>"""
+
+
+ // expectedNetworkRequest
+ String networkInputs_404 =
+ """<network-inputs xmlns="http://org.openecomp/mso/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.openecomp/mso/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>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-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-delete</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-delete</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 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://mtanjv9aaas03.aic.cip.com: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://mtanjv9aaas03.aic.cip.com: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://mtanjv9aaas03.aic.cip.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>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="mtcnjv9aaas01.mtcnj.aic.cip.com-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 updateDBRequest_Active =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network MNS-25180-L-01-dmz_direct_net_1 already exists. Silent success.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ String updateDBRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully updated.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ <networkId/>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ String updateDBRequestError =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/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 updateDBRequestError01 =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/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 updateDBRequest_Outputs =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully updated.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ 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/>
+ <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>
+ <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>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>
+ <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.openecomp.mso/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 =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/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>
+ <networkUpdated>true</networkUpdated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String updateNetworkResponse =
+ """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.openecomp.mso/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/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>
+ <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-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>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ </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.openecomp.mso/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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 changeAssignSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:ns5="http://openecomp.com/mso/request/types/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/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.openecomp/mso/workflow/schema/v1" xmlns:tag0="http://org.openecomp/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="org:openecomp:sdnctltl: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://openecomp.com/mso/workflow/schema/v1"
+ xmlns:ns5="http://openecomp.com/mso/request/types/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/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.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.openecomp/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.openecomp/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;output xmlns="org:openecomp: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.openecomp/mso/workflow/schema/v1"
+ xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="org:openecomp: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="org:openecomp:sdnctl:vnf"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:tag0="http://org.openecomp/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.openecomp/mso/workflow/schema/v1"
+ xmlns="org:openecomp: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 falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>UPDATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/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 falloutHandlerRequestObject =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/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.openecomp/mso/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 falloutHandlerRequest_Scenario01 =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/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.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Unexpected Response from AAI - 400</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7020</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables (Execution mockExecution) {
+
+ verify(mockExecution).setVariable("UPDNETI_messageId", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "")
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_networkRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_networkInputs", "")
+ verify(mockExecution).setVariable("UPDNETI_networkOutputs", "")
+ verify(mockExecution).setVariable("UPDNETI_requestId", "")
+ verify(mockExecution).setVariable("UPDNETI_source", "")
+ verify(mockExecution).setVariable("UPDNETI_networkId", "")
+
+ verify(mockExecution).setVariable("UPDNETI_CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_isSilentSuccess", false)
+ verify(mockExecution).setVariable("UPDNETI_isPONR", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionResponse","")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionPo","")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionSdnc","")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", false)
+
+ // AAI query Id
+ verify(mockExecution).setVariable("UPDNETI_queryIdAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryIdAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_vpnBindings", null)
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_routeCollection", "")
+
+ // AAI query network policy
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyUriList", null)
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_networkCollection", "")
+
+ // AAI query route table reference
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_networkTableRefUriList", null)
+ verify(mockExecution).setVariable("UPDNETI_networkTableRefCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_tableRefCollection", "")
+
+
+ // AAI requery Id
+ verify(mockExecution).setVariable("UPDNETI_requeryIdAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_requeryIdAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIUrlRequest","")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIPayloadRequest","")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiUpdateContrailReturnCode", "")
+
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_networkReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_isNetworkRollbackNeeded", false)
+
+ verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_sdncReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", false)
+ verify(mockExecution).setVariable("UPDNETI_sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_updateDBResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_dbReturnCode", "")
+
+ verify(mockExecution).setVariable("UPDNETI_isVnfBindingPresent", false)
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_serviceInstanceId", "")
+ verify(mockExecution).setVariable("GENGS_type", "service-instance") // Setting for Generic Sub Flow use
+
+
+ }
+
+ @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("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.preProcessRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest)
+ //verify(mockExecution).setVariable("UPDNETI_networkRequest", expectedNetworkRequest)
+ //verify(mockExecution).setVariable("UPDNETI_networkInputs", expectedNetworkInputs)
+ //verify(mockExecution, atLeast(3)).setVariable("UPDNETI_networkOutputs", "")
+
+ //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("UPDNETI_source", "VID")
+ //verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingNetworkId() {
+
+ println "************ preProcessRequest_MissingName() ************* "
+
+ WorkflowException missingNameWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 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("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.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", "UPDNETI_")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest)
+ //verify(mockExecution, atLeast(1)).setVariable("UPDNETI_networkOutputs", networkOutputs)
+ //verify(mockExecution).setVariable("UPDNETI_networkRequest", expectedNetworkRequestMissingNetworkId)
+ //verify(mockExecution).setVariable("UPDNETI_networkInputs", expectedNetworkInputs)
+
+ //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("UPDNETI_source", "VID")
+ //verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingNameWorkflowException))
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingCloudRegion() {
+
+ println "************ preProcessRequest_MissingCloudRegion() ************* "
+
+ WorkflowException missingCloudRegionWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 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("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
+
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.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", "UPDNETI_")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest_MissingCloudRegion)
+ //verify(mockExecution).setVariable("UPDNETI_networkRequest", "")
+ //verify(mockExecution).setVariable("UPDNETI_networkInputs", "")
+ //verify(mockExecution, atLeast(1)).setVariable("UPDNETI_networkOutputs", "")
+
+ //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("UPDNETI_source", "VID")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingCloudRegionWorkflowException))
+
+ }
+
+ @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(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UpdateNetworkInstanceInfraResponseCode", "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")
+
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UpdateNetworkInstanceInfraResponseCode", "500")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareDBRequest() {
+
+ println "************ prepareDBRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareDBRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareDBRequestErro_ExceptionObject() {
+
+ println "************ prepareDBRequest ************* "
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 500, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareDBRequestError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequestError)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareDBRequest_Outputs() {
+
+ println "************ prepareDBRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn(networkOutputs)
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareDBRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequest_Outputs)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ //when(mockExecution.getVariable("UPDNETI_queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable("UPDNETI_routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable("UPDNETI_networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable("UPDNETI_tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable("UPDNETI_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("UPDNETI_rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", updateNetworkRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest_NoPhysicalname() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(NetworkRequest_noPhysicalName)
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ //when(mockExecution.getVariable("UPDNETI_queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable("UPDNETI_routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable("UPDNETI_networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable("UPDNETI_tableRefCollection")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_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("UPDNETI_rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", updateNetworkRequest_noPhysicalName)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("http://localhost:28090/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(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCRequest", changeAssignSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRollbackRequest() {
+
+ println "************ prepareSDNCRollbackRequest ************* "
+
+
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("http://localhost:28090/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(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", sdncRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkId_200() {
+
+ println "************ callRESTQueryAAINetworkId ************* "
+
+ WireMock.reset();
+
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_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("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryIdAAIRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ verify(mockExecution).setVariable("UPDNETI_aaiIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_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("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_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("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegionFake ************* "
+
+ WireMock.reset();
+ MockGetCloudRegion("MDTWNJ21", 404, "")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(vnfRequestFakeRegion)
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_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("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/MDTWNJ21")
+ verify(mockExecution, atLeast(1)).setVariable("UPDNETI_queryCloudRegionReturnCode", "404")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionSdnc", "AAIAIC25")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_vpn-binding_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 2)
+ verify(mockExecution).setVariable("UPDNETI_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("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponseTestScenario01)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_vpn-binding_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 1)
+ verify(mockExecution).setVariable("UPDNETI_vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200_URN_Uri() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_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("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 2)
+ verify(mockExecution).setVariable("UPDNETI_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("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_NotPresent() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_NotPresent ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponseVpnNotPresent)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIResponse", aaiVpnResponseStub)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkTableRef_200() {
+
+ println "************ callRESTQueryAAINetworkTableRef_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkRouteTable("refFQDN1", "CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200)
+ MockGetNetworkRouteTable("refFQDN2", "CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_route_table_reference_uri")).thenReturn("/aai/v8/network/route-table-references/route-table-reference")
+// when(mockExecution.getVariable("URN_mso_workflow_CreateNetworkInstanceInfra_aai_network_table_reference_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_networkTableRefCount", 2)
+ verify(mockExecution).setVariable("UPDNETI_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("UPDNETI_queryNetworkTableRefAAIRequest", "http://localhost:28090/aai/v8/network/route-table-references/route-table-reference/refFQDN1")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkPolicy_200() {
+
+ println "************ callRESTQueryAAINetworkPolicy_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_network_policy_uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_policy_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyCount", 1)
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyUriList", ['/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIRequest", "http://localhost:28090/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTReQueryAAINetworkId_200() {
+
+ println "************ callRESTReQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_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("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_requeryIdAAIRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ verify(mockExecution).setVariable("UPDNETI_aaiRequeryIdReturnCode", "200")
+
+ }
+
+
+ @Test
+ @Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_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("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(6)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadResponseActual = arg2List.get(4)
+
+ assertEquals(updateContrailAAIResponse.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIUrlRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)
+ verify(mockExecution).setVariable("UPDNETI_aaiUpdateContrailReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_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("UPDNETI_updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable("UPDNETI_networkReturnCode")).thenReturn('200')
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(mockExecution)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkResponse", updateNetworkResponseREST)
+ verify(mockExecution).setVariable("UPDNETI_isNetworkRollbackNeeded", true)
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkRequest", updateRollbackNetworkRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateUpdateNetworkResponseREST_Error() {
+
+ println "************ validateNetworkResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 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("UPDNETI_updateNetworkResponse")).thenReturn(networkException500)
+ when(mockExecution.getVariable("UPDNETI_networkReturnCode")).thenReturn('500')
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ 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("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_isResponseGood")).thenReturn(true)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.validateSDNCResponse(mockExecution)
+ verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", true)
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", "")
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable("UPDNETI_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("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse_Error)
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable("UPDNETI_sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_isResponseGood")).thenReturn(true)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit! - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ //verify(mockExecution).setVariable("UPDNETI_sdncResponseSuccess", false)
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_dbReturnCode")).thenReturn("200")
+
+ // postProcessResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.postProcessResponse(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", true)
+ verify(mockExecution).setVariable("UPDNETI_CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SNDC rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Failed() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SDNC rollback failed. ")
+
+ println "************ validateRollbackResponses_Failed() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("404")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("BadResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("500")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("BadResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_NetworkFailed() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowExceptionFailed = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SNDC rollback completed.")
+
+ println "************ validateRollbackResponses_NetworkFailed() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("404")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("BadResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowExceptionFailed , any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_SdncFailed() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SDNC rollback failed. ")
+
+ println "************ validateRollbackResponses_SdncFailed() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("<response-code>400</response-code>")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException , any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_NoRollbacks() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, " AAI Update Contrail Failed. Error 404")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, " AAI Update Contrail Failed. Error 404")
+
+ println "************ validateRollbackResponses_NoRollbacks() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(false)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(false)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ //verify(mockExecution, atLeast(1)).setVariable("WorkflowException", any(expectedWorkflowException))
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse() {
+
+ println "************ buildErrorResponse ************* "
+
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 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("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse_WorkflowExceptionObject() {
+
+ println "************ buildErrorResponse ************* "
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 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("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequestObject)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse_Scenario01() {
+
+ WorkflowException aaiWorkflowException_Secnario01 = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "Unexpected Response from AAI - 400")
+
+ println "************ buildErrorResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(aaiWorkflowException_Secnario01)
+ when(mockExecution.getVariable("UPDNETI_dbReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_updateDBResponse")).thenReturn("<GoodResponse>")
+
+ when(mockExecution.getVariable("UPDNETI_aaiRequeryIdReturnCode")).thenReturn("400")
+
+ // buildErrorResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest_Scenario01)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("UpdateNetworkInstanceInfra")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("UpdateNetworkInstanceInfra")
+ 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("UpdateNetworkInstanceInfra")
+ when(mockExecution.getProcessInstanceId()).thenReturn("UpdateNetworkInstanceInfra")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..4ca68f3b2b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+@RunWith(MockitoJUnitRunner.class)
+@Ignore // No Junits exists in this class to run
+class UpdateVfModuleVolumeInfraV1Test {
+
+ String xml = """
+ <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/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://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>vf-module.vf-module-ids</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>
+"""
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
new file mode 100644
index 0000000000..4f987f0d48
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
@@ -0,0 +1,249 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetCloudRegion;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkPolicyfqdn;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit test cases for CreateVfModuleInfra.bpmn
+ */
+public class CreateVfModuleInfraTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public CreateVfModuleInfraTest() throws IOException {
+ callbacks.put("assign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfCreate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestCreateCallback.xml"));
+ }
+
+
+ /**
+ * Sunny day VID scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "process/CreateVfModuleInfra.bpmn",
+ "subprocess/DoCreateVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/ConfirmVolumeGroupName.bpmn",
+ "subprocess/CreateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void sunnyDayVID() throws Exception {
+
+ logStart();
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+ MockGetGenericVnfById("skask", "VfModularity/GenericVnf.xml", 200);
+ MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
+ MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockPutGenericVnf("skask");
+ mockVNFPost("", 202, "skask");
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockPatchGenericVnf("skask");
+ MockPatchVfModuleId("skask", ".*");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleRequest =
+ FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVID();
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleInfra",
+ "v1", businessKey, createVfModuleRequest, variables);
+
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectSDNCCallbacks(callbacks, "assign, query");
+ injectVNFRestCallbacks(callbacks, "vnfCreate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ // TODO add appropriate assertions
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "CreateVfModuleSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVID() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "CREATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+ /**
+ * Sunny day VID with volume attach scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "process/CreateVfModuleInfra.bpmn",
+ "subprocess/DoCreateVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/ConfirmVolumeGroupName.bpmn",
+ "subprocess/CreateAAIVfModule.bpmn",
+ "subprocess/CreateAAIVfModuleVolumeGroup.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void sunnyDayVIDWithVolumeGroupAttach() throws Exception {
+
+ logStart();
+
+ MockGetVolumeGroupById("AAIAIC25", "78987", "VfModularity/VolumeGroup.xml");
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetCloudRegion("MDTWNJ21", 200, "CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml");
+ MockGetVolumeGroupById("RDM2WAGPLCP", "78987", "DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
+ mockVNFPost("", 202, "skask");
+ MockGetNetworkPolicyfqdn(".*", "VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockPutGenericVnf("skask");
+ MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPost("", 202, "skask");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockPatchGenericVnf("skask");
+ MockPatchVfModuleId("skask", ".*");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleRequest =
+ FileUtil.readResourceFile("__files/CreateVfModuleVolumeGroup_VID_request.json");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVIDWVolumeAttach();
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleInfra",
+ "v1", businessKey, createVfModuleRequest, variables);
+
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectSDNCCallbacks(callbacks, "assign, query");
+ injectVNFRestCallbacks(callbacks, "vnfCreate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ // TODO add appropriate assertions
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "CreateVfModuleSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVIDWVolumeAttach() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "CREATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "78987");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java
new file mode 100644
index 0000000000..e70f48d758
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java
@@ -0,0 +1,306 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteVolumeGroupById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupByName;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVolumeGroupById;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockPostVNFVolumeGroup;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
+
+ public static final String _prefix = "CVFMODVOL2_";
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public CreateVfModuleVolumeInfraV1Test() throws IOException {
+ callbacks.put("volumeGroupCreate", FileUtil.readResourceFile(
+ "__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml"));
+ callbacks.put("volumeGroupException", FileUtil.readResourceFile(
+ "__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml"));
+ callbacks.put("volumeGroupRollback", FileUtil.readResourceFile(
+ "__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml"));
+ }
+
+ /**
+ * Happy path scenario for VID
+ *****************************/
+ @Test
+ @Deployment(resources = {"process/CreateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestSuccess() throws Exception {
+
+ logStart();
+
+ MockNodeQueryServiceInstanceById("test-service-instance-id", "CreateVfModuleVolumeInfraV1/getSIUrlById.xml");
+ MockGetGenericVnfById("/TEST-VNF-ID-0123", "CreateVfModuleVolumeInfraV1/GenericVnf.xml", 200);
+ MockPutVolumeGroupById("AAIAIC25", "TEST-VOLUME-GROUP-ID-0123", "CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml", 201);
+ MockGetVolumeGroupByName("AAIAIC25", "MSOTESTVOL101a-vSAMP12_base_vol_module-0", "CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml", 200);
+ MockPutVolumeGroupById("AAIAIC25", "8424bb3c-c3e7-4553-9662-469649ed9379", "CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml", 200);
+ mockPostVNFVolumeGroup(202);
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ testVariables.put("test-volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleVolumeInfraV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 1000000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupCreate");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "CVMVINFRAV1_SuccessIndicator", true);
+
+ logEnd();
+ }
+
+ /**
+ * Happy path scenario for VID
+ *****************************/
+ @Test
+ @Deployment(resources = {"process/CreateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestVolumeGroupAlreadyExists() throws Exception {
+
+ logStart();
+
+ MockGetVolumeGroupByName("AAIAIC25", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0", "CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml", 200);
+ MockGetGenericVnfById("TEST-VNF-ID-0123", "CreateVfModuleVolumeInfraV1/GenericVnf.xml", 200);
+ MockNodeQueryServiceInstanceById("test-service-instance-id", "CreateVfModuleVolumeInfraV1/getSIUrlById.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ testVariables.put("test-volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleVolumeInfraV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 1000000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ //injectVNFRestCallbacks(callbacks, "volumeGroupCreate");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "CVMVINFRAV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+ /**
+ *Vnf Create fail
+ *****************************/
+ @Test
+ //@Ignore
+ @Deployment(resources = {"process/CreateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestVNfCreateFail() throws Exception {
+
+ logStart();
+
+ MockNodeQueryServiceInstanceById("test-service-instance-id", "CreateVfModuleVolumeInfraV1/getSIUrlById.xml");
+ MockGetGenericVnfById("/TEST-VNF-ID-0123", "CreateVfModuleVolumeInfraV1/GenericVnf.xml", 200);
+ MockPutVolumeGroupById("AAIAIC25", "TEST-VOLUME-GROUP-ID-0123", "CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml", 201);
+ MockGetVolumeGroupByName("AAIAIC25", "MSOTESTVOL101a-vSAMP12_base_vol_module-0", "CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml", 200);
+ MockPutVolumeGroupById("AAIAIC25", "8424bb3c-c3e7-4553-9662-469649ed9379", "CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml", 200);
+ mockPostVNFVolumeGroup(202);
+ MockDeleteVolumeGroupById("AAIAIC25", "8424bb3c-c3e7-4553-9662-469649ed9379", "1460134360", 204);
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ testVariables.put("test-volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleVolumeInfraV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 1000000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupException");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "CVMVINFRAV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+
+ /**
+ * Error scenario - vnf not found
+ ********************************/
+ @Test
+ //@Ignore
+ @Deployment(resources = {"process/CreateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestFailVnfNotFound() throws Exception {
+
+ logStart();
+
+ MockNodeQueryServiceInstanceById("test-service-instance-id", "CreateVfModuleVolumeInfraV1/getSIUrlById.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleVolumeInfraV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 1000000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ //injectVNFRestCallbacks(callbacks, "volumeGroupCreate");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "CVMVINFRAV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+ /**
+ * Error scenario - error in validation
+ **************************************/
+ @Test
+ //@Ignore
+ @Deployment(resources = {"process/CreateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestFailNoVnfPassed() throws Exception {
+
+ logStart();
+
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ //testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleVolumeInfraV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 1000000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "CVMVINFRAV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+ /**
+ * Error scenario - service instance not found
+ *********************************************/
+ @Test
+ //@Ignore
+ @Deployment(resources = {"process/CreateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestFailServiceInstanceNotFound() throws Exception {
+
+ logStart();
+
+ MockNodeQueryServiceInstanceById("test-service-instance-id", "CreateVfModuleVolumeInfraV1/getSIUrlById.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ //testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleVolumeInfraV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 1000000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "CVMVINFRAV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java
new file mode 100644
index 0000000000..80c1e8c215
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java
@@ -0,0 +1,220 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+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.assertEquals;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByName_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.BPMNUtil;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit Test for the CreateVnfInfra Flow
+ */
+public class CreateVnfInfraTest extends WorkflowTest {
+
+ private String createVnfInfraRequest;
+ private final CallbackSet callbacks = new CallbackSet();
+
+
+ public CreateVnfInfraTest() throws IOException {
+ createVnfInfraRequest = FileUtil.readResourceFile("__files/InfrastructureFlows/CreateVnfInfraRequest.json");
+ callbacks.put("assign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVnf.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/GenericGetVnf.bpmn",
+ "subprocess/GenericPutVnf.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "process/CreateVnfInfra.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn"})
+ public void testCreateVnfInfra_success() throws Exception{
+
+ MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
+ MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+ MockGetGenericVnfByName_404();
+ MockPutGenericVnf();
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ setVariablesSuccess(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVnfInfra",
+ "v1", businessKey, createVnfInfraRequest, variables);
+
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ //injectSDNCCallbacks(callbacks, "assign, query");
+ //injectSDNCCallbacks(callbacks, "activate");
+
+ // TODO add appropriate assertions
+
+ waitForProcessEnd(businessKey, 10000);
+ String status = BPMNUtil.getVariable(processEngineRule, "CreateVnfInfra", "CreateVnfInfraStatus");
+ assertEquals("Success", status);
+
+ logEnd();
+
+ //WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CreateVnfInfra", variables);
+ // injectSDNCCallbacks(callbacks, "assign");
+ // injectSDNCCallbacks(callbacks, "activate");
+ //waitForProcessEnd(businessKey, 10000);
+ //waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ //assertVariables("true", "true", "false", "true", "Success", null);
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn", "subprocess/GenericGetVnf.bpmn", "subprocess/GenericPutVnf.bpmn", "process/CreateVnfInfra.bpmn", "subprocess/FalloutHandler.bpmn", "subprocess/CompleteMsoProcess.bpmn"})
+ public void testCreateVnfInfra_error_badRequest() throws Exception{
+
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, null, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CreateVnfInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables(null, null, null, null, null, "WorkflowException[processKey=CreateVnfInfra,errorCode=2500,errorMessage=Internal Error - WorkflowException Object and/or RequestInfo is null! CreateVnfInfra]");
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVnf.bpmn", "subprocess/GenericGetService.bpmn", "subprocess/GenericGetVnf.bpmn", "subprocess/GenericPutVnf.bpmn", "process/CreateVnfInfra.bpmn", "subprocess/FalloutHandler.bpmn", "subprocess/CompleteMsoProcess.bpmn"})
+ public void testCreateVnfInfra_error_siNotFound() throws Exception{
+
+ MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CreateVnfInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables(null, null, null, null, null, "WorkflowException[processKey=DoCreateVnf,errorCode=404,errorMessage=Service Instance Not Found]");
+
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVnf.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/GenericGetVnf.bpmn",
+ "subprocess/GenericPutVnf.bpmn",
+ "process/CreateVnfInfra.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn"})
+ public void testCreateVnfInfra_error_vnfExist() throws Exception{
+ MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
+ MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=testVnfName123&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfResponse.xml")));
+
+ MockPutGenericVnf();
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CreateVnfInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertVariables(null, null, null, null, null, "WorkflowException[processKey=DoCreateVnf,errorCode=5000,errorMessage=Generic Vnf Already Exist.]");
+
+ }
+
+ private void assertVariables(String exSIFound, String exSISucc, String exVnfFound, String exVnfSucc, String exResponse, String exWorkflowException) {
+
+ String siFound = BPMNUtil.getVariable(processEngineRule, "CreateVnfInfra", "GENGS_FoundIndicator");
+ String siSucc = BPMNUtil.getVariable(processEngineRule, "CreateVnfInfra", "GENGS_SuccessIndicator");
+ String vnfFound = BPMNUtil.getVariable(processEngineRule, "CreateVnfInfra", "GENGV_FoundIndicator");
+ String vnfSucc = BPMNUtil.getVariable(processEngineRule, "CreateVnfInfra", "GENGV_SuccessIndicator");
+ String response = BPMNUtil.getVariable(processEngineRule, "CreateVnfInfra", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "CreateVnfInfra", "SavedWorkflowException1");
+
+ assertEquals(exSIFound, siFound);
+ assertEquals(exSISucc, siSucc);
+ assertEquals(exVnfFound, vnfFound);
+ assertEquals(exVnfSucc, vnfSucc);
+ assertEquals(exResponse, response);
+ assertEquals(exWorkflowException, workflowException);
+ }
+
+ private void setVariables(Map<String, String> variables, String request, String requestId, String siId) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("bpmnRequest", request);
+ variables.put("mso-request-id", requestId);
+ variables.put("serviceInstanceId",siId);
+ variables.put("testVnfId","testVnfId123");
+ variables.put("vnfType", "STMTN");
+ }
+
+ private void setVariablesSuccess(Map<String, Object> variables, String request, String requestId, String siId) {
+ variables.put("isDebugLogEnabled", "true");
+ //variables.put("bpmnRequest", request);
+ //variables.put("mso-request-id", requestId);
+ variables.put("serviceInstanceId",siId);
+ variables.put("requestId", requestId);
+ variables.put("testVnfId","testVnfId123");
+ variables.put("vnfType", "STMTN");
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
new file mode 100644
index 0000000000..9a3ffe988d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
@@ -0,0 +1,579 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+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.post;
+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.urlEqualTo;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+/**
+ * Unit test for DoDeleteVfModule.bpmn.
+ */
+public class DeleteVfModuleInfraTest extends WorkflowTest {
+ private final CallbackSet callbacks = new CallbackSet();
+
+ private static final String EOL = "\n";
+
+ private final String vnfAdapterDeleteCallback =
+ "<deleteVfModuleResponse>" + EOL +
+ " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
+ " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
+ " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <vfModuleOutputs>" + EOL +
+ " <entry>" + EOL +
+ " <key>policyKey1_contrail_network_policy_fqdn</key>" + EOL +
+ " <value>MSOTest:DefaultPolicyFQDN1</value>" + EOL +
+ "</entry>" + EOL +
+ "<entry>" + EOL +
+ "<key>policyKey2_contrail_network_policy_fqdn</key>" + EOL +
+ "<value>MSOTest:DefaultPolicyFQDN2</value>" + EOL +
+ "</entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>oam_management_v4_address</key>" + EOL +
+ " <value>1234</value>" + EOL +
+ "</entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>oam_management_v6_address</key>" + EOL +
+ " <value>1234</value>" + EOL +
+ "</entry>" + EOL +
+ "</vfModuleOutputs>" + EOL +
+ "</deleteVfModuleResponse>" + EOL;
+
+ private final String vnfAdapterDeleteCallbackFail =
+ "<vfModuleException>" + EOL +
+ " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
+ " <category>INTERNAL</category>" + EOL +
+ " <rolledBack>false</rolledBack>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</vfModuleException>" + EOL;
+
+ private final String sdncAdapterDeleteCallback =
+ "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
+ " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
+ " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
+ "</output>" + EOL;
+
+ public DeleteVfModuleInfraTest() throws IOException {
+ callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
+ callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
+ callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
+ callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
+ }
+
+ @Test
+ @Deployment(resources = {
+ "process/Infrastructure/DeleteVfModuleInfra.bpmn",
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ @Ignore
+ public void TestDeleteVfModuleSuccess() throws Exception {
+ // delete the Base Module
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <request-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</request-id>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ logStart();
+ WireMock.reset();
+
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>changedelete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>delete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+
+ mockVNFDelete(".*", "/.*", 202);
+// MockAAIGenericVnfSearch();
+// MockAAIVfModulePUT(false);
+// MockAAIDeleteGenericVnf();
+// MockAAIDeleteVfModule();
+ mockUpdateRequestDB(200, "VfModularity/DBUpdateResponse.xml");
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73/[?]resource-version=0000073"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a75/[?]resource-version=0000075"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a78/[?]resource-version=0000078"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a77/[?]resource-version=0000077"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.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)));
+
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/[?]resource-version=0000021"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/[?]resource-version=0000018"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("MMSC"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("PCRF"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+
+ String body;
+
+ // The following stubs are for CreateAAIVfModule and UpdateAAIVfModule
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC23&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC22&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/768073c7-f41f-4822-9323-b75962763d74[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>1508691</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC21&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>1508691</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC20&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ // The following stubs are for DeleteAAIVfModule
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c723[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c722[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000021</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000073</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000020</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000074</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000075</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c719</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC19</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000019</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC19-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000076</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC19-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000077</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c718</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC18</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000018</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC18-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000078</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000021</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000073</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ String businessKey = UUID.randomUUID().toString();
+ String deleteVfModuleRequest =
+ FileUtil.readResourceFile("__files/DeleteVfModule_VID_request.json");
+ //Map<String, Object> variables = new HashMap<String, Object>();
+
+ //variables.put("isDebugLogEnabled","true");
+// variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+// variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVID();
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("DeleteVfModuleInfra",
+ "v1", businessKey, deleteVfModuleRequest, variables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ checkVariable(businessKey, "DeleteVfModuleInfraSuccessIndicator", true);
+ checkVariable(businessKey, "WorkflowException", null);
+ if (wfe != null) {
+ System.out.println("TestDeleteVfModuleInfraSuccess: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVID() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", "true");
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "DELETE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("vfModuleId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java
new file mode 100644
index 0000000000..73acde3fc6
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit test cases for UpdateVfModuleVolume.bpmn
+ */
+public class DeleteVfModuleVolumeInfraV1Test extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public DeleteVfModuleVolumeInfraV1Test() throws IOException {
+ callbacks.put("volumeGroupDelete", FileUtil.readResourceFile(
+ "__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml"));
+ }
+
+ /**
+ * Happy path scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Ignore // BROKEN TEST
+ @Deployment(resources = {"process/DeleteVfModuleVolumeInfraV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void happyPath() throws Exception {
+
+ logStart();
+
+// DeleteVfModuleVolumeInfraV1_success();
+
+ String businessKey = UUID.randomUUID().toString();
+ String deleteVfModuleVolRequest =
+ FileUtil.readResourceFile("__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("volumeGroupId", "78987");
+ testVariables.put("serviceInstanceId", "test-service-instance-id-0123");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("DeleteVfModuleVolumeInfraV1",
+ "v1", businessKey, deleteVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 100000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupDelete");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DELVfModVol_TransactionSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ /**
+ * Test fails - vf module in use
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {"process/DeleteVfModuleVolumeInfraV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestVfModuleInUseError() throws Exception {
+
+ logStart();
+
+// DeleteVfModuleVolumeInfraV1_inUseError(); // no assertions to check
+
+ String businessKey = UUID.randomUUID().toString();
+ String deleteVfModuleVolRequest =
+ FileUtil.readResourceFile("__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("volumeGroupId", "78987");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("DeleteVfModuleVolumeInfraV1",
+ "v1", businessKey, deleteVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 100000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ //injectVNFRestCallbacks(callbacks, "volumeGroupDelete");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DELVfModVol_TransactionSuccessIndicator", false);
+
+ logEnd();
+ }
+
+ /**
+ * Test fails on vnf adapter call
+ *
+ * @throws Exception
+ */
+ @Test
+ @Ignore // BROKEN TEST
+ @Deployment(resources = {"process/DeleteVfModuleVolumeInfraV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestVnfAdapterCallfail() throws Exception {
+
+ logStart();
+
+// DeleteVfModuleVolumeInfraV1_fail();
+
+ String businessKey = UUID.randomUUID().toString();
+ String deleteVfModuleVolRequest =
+ FileUtil.readResourceFile("__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("volumeGroupId", "78987");
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("DeleteVfModuleVolumeInfraV1",
+ "v1", businessKey, deleteVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 100000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ //injectVNFRestCallbacks(callbacks, "volumeGroupDelete");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DELVfModVol_TransactionSuccessIndicator", false);
+
+ logEnd();
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java
new file mode 100644
index 0000000000..00c5a24338
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java
@@ -0,0 +1,200 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+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.assertEquals;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeWorkFlow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.BPMNUtil;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Please describe the DeleteVnfInfra.java class
+ *
+ */
+public class DeleteVnfInfraTest extends WorkflowTest {
+
+ private String deleteVnfInfraRequest;
+ private String deleteVnfInfraRequestCascadeDelete;
+
+ public DeleteVnfInfraTest () throws IOException {
+ deleteVnfInfraRequest = FileUtil.readResourceFile("__files/InfrastructureFlows/CreateVnfInfraRequest.json");
+ deleteVnfInfraRequestCascadeDelete = FileUtil.readResourceFile("__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json");
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn",
+ "subprocess/GenericDeleteVnf.bpmn",
+ "subprocess/DoDeleteVnf.bpmn",
+ "process/DeleteVnfInfra.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn"})
+ public void testDeleteVnfInfra_success() throws Exception{
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfByNameResponse.xml")));
+
+ MockDeleteGenericVnf();
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, deleteVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+ Object cascadeDelete = BPMNUtil.getRawVariable(processEngineRule, "DeleteVnfInfra", "DELVI_cascadeDelete");
+ String found = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "GENGV_FoundIndicator") ;
+ String inUse = BPMNUtil.getVariable(processEngineRule, "DeleteVnfInfra", "DELVI_vnfInUse");
+ String response = BPMNUtil.getVariable(processEngineRule, "DeleteVnfInfra", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DeleteVnfInfra", "WorkflowException");
+
+ assertEquals(false, cascadeDelete);
+ assertEquals("true", found);
+ assertEquals("false", inUse);
+ assertEquals("Success", response);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Ignore // DoDeleteVnfAndModules not complete yet
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn",
+ "subprocess/GenericDeleteVnf.bpmn",
+ "subprocess/DoDeleteVnfAndModules.bpmn",
+ "process/DeleteVnfInfra.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn"})
+ public void testDeleteVnfInfra_cascadeDelete() throws Exception{
+ MockGetGenericVnfById();
+ MockDeleteGenericVnf();
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, deleteVnfInfraRequestCascadeDelete, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String found = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "GENGV_FoundIndicator") ;
+ String inUse = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "DoDVNF_vnfInUse");
+ String response = BPMNUtil.getVariable(processEngineRule, "DeleteVnfInfra", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DeleteVnfInfra", "WorkflowException");
+ Object cascadeDelete = BPMNUtil.getRawVariable(processEngineRule, "DeleteVnfInfra", "DELVI_cascadeDelete");
+
+ assertEquals(true, cascadeDelete);
+ assertEquals("true", found);
+ assertEquals("false", inUse);
+ assertEquals("Success", response);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn",
+ "subprocess/GenericDeleteVnf.bpmn",
+ "subprocess/DoDeleteVnf.bpmn",
+ "process/DeleteVnfInfra.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn"})
+ public void testDeleteVnfInfra_success_vnfNotFound() throws Exception{
+
+ MockDeleteGenericVnf_404();
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, deleteVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String found = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "GENGV_FoundIndicator") ;
+ String inUse = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "DoDVNF_vnfInUse");
+ String response = BPMNUtil.getVariable(processEngineRule, "DeleteVnfInfra", "WorkflowResponse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "WorkflowException");
+
+ assertEquals("false", found);
+ assertEquals("false", inUse);
+ assertEquals("Success", response);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn",
+ "subprocess/GenericDeleteVnf.bpmn",
+ "subprocess/DoDeleteVnf.bpmn",
+ "process/DeleteVnfInfra.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn"})
+ public void testDeleteVnfInfra_error_vnfInUse() throws Exception{
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfResponse_hasRelationships.xml")));
+ MockDeleteGenericVnf();
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ Map<String, String> variables = new HashMap<String, String>();
+ setVariables(variables, deleteVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+
+ WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ String found = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "GENGV_FoundIndicator") ;
+ String inUse = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "DoDVNF_vnfInUse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DeleteVnfInfra", "SavedWorkflowException1");
+
+ String exWfex = "WorkflowException[processKey=DoDeleteVnf,errorCode=5000,errorMessage=Can't Delete Generic Vnf. Generic Vnf is still in use.]";
+
+ assertEquals("true", found);
+ assertEquals("true", inUse);
+ assertEquals(exWfex, workflowException);
+ }
+
+ private void setVariables(Map<String, String> variables, String request, String requestId, String siId) {
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("bpmnRequest", request);
+ variables.put("mso-request-id", requestId);
+ variables.put("serviceInstanceId",siId);
+ variables.put("vnfId","testVnfId123");
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
new file mode 100644
index 0000000000..5b0d4c73bd
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
@@ -0,0 +1,160 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.core.RollbackData;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * Unit test for DoDeleteVfModule.bpmn.
+ */
+public class DoCreateVfModuleRollbackTest extends WorkflowTest {
+ private final CallbackSet callbacks = new CallbackSet();
+
+ private static final String EOL = "\n";
+
+ private final String vnfAdapterDeleteCallback =
+ "<deleteVfModuleResponse>" + EOL +
+ " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
+ " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
+ " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</deleteVfModuleResponse>" + EOL;
+
+ private final String vnfAdapterDeleteCallbackFail =
+ "<vfModuleException>" + EOL +
+ " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
+ " <category>INTERNAL</category>" + EOL +
+ " <rolledBack>false</rolledBack>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</vfModuleException>" + EOL;
+
+ private final String sdncAdapterDeleteCallback =
+ "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
+ " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
+ " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
+ "</output>" + EOL;
+
+ public DoCreateVfModuleRollbackTest() throws IOException {
+ callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
+ callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
+ callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
+ callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
+ }
+
+ @Test
+
+ @Deployment(resources = {
+ "subprocess/DoCreateVfModuleRollback.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestCreateVfModuleRollbackSuccess() {
+ logStart();
+
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>delete", 200, "DeleteGenericVNFV1/sdncAdapterResponse.xml");
+ mockVNFDelete("a27ce5a9-29c4-4c22-a017-6615ac73c721", "/973ed047-d251-4fb9-bf1a-65b8949e0a73", 202);
+ MockDeleteGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721", "0000021", 200);
+ MockDeleteVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73", "0000073", 200);
+ MockPutVfModuleIdNoResponse("a27ce5a9-29c4-4c22-a017-6615ac73c721", "MMSC", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ MockPutGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ MockGetGenericVnfByIdWithDepth("a27ce5a9-29c4-4c22-a017-6615ac73c721", 1, "DoCreateVfModuleRollback/GenericVnf.xml");
+ MockGetVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73", "DoCreateVfModuleRollback/GenericVnfVfModule.xml", 200);
+ MockPatchGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ RollbackData rollbackData = new RollbackData();
+ rollbackData.put("VFMODULE", "source", "PORTAL");
+ rollbackData.put("VFMODULE", "vnfid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ rollbackData.put("VFMODULE", "vnfname", "STMTN5MMSC21");
+ rollbackData.put("VFMODULE", "vnftype", "asc_heat-int");
+ rollbackData.put("VFMODULE", "vfmoduleid", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ rollbackData.put("VFMODULE", "vfmodulename", "STMTN5MMSC21-MMSC::module-0-0");
+ rollbackData.put("VFMODULE", "tenantid", "fba1bd1e195a404cacb9ce17a9b2b421");
+ rollbackData.put("VFMODULE", "aiccloudregion", "RDM2WAGPLCP");
+ rollbackData.put("VFMODULE", "heatstackid", "thisisaheatstack");
+ rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn0", "MSOTest:DefaultPolicyFQDN1");
+ rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn1", "MSOTest:DefaultPolicyFQDN2");
+ rollbackData.put("VFMODULE", "oamManagementV6Address", "2000:abc:bce:1111");
+ rollbackData.put("VFMODULE", "oamManagementV4Address", "127.0.0.1");
+
+ rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true");
+ rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "true");
+ rollbackData.put("VFMODULE", "rollbackUpdateAAIVfModule", "true");
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "true");
+ rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true");
+ rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true");
+ rollbackData.put("VFMODULE", "rollbackUpdateVnfAAI", "true");
+
+
+
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ rollbackData.put("VFMODULE", "msorequestid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ rollbackData.put("VFMODULE", "serviceinstanceid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("RollbackData", rollbackData);
+ invokeSubProcess("DoCreateVfModuleRollback", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ checkVariable(businessKey, "WorkflowException", null);
+ if (wfe != null) {
+ System.out.println("TestCreateVfModuleSuccess: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+
+}
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
new file mode 100644
index 0000000000..fc4816cef3
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
@@ -0,0 +1,150 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+
+import static org.openecomp.mso.bpmn.common.BPMNUtil.getRawVariable;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for DoCreateVfModuleTest.bpmn.
+ */
+public class DoCreateVfModuleTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public DoCreateVfModuleTest() throws IOException {
+ callbacks.put("assign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfCreate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestCreateCallback.xml"));
+ }
+
+ /**
+ * Test the sunny day scenario.
+ */
+ @Test
+ @Ignore
+ @Deployment(resources = {
+ "subprocess/DoCreateVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/ConfirmVolumeGroupName.bpmn",
+ "subprocess/CreateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/CreateAAIVfModuleVolumeGroup.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn"
+ })
+ public void sunnyDay() throws IOException {
+
+ logStart();
+
+ MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
+ MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockPutGenericVnf("skask");
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPost("", 202, "skask");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ //RuntimeService runtimeService = processEngineRule.getRuntimeService();
+
+ Map<String, Object> variables = setupVariablesSunnyDayBuildingBlocks();
+ //runtimeService.startProcessInstanceByKey("DoCreateVfModule", variables);
+ invokeSubProcess("DoCreateVfModule", businessKey, variables);
+
+ injectSDNCCallbacks(callbacks, "assign, query");
+ injectVNFRestCallbacks(callbacks, "vnfCreate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ Assert.assertTrue((boolean) getRawVariable(processEngineRule, "DoCreateVfModule", "DCVFM_SuccessIndicator"));
+
+ logEnd();
+ }
+
+ private Map<String, Object> setupVariablesSunnyDayBuildingBlocks() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+
+ variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("disableRollback", "true");
+ //variables.put("recipeTimeout", "0");
+ //variables.put("requestAction", "CREATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vfModuleName", "PCRF::module-0-2");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ variables.put("isVidRequest", "true");
+ variables.put("asdcServiceModelVersion", "1.0");
+
+ String vfModuleModelInfo = "{" + "\"modelInfo\": { "+ "\"modelType\": \"vfModule\"," +
+ "\"modelInvariantId\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
+ "\"modelNameVersionId\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+ "\"modelName\": \"STMTN5MMSC21-MMSC::model-1-0\"," +
+ "\"modelVersion\": \"1\"," +
+ "\"modelCustomizationId\": \"MODEL-123\"" + "}}";
+ variables.put("vfModuleModelInfo", vfModuleModelInfo);
+
+ String cloudConfiguration = "{" + "\"cloudConfiguration\": { " +
+ "\"lcpCloudRegionId\": \"MDTWNJ21\"," +
+ "\"tenantId\": \"fba1bd1e195a404cacb9ce17a9b2b421\"" + "}}";
+ variables.put("cloudConfiguration", cloudConfiguration);
+ return variables;
+
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV1Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV1Test.java
new file mode 100644
index 0000000000..c7a112d5aa
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV1Test.java
@@ -0,0 +1,351 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+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.post;
+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.urlEqualTo;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+public class DoCreateVfModuleVolumeV1Test extends WorkflowTest {
+
+ public static final String _prefix = "CVFMODVOL2_";
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public DoCreateVfModuleVolumeV1Test() throws IOException {
+ callbacks.put("volumeGroupCreate", FileUtil.readResourceFile(
+ "__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml"));
+ callbacks.put("volumeGroupRollback", FileUtil.readResourceFile(
+ "__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml"));
+ }
+
+ /**
+ * Happy Path
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestHappyPath() throws Exception {
+
+ logStart();
+
+ DoCreateVfModuleVolume_Success();
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("DCVFMODVOLV1_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
+ testVariables.put("vnf-id", "TEST-VNF-ID-0123");
+ testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ //testVariables.put("test-volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("DoCreateVfModuleVolumeV1Request", createVfModuleVolRequest);
+ invokeAsyncProcess("DoCreateVfModuleVolumeV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupCreate");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DCVFMODVOLV1_SuccessIndicator", true);
+
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestVolumeGroupExistError() throws Exception {
+
+ logStart();
+
+ DoCreateVfModuleVolume_VolumeGroupExistsFail();
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("DCVFMODVOLV1_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
+ testVariables.put("vnf-id", "TEST-VNF-ID-0123");
+ testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ testVariables.put("DoCreateVfModuleVolumeV1Request", createVfModuleVolRequest);
+ invokeAsyncProcess("DoCreateVfModuleVolumeV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+
+ //injectVNFRestCallbacks(callbacks, "volumeGroupCreate");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DCVFMODVOLV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+ /**
+ * Will trigger AAI create rollback
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestVnfVolumeGroupCreateError() throws Exception {
+
+ logStart();
+
+ DoCreateVfModuleVolume_VnfCreateVolumeGroupFail();
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("DCVFMODVOLV1_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
+ testVariables.put("vnf-id", "TEST-VNF-ID-0123");
+ testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ testVariables.put("test-volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("DoCreateVfModuleVolumeV1Request", createVfModuleVolRequest);
+ invokeAsyncProcess("DoCreateVfModuleVolumeV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+
+ //injectVNFRestCallbacks(callbacks, "volumeGroupCreate");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DCVFMODVOLV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+ /**
+ * Will trigger AAI create rollback
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestUpdateAaiVolumeGroupError() throws Exception {
+
+ logStart();
+
+ DoCreateVfModuleVolume_AaiVolumeGroupUpdateFail();
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("DCVFMODVOLV1_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
+ testVariables.put("vnf-id", "TEST-VNF-ID-0123");
+ testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ testVariables.put("test-volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("DoCreateVfModuleVolumeV1Request", createVfModuleVolRequest);
+ invokeAsyncProcess("DoCreateVfModuleVolumeV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupCreate,volumeGroupRollback");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DCVFMODVOLV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+ /**
+ * Will trigger not trigger rollback
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {"subprocess/DoCreateVfModuleVolumeV1.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"})
+ public void TestUpdateAaiVolumeGroupErrorNoRollback() throws Exception {
+
+ logStart();
+
+ DoCreateVfModuleVolume_AaiVolumeGroupUpdateFail();
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("DCVFMODVOLV1_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
+ testVariables.put("vnf-id", "TEST-VNF-ID-0123");
+ testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("test-volume-group-name", "TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0");
+ testVariables.put("test-volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
+ testVariables.put("DoCreateVfModuleVolumeV1Request", createVfModuleVolRequest);
+ invokeAsyncProcess("DoCreateVfModuleVolumeV1", "v1", businessKey, createVfModuleVolRequest, testVariables);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupCreate");
+
+ waitForProcessEnd(businessKey, 100000);
+ checkVariable(businessKey, "DCVFMODVOLV1_SuccessIndicator", false);
+
+ logEnd();
+ }
+
+ public static void DoCreateVfModuleVolume_Success() {
+ // Notes:
+ // 1. initial aai volume group by name - /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group?volume-group-name=TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0
+ // 2. Create volume group - /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group
+ // 3. Requery Volume Group - /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group?volume-group-name=MSOTESTVOL101a-vSAMP12_base_vol_module-0
+ // 4. Update volume group (id from requery response - /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group/8424bb3c-c3e7-4553-9662-469649ed9379
+
+ //generic vnf
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/TEST-VNF-ID-0123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/GenericVnf.xml")));
+ //create volume group
+ stubFor(put(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group/TEST-VOLUME-GROUP-ID-0123"))
+ .willReturn(aResponse()
+ .withStatus(201)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml")));
+ //requery volume group
+ stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups[?]volume-group-name=MSOTESTVOL101a-vSAMP12_base_vol_module-0"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml")));
+ //update volume group
+ stubFor(put(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group/8424bb3c-c3e7-4553-9662-469649ed9379"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml")));
+ // VNF rest Adapter
+ stubFor(post(urlEqualTo("/vnfs/v1/volume-groups"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void DoCreateVfModuleVolume_VolumeGroupExistsFail() {
+ //generic vnf
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/TEST-VNF-ID-0123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/GenericVnf.xml")));
+ //initial volume group query
+ stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group[?]volume-group-name=TEST-MSOTESTVOL101a-vSAMP12_base_vol_module-0"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml")));
+ }
+
+ public static void DoCreateVfModuleVolume_VnfCreateVolumeGroupFail() {
+ //generic vnf
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/TEST-VNF-ID-0123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/GenericVnf.xml")));
+ //create volume group
+ stubFor(put(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group/TEST-VOLUME-GROUP-ID-0123"))
+ .willReturn(aResponse()
+ .withStatus(201)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml")));
+ //Query AAI volume group by name -- needed before delete
+ stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups[?]volume-group-name=MSOTESTVOL101a-vSAMP12_base_vol_module-0"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml")));
+ //delete volume group in aai
+ stubFor(delete(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group/8424bb3c-c3e7-4553-9662-469649ed9379[?]resource-version=1460134360"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml")));
+ stubFor(post(urlEqualTo("/vnfs/v1/volume-groups"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void DoCreateVfModuleVolume_AaiVolumeGroupUpdateFail() {
+ //generic vnf
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/TEST-VNF-ID-0123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/GenericVnf.xml")));
+ //create volume group
+ stubFor(put(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups/volume-group/TEST-VOLUME-GROUP-ID-0123"))
+ .willReturn(aResponse()
+ .withStatus(201)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml")));
+ //requery volume group
+ stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/volume-groups[?]volume-group-name=MSOTESTVOL101a-vSAMP12_base_vol_module-0"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml")));
+ //delete volume group in aai
+ stubFor(delete(urlMatching("/aai/v[0-9]+/cloud-infrastructure/volume-groups/volume-group/8424bb3c-c3e7-4553-9662-469649ed9379[?]resource-version=1460134360"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml")));
+ // VNF rest Adapter
+ stubFor(post(urlEqualTo("/vnfs/v1/volume-groups"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
+ // VNF Rest Adapter rollback - vnfs/v1/volume-groups/STUB-TEST-8424bb3c-c3e7-4553-9662-469649ed9379/rollback
+ stubFor(delete(urlEqualTo("/vnfs/v1/volume-groups/TEST-VOLUME-GROUP-ID-0123/rollback"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java
new file mode 100644
index 0000000000..b161d05bfe
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java
@@ -0,0 +1,119 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByName_404;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.BPMNUtil;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit Test for the DoCreateVnf Flow
+ *
+ */
+public class DoCreateVnfTest extends WorkflowTest {
+
+ private String createVnfInfraRequest;
+ private final CallbackSet callbacks = new CallbackSet();
+
+
+ public DoCreateVnfTest() throws IOException {
+ createVnfInfraRequest = FileUtil.readResourceFile("__files/InfrastructureFlows/CreateVnfInfraRequest.json");
+ callbacks.put("assign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetService.bpmn", "subprocess/GenericGetVnf.bpmn", "subprocess/GenericPutVnf.bpmn", "subprocess/SDNCAdapterV1.bpmn", "subprocess/DoCreateVnf.bpmn"})
+ public void testDoCreateVnfInfra_success() throws Exception{
+
+ MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
+ MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+ MockGetGenericVnfByName_404("testVnfName123");
+ MockPutGenericVnf("testVnfId123");
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ setVariablesSuccess(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
+ invokeSubProcess("DoCreateVnf", businessKey, variables);
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ assertVariables("true", "true", "false", "true", "Success", null);
+ }
+
+ private void assertVariables(String exSIFound, String exSISucc, String exVnfFound, String exVnfSucc, String exResponse, String exWorkflowException) {
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DoCreateVnf", "SavedWorkflowException1");
+
+ assertEquals(exWorkflowException, workflowException);
+ }
+
+ private void setVariablesSuccess(Map<String, Object> variables, String request, String requestId, String siId) {
+ variables.put("isDebugLogEnabled", "true");
+ //variables.put("bpmnRequest", request);
+ variables.put("mso-request-id", requestId);
+ variables.put("serviceInstanceId",siId);
+ variables.put("vnfName", "testVnfName123");
+ variables.put("disableRollback", "true");
+ variables.put("requestId", requestId);
+ variables.put("testVnfId","testVnfId123");
+ variables.put("vnfType", "STMTN");
+ variables.put("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
+ String vnfModelInfo = "{ "+ "\"modelType\": \"vnf\"," +
+ "\"modelInvariantId\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
+ "\"modelNameVersionId\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+ "\"modelName\": \"vSAMP12\"," +
+ "\"modelVersion\": \"1.0\"," +
+ "\"modelCustomizationId\": \"MODEL-ID-1234\"," +
+ "}";
+ variables.put("vnfModelInfo", vnfModelInfo);
+
+ String cloudConfiguration = "{ " +
+ "\"lcpCloudRegionId\": \"mdt1\"," +
+ "\"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\"" + "}";
+ variables.put("cloudConfiguration", cloudConfiguration);
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
new file mode 100644
index 0000000000..a3165f7ff3
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
@@ -0,0 +1,561 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+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.urlEqualTo;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIDeleteGenericVnf;
+import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIDeleteVfModule;
+import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIGenericVnfSearch;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * Unit test for DoDeleteVfModule.bpmn.
+ */
+public class DoDeleteVfModuleTest extends WorkflowTest {
+ private final CallbackSet callbacks = new CallbackSet();
+
+ private static final String EOL = "\n";
+
+ private final String vnfAdapterDeleteCallback =
+ "<deleteVfModuleResponse>" + EOL +
+ " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
+ " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
+ " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</deleteVfModuleResponse>" + EOL;
+
+ private final String vnfAdapterDeleteCallbackFail =
+ "<vfModuleException>" + EOL +
+ " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
+ " <category>INTERNAL</category>" + EOL +
+ " <rolledBack>false</rolledBack>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</vfModuleException>" + EOL;
+
+ private final String sdncAdapterDeleteCallback =
+ "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
+ " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
+ " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
+ "</output>" + EOL;
+
+ public DoDeleteVfModuleTest() throws IOException {
+ callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
+ callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
+ callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
+ callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
+ }
+
+ private final String wfeString = "WorkflowException";
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleSuccess() {
+ // delete the Base Module and Generic Vnf
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ variables.put("isVidRequest", "true");
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ checkVariable(businessKey, wfeString, null);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleSuccess: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModule_Building_Block_Success() {
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("requestId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("vfModuleId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("serviceInstanceId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("vfModuleName", "STMTN5MMSC21-MMSC::module-0-0");
+ variables.put("sdncVersion", "1610");
+ variables.put("isVidRequest", "true");
+ String vfModuleModelInfo = "{" + "\"modelType\": \"vnf\"," +
+ "\"modelInvariantId\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
+ "\"modelNameVersionId\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+ "\"modelName\": \"vSAMP12\"," +
+ "\"modelVersion\": \"1.0\"," +
+ "\"modelCustomizationId\": \"MODEL-ID-1234\"," +
+ "}";
+ variables.put("vfModuleModelInfo", vfModuleModelInfo);
+
+ String cloudConfiguration = "{" +
+ "\"lcpCloudRegionId\": \"RDM2WAGPLCP\"," +
+ "\"tenantId\": \"fba1bd1e195a404cacb9ce17a9b2b421\"" + "}";
+ variables.put("cloudConfiguration", cloudConfiguration);
+
+
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ checkVariable(businessKey, wfeString, null);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModule_Building_Block_Success: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleSDNCFailure() {
+ // delete the Base Module and Generic Vnf - SDNCAdapter failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCFailure();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest", request);
+ variables.put("isVidRequest", "true");
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ // cause a failure by not injecting a callback
+// injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleSDNCFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 7000);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Could not communicate"));
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleSDNCCallbackFailure() {
+ // delete the Base Module and Generic Vnf - SDNCAdapter Callback failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ variables.put("isVidRequest", "true");
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete:ERR");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ // return a failure in the callback
+ injectSDNCCallbacks(callbacks, "sdncDelete:ERR");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleSDNCCallbackFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 5310);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Received error from SDN-C"));
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleVNFFailure() {
+ // delete the Base Module and Generic Vnf - VNFAdapter failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFFailure();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ // cause a failure by not injecting a callback
+// injectVNFRestCallbacks(callbacks, "vnfDelete");
+// waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+// injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleVNFFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 7020);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Received error from VnfAdapter"));
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleVNFCallbackFailure() {
+ // delete the Base Module and Generic Vnf - VNFAdapter Callback failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDeleteFail");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+// injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleVNFCallbackFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 7020);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Received vfModuleException from VnfAdapter"));
+ }
+ logEnd();
+ }
+
+ // start of mocks used locally and by other VF Module unit tests
+ public static void MockAAIVfModulePUT(boolean isCreate){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("MMSC"))
+ .willReturn(aResponse()
+ .withStatus(isCreate ? 201 : 200)));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("PCRF"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockDoDeleteVfModule_SDNCSuccess() {
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>changedelete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>delete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+ }
+
+ public static void MockDoDeleteVfModule_SDNCFailure() {
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>changedelete"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>delete"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockDoDeleteVfModule_DeleteVNFSuccess() {
+ stubFor(delete(urlMatching("/vnfs/v1/vnfs/.*/vf-modules/.*"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
+ stubFor(delete(urlMatching("/vnfs/v1/volume-groups/78987"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void MockDoDeleteVfModule_DeleteVNFFailure() {
+ stubFor(delete(urlMatching("/vnfs/v1/vnfs/.*/vf-modules/.*"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "application/xml")));
+ }
+}
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java
new file mode 100644
index 0000000000..9c98c01b91
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java
@@ -0,0 +1,140 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.BPMNUtil;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+
+/**
+ * Please describe the DeleteVnfInfra.java class
+ *
+ */
+public class DoDeleteVnfTest extends WorkflowTest {
+
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn", "subprocess/GenericDeleteVnf.bpmn", "subprocess/DoDeleteVnf.bpmn"})
+ public void testDoDeleteVnf_success() throws Exception{
+
+ MockGetGenericVnfByIdWithDepth("testVnfId123", 1, "GenericFlows/getGenericVnfByNameResponse.xml");
+ MockDeleteGenericVnf("testVnfId123", "testReVer123");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ setVariables(variables);
+ invokeSubProcess("DoDeleteVnf", businessKey, variables);
+ // Disabled until SDNC support is there
+// injectSDNCCallbacks(callbacks, "assign");
+// injectSDNCCallbacks(callbacks, "activate");
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String found = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "GENGV_FoundIndicator") ;
+ String inUse = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "DoDVNF_vnfInUse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "WorkflowException");
+
+ assertEquals("true", found);
+ assertEquals("false", inUse);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn", "subprocess/GenericDeleteVnf.bpmn", "subprocess/DoDeleteVnf.bpmn"})
+ public void testDeleteVnfInfra_success_vnfNotFound() throws Exception{
+
+ MockDeleteGenericVnf("testVnfId123", "testReVer123", 404);
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ setVariables(variables);
+
+ invokeSubProcess("DoDeleteVnf", businessKey, variables);
+ // Disabled until SDNC support is there
+// injectSDNCCallbacks(callbacks, "assign");
+// injectSDNCCallbacks(callbacks, "activate");
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ String found = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "GENGV_FoundIndicator") ;
+ String inUse = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "DoDVNF_vnfInUse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "WorkflowException");
+
+ assertEquals("false", found);
+ assertEquals("false", inUse);
+ assertEquals(null, workflowException);
+ }
+
+ @Test
+ @Deployment(resources = {"subprocess/GenericGetVnf.bpmn", "subprocess/GenericDeleteVnf.bpmn", "subprocess/DoDeleteVnf.bpmn"})
+ public void testDeleteVnfInfra_error_vnfInUse() throws Exception{
+
+ MockGetGenericVnfByIdWithDepth("testVnfId123", 1, "GenericFlows/getGenericVnfResponse_hasRelationships.xml");
+ MockDeleteGenericVnf("testVnfId123", "testReVer123");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ setVariables(variables);
+
+ invokeSubProcess("DoDeleteVnf", businessKey, variables);
+// Disabled until SDNC support is there
+// injectSDNCCallbacks(callbacks, "assign");
+// injectSDNCCallbacks(callbacks, "activate");
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+
+ String found = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "GENGV_FoundIndicator") ;
+ String inUse = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "DoDVNF_vnfInUse");
+ String workflowException = BPMNUtil.getVariable(processEngineRule, "DoDeleteVnf", "WorkflowException");
+ String exWfex = "WorkflowException[processKey=DoDeleteVnf,errorCode=5000,errorMessage=Can't Delete Generic Vnf. Generic Vnf is still in use.]";
+
+ assertEquals("true", found);
+ assertEquals("true", inUse);
+ assertEquals(exWfex, workflowException);
+ }
+
+ private void setVariables(Map<String, Object> variables) {
+ variables.put("mso-request-id", "123");
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("vnfId","testVnfId123");
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
new file mode 100644
index 0000000000..bba6f62adc
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for DoUpdateVfModule.bpmn.
+ */
+public class DoUpdateVfModuleTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public DoUpdateVfModuleTest() throws IOException {
+ callbacks.put("changeassign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyChangeAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfUpdate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestUpdateCallback.xml"));
+ }
+
+ /**
+ * Test the happy path through the flow.
+ */
+ @Test
+ @Ignore
+ @Deployment(resources = {
+ "subprocess/DoUpdateVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn"
+ })
+ public void happyPath() throws IOException {
+
+ logStart();
+
+ String doUpdateVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/DoUpdateVfModuleRequest.xml");
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetVfModuleIdNoResponse("skask", "PCRF", "supercool");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", "supercool");
+ MockGetVolumeGroupById("MDTWNJ21", "78987", "VfModularity/VolumeGroup.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcInstanceId><", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPut("skask", "/supercool", 202);
+ MockPutGenericVnf("skask");
+ MockGetGenericVnfByIdWithPriority("skask", "supercool", 200, "VfModularity/VfModule-supercool.xml", 1);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "DEV-VF-0011");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DoUpdateVfModuleRequest", doUpdateVfModuleRequest);
+ invokeSubProcess("DoUpdateVfModule", businessKey, variables);
+
+ injectSDNCCallbacks(callbacks, "changeassign, query");
+ injectVNFRestCallbacks(callbacks, "vnfUpdate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ checkVariable(businessKey, "DoUpdateVfModuleSuccessIndicator", true);
+
+ String heatStackId = (String) getVariableFromHistory(businessKey, "DOUPVfMod_heatStackId");
+ System.out.println("Heat stack Id from AAI: " + heatStackId);
+
+ logEnd();
+ }
+}
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceInfraTest.java
new file mode 100644
index 0000000000..9ef4c94cce
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceInfraTest.java
@@ -0,0 +1,840 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.junit.Assert.assertEquals;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.executeAsyncWorkflow;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.getVariable;
+import static org.openecomp.mso.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetCloudRegion;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetwork;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkRouteTable;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseNetworkAdapter.MockPutNetworkAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapterTopology;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.BPMNUtil;
+import org.openecomp.mso.bpmn.common.SDNCAdapterCallbackRule;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.WorkflowTestTransformer;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.SDNCAdapterNetworkTopologyMockTransformer;
+
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+
+/**
+ * Unit test cases for UpdateNetworkInstanceInfra.bpmn
+ *
+ */
+public class UpdateNetworkInstanceInfraTest extends WorkflowTest {
+ @WorkflowTestTransformer
+ public static final ResponseTransformer sdncAdapterMockTransformer =
+ new SDNCAdapterNetworkTopologyMockTransformer();
+
+ @Rule
+ public final SDNCAdapterCallbackRule sdncAdapterCallbackRule =
+ new SDNCAdapterCallbackRule(processEngineRule);
+
+ /**
+ * End-to-End flow - Unit test for UpdateNetworkInstanceInfra.bpmn
+ * - String input & String response
+ */
+
+ @Test
+ //@Ignore
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_Success1() throws Exception {
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" Success1 - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("----------------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign"); //
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 200, "UpdateNetworkV2/updateNetworkResponse_Success.xml");
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN1", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables1();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ System.out.println("----------------------------------------------------------");
+ System.out.println("- got workflow response -");
+ System.out.println("----------------------------------------------------------");
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("true", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_CompleteMsoProcessRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_CompleteMsoProcessRequest"));
+
+ String workflowResp = BPMNUtil.getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "WorkflowResponse");
+ Assert.assertNotNull(workflowResp);
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" Success1 - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("----------------------------------------------------------");
+
+ }
+
+ @Test
+ //@Ignore
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_Success2() throws Exception {
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" Success2 - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("----------------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 200, "UpdateNetworkV2/updateNetworkResponse_Success.xml");
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN1", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables2();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("true", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_CompleteMsoProcessRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_CompleteMsoProcessRequest"));
+
+ String completeMsoProcessRequest =
+ "<aetgt:MsoCompletionRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\"" + '\n'
+ + " xmlns:ns=\"http://org.openecomp/mso/request/types/v1\"" + '\n'
+ + " xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + '\n'
+ + " <request-info>" + '\n'
+ + " <request-id>testRequestId</request-id>" + '\n'
+ + " <action>UPDATE</action>" + '\n'
+ + " <source>VID</source>" + '\n'
+ + " </request-info>" + '\n'
+ + " <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>" + '\n'
+ + "</aetgt:MsoCompletionRequest>";
+
+ Assert.assertEquals(completeMsoProcessRequest, getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_CompleteMsoProcessRequest"));
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" Success2 - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("----------------------------------------------------------");
+
+ }
+
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_MissingNetworkId() throws Exception {
+
+ System.out.println("--------------------------------------------------------------------");
+ System.out.println(" Missing networkId - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("--------------------------------------------------------------------");
+
+ // setup simulators
+
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariablesMissingNetworkId();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ String falloutHandlerActual = getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest");
+ String falloutHandlerExpected =
+"<aetgt:FalloutHandlerRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\"" + "\n" +
+" xmlns:ns=\"http://org.openecomp/mso/request/types/v1\"" + "\n" +
+" xmlns:wfsch=\"http://org.openecomp/mso/workflow/schema/v1\">" + "\n" +
+" <request-info xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + "\n" +
+" <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>" + "\n" +
+" <action>UPDATE</action>" + "\n" +
+" <source>VID</source>" + "\n" +
+" </request-info>" + "\n" +
+" <aetgt:WorkflowException xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\">" + "\n" +
+" <aetgt:ErrorMessage>Variable 'network-id' value/element is missing.</aetgt:ErrorMessage>" + "\n" +
+" <aetgt:ErrorCode>2500</aetgt:ErrorCode>" + "\n" +
+" </aetgt:WorkflowException>" + "\n" +
+" </aetgt:FalloutHandlerRequest>";
+
+ assertEquals("Response", falloutHandlerExpected, falloutHandlerActual);
+
+ System.out.println("------------------------------------------------------------------");
+ System.out.println(" Missing networkId - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("------------------------------------------------------------------");
+
+ }
+
+ /* NOT NEEDED
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_SDNCRollback1() throws Exception {
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" SDNCRollback1 - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("----------------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign");
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>rollback");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 200, "UpdateNetworkV2/updateNetworkResponse_Success.xml");
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockAAIResponse_queryId_UpdateNetwork_404V2(); // failure in queryId in AAI
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariablesSDNCRollback();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" SDNCRollback1 - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("----------------------------------------------------------");
+
+ } */
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_SDNCRollback_Scenario01() throws Exception {
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" SDNCRollback - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("----------------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign"); //
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>rollback");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 200, "UpdateNetworkV2/updateNetworkResponse_Success.xml");
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml", 200); // no 'payload' response from NetworkAdapter, version 2
+ //MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200); // let it fail (404) to see SDNC compensation
+ //MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200); // let it fail (404) to see SDNC compensation
+ //MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariablesSDNCRollback();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" SDNCRollback - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("----------------------------------------------------------");
+
+ }
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_Network_SDNC_Rollback() throws Exception {
+
+ System.out.println("---------------------------------------------------------------");
+ System.out.println(" Network and SDNC Rollback - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("---------------------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign"); //
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>rollback");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 200, "UpdateNetworkV2/updateNetworkResponse_Success.xml");
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN1", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ //MockAAIResponse_updateContrail_CreateNetwork_SuccessV2(); // designed to fail in AAI Update
+ //mockUpdateRequestDB(500, "Database/DBUpdateResponse.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables1();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ System.out.println("---------------------------------------------------------------------");
+ System.out.println(" Network and SCNC Rollback - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("---------------------------------------------------------------------");
+
+ }
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_Network_SDNC_Rollback_Failed() throws Exception {
+
+ System.out.println("---------------------------------------------------------------");
+ System.out.println(" Network and SDNC Rollback - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("---------------------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign"); //
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySim500Response.xml", "SvcAction>rollback");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 200, "UpdateNetworkV2/updateNetworkResponse_Success.xml");
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN1", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ //MockAAIResponse_updateContrail_CreateNetwork_SuccessV2(); // designed to fail in AAI Update
+ //mockUpdateRequestDB(500, "Database/DBUpdateResponse.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables1();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ System.out.println("---------------------------------------------------------------------");
+ System.out.println(" Network and SCNC Rollback - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("---------------------------------------------------------------------");
+
+ }
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_SDNCRollback2() throws Exception {
+
+ System.out.println("----------------------------------------------------");
+ System.out.println(" SDNCRollback2 - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("----------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign");
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>rollback");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 500, "UpdateNetworkV2/updateNetworkResponse_500.xml"); // failure 500 in NetworkAdapter
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN1", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ //MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables1();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ System.out.println("------------------------------------------------------------");
+ System.out.println(" SDNCRollback2 - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("------------------------------------------------------------");
+
+ }
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_SDNCRollback3() throws Exception {
+
+ System.out.println("----------------------------------------------------");
+ System.out.println(" SDNCRollback3 - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("----------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign");
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>rollback");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 400, "UpdateNetworkV2/updateNetworkResponse_400.xml"); // failure 400 in NetworkAdapter
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN1", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ //MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables1();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ System.out.println("------------------------------------------------------------");
+ System.out.println(" SDNCRollback3 - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("------------------------------------------------------------");
+
+ }
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_PONR() throws Exception {
+
+ System.out.println("--------------------------------------------------------------------");
+ System.out.println(" PONR (Point-of-no-Return) - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("--------------------------------------------------------------------");
+
+ // setup simulators
+
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>changeassign"); //
+ mockSDNCAdapterTopology("UpdateNetworkV2mock/sdncUpdateNetworkTopologySimResponse.xml", "SvcAction>rollback");
+ MockPutNetworkAdapter("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "updateNetworkRequest", 200, "UpdateNetworkV2/updateNetworkResponse_Success.xml");
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN1", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200);
+ MockGetNetworkRouteTable("refFQDN2", "UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200);
+ MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml");
+ mockUpdateRequestDB(500, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables1();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_FalloutHandlerRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ String falloutHandlerRequest =
+ "<aetgt:FalloutHandlerRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\"" + '\n'
+ + " xmlns:ns=\"http://org.openecomp/mso/request/types/v1\"" + '\n'
+ + " xmlns:wfsch=\"http://org.openecomp/mso/workflow/schema/v1\">" + '\n'
+ + " <request-info xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + '\n'
+ + " <request-id>testRequestId</request-id>" + '\n'
+ + " <action>CREATE</action>" + '\n'
+ + " <source>VID</source>" + '\n'
+ + " </request-info>" + '\n'
+ + " <aetgt:WorkflowException xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\">" + '\n'
+ + " <aetgt:ErrorMessage> DB Update failed, code: 500</aetgt:ErrorMessage>" + '\n'
+ + " <aetgt:ErrorCode>2500</aetgt:ErrorCode>" + '\n'
+ + " </aetgt:WorkflowException>" + '\n'
+ + " </aetgt:FalloutHandlerRequest>";
+
+ System.out.println("Display UPDNETI_FalloutHandlerRequest - " + getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+ //Assert.assertEquals(falloutHandlerRequest, getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_FalloutHandlerRequest"));
+
+ System.out.println("--------------------------------------------------------------------");
+ System.out.println(" PONR (Point-of-no-Return) - UpdateNetworkInstanceInfra flow Completed! ");
+ System.out.println("--------------------------------------------------------------------");
+
+
+ }
+
+ @Test
+ @Deployment(resources = {"process/UpdateNetworkInstanceInfra.bpmn",
+ "subprocess/GenericGetService.bpmn",
+ "subprocess/FalloutHandler.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn"})
+
+ public void shouldInvokeServiceUpdateNetworkInstanceInfra_sdncFailure() throws Exception {
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" SNDC Failure - UpdateNetworkInstanceInfra flow Started! ");
+ System.out.println("----------------------------------------------------------");
+
+ // setup simulators
+
+ //MockSDNCAdapterBadAsynchronousResponse(); // 404
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 500, ""); // 500
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById("f70e927b-6087-4974-9ef8-c5e4d5847ca4", "UpdateNetworkV2/updateNetwork_queryInstance_Success.xml");
+
+ Map<String, String> variables = setupVariables2();
+ WorkflowResponse workflowResponse = executeAsyncWorkflow(processEngineRule, "UpdateNetworkInstanceInfra", variables);
+ waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
+
+ assertEquals("false", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_Success"));
+ Assert.assertNotNull("UPDNETI_CompleteMsoProcessRequest - ", getVariable(processEngineRule, "UpdateNetworkInstanceInfra", "UPDNETI_CompleteMsoProcessRequest"));
+
+ System.out.println("----------------------------------------------------------");
+ System.out.println(" SNDC Failure - UpdateNetworkInstanceInfra flow Completed ");
+ System.out.println("----------------------------------------------------------");
+
+ }
+
+ // *****************
+ // Utility Section
+ // *****************
+
+ // Success Scenario
+ private Map<String, String> setupVariables1() {
+ Map<String, String> variables = new HashMap<String, String>();
+ variables.put("bpmnRequest", getCreateNetworkRequest1());
+ variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "CREATE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("networkId", "49c86598-f766-46f8-84f8-8d1c1b10f9b4");
+ variables.put("serviceType", "vMOG");
+ variables.put("vfModuleType", "");
+ variables.put("networkType", "modelName");
+ return variables;
+
+ }
+
+ public String getCreateNetworkRequest1() {
+
+ String request =
+ "{ \"requestDetails\": { " + '\n' +
+ " \"modelInfo\": { " + '\n' +
+ " \"modelType\": \"modelType\", " + '\n' +
+ " \"modelId\": \"modelId\", " + '\n' +
+ " \"modelNameVersionId\": \"modelNameVersionId\", " + '\n' +
+ " \"modelName\": \"CONTRAIL_EXTERNAL\", " + '\n' +
+ " \"modelVersion\": \"1\" " + '\n' +
+ " }, " + '\n' +
+ " \"cloudConfiguration\": { " + '\n' +
+ " \"lcpCloudRegionId\": \"RDM2WAGPLCP\", " + '\n' +
+ " \"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestInfo\": { " + '\n' +
+ " \"instanceName\": \"MNS-25180-L-01-dmz_direct_net_1\", " + '\n' +
+ " \"source\": \"VID\", " + '\n' +
+ " \"callbackUrl\": \"\", " + '\n' +
+ " \"suppressRollback\": \"true\" ," + '\n' +
+ " \"productFamilyId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestParameters\": { " + '\n' +
+ " \"backoutOnFailure\": true, " + '\n' +
+ " \"serviceId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\", " + '\n' +
+ " \"userParams\": [] " + '\n' +
+ " } " + '\n' +
+ " } " + '\n' +
+ "}";
+
+ return request;
+ }
+
+ // Success Scenario 2
+ private Map<String, String> setupVariables2() {
+ Map<String, String> variables = new HashMap<String, String>();
+ variables.put("bpmnRequest", getCreateNetworkRequest2());
+ variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "UPDATE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("networkId", "49c86598-f766-46f8-84f8-8d1c1b10f9b4");
+ variables.put("serviceType", "vMOG");
+ variables.put("vfModuleType", "");
+ variables.put("networkType", "modelName");
+ return variables;
+
+ }
+
+ public String getCreateNetworkRequest2() {
+
+ String request =
+ "{ \"requestDetails\": { " + '\n' +
+ " \"modelInfo\": { " + '\n' +
+ " \"modelType\": \"modelType\", " + '\n' +
+ " \"modelId\": \"modelId\", " + '\n' +
+ " \"modelNameVersionId\": \"modelNameVersionId\", " + '\n' +
+ " \"modelName\": \"CONTRAIL_EXTERNAL\", " + '\n' +
+ " \"modelVersion\": \"1\" " + '\n' +
+ " }, " + '\n' +
+ " \"cloudConfiguration\": { " + '\n' +
+ " \"lcpCloudRegionId\": \"RDM2WAGPLCP\", " + '\n' +
+ " \"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestInfo\": { " + '\n' +
+ " \"instanceName\": \"myOwn_Network\", " + '\n' +
+ " \"source\": \"VID\", " + '\n' +
+ " \"callbackUrl\": \"\", " + '\n' +
+ " \"suppressRollback\": \"true\" ," + '\n' +
+ " \"productFamilyId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestParameters\": { " + '\n' +
+ " \"backoutOnFailure\": true, " + '\n' +
+ " \"serviceId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\", " + '\n' +
+ " \"userParams\": [] " + '\n' +
+ " } " + '\n' +
+ " } " + '\n' +
+ "}";
+
+ return request;
+
+ }
+
+ /* Active Scenario
+ private Map<String, String> setupVariablesActive() {
+ Map<String, String> variables = new HashMap<String, String>();
+ variables.put("mso-request-id", "testRequestId");
+ variables.put("bpmnRequest", getCreateNetworkRequestActive());
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "UPDATE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("networkId", "49c86598-f766-46f8-84f8-8d1c1b10f9b4");
+ variables.put("serviceType", "vMOG");
+ variables.put("vfModuleType", "");
+ variables.put("networkType", "modelName");
+ return variables;
+
+ }
+
+ public String getCreateNetworkRequestActive() {
+
+ String request =
+ "{ \"requestDetails\": { " + '\n' +
+ " \"modelInfo\": { " + '\n' +
+ " \"modelType\": \"modelType\", " + '\n' +
+ " \"modelId\": \"modelId\", " + '\n' +
+ " \"modelNameVersionId\": \"modelNameVersionId\", " + '\n' +
+ " \"modelName\": \"CONTRAIL_EXTERNAL\", " + '\n' +
+ " \"modelVersion\": \"1\" " + '\n' +
+ " }, " + '\n' +
+ " \"cloudConfiguration\": { " + '\n' +
+ " \"lcpCloudRegionId\": \"RDM2WAGPLCP\", " + '\n' +
+ " \"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestInfo\": { " + '\n' +
+ " \"instanceName\": \"MNS-25180-L-01-dmz_direct_net_2\", " + '\n' +
+ " \"source\": \"VID\", " + '\n' +
+ " \"callbackUrl\": \"\", " + '\n' +
+ " \"suppressRollback\": \"true\" ," + '\n' +
+ " \"productFamilyId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestParameters\": { " + '\n' +
+ " \"userParams\": [] " + '\n' +
+ " } " + '\n' +
+ " } " + '\n' +
+ "}";
+
+ return request;
+
+ } */
+
+ // Missing Name Scenario
+ private Map<String, String> setupVariablesMissingNetworkId() {
+ Map<String, String> variables = new HashMap<String, String>();
+ variables.put("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
+ variables.put("bpmnRequest", getCreateNetworkRequestNetworkId());
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "UPDATE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ //variables.put("networkId", "49c86598-f766-46f8-84f8-8d1c1b10f9b4"); // missing, ok
+ variables.put("serviceType", "vMOG");
+ variables.put("vfModuleType", "");
+ variables.put("networkType", "modelName");
+
+ return variables;
+
+ }
+
+ public String getCreateNetworkRequestNetworkId() {
+
+ String request =
+ "{ \"requestDetails\": { " + '\n' +
+ " \"modelInfo\": { " + '\n' +
+ " \"modelType\": \"modelType\", " + '\n' +
+ " \"modelId\": \"modelId\", " + '\n' +
+ " \"modelNameVersionId\": \"modelNameVersionId\", " + '\n' +
+ " \"modelName\": \"CONTRAIL_EXTERNAL\", " + '\n' +
+ " \"modelVersion\": \"1\" " + '\n' +
+ " }, " + '\n' +
+ " \"cloudConfiguration\": { " + '\n' +
+ " \"lcpCloudRegionId\": \"RDM2WAGPLCP\", " + '\n' +
+ " \"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestInfo\": { " + '\n' +
+ " \"source\": \"VID\", " + '\n' +
+ " \"callbackUrl\": \"\", " + '\n' +
+ " \"suppressRollback\": \"true\" ," + '\n' +
+ " \"productFamilyId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestParameters\": { " + '\n' +
+ " \"userParams\": [] " + '\n' +
+ " } " + '\n' +
+ " } " + '\n' +
+ "}";
+
+ return request;
+
+ }
+
+ // SDNC Rollback Scenario
+ private Map<String, String> setupVariablesSDNCRollback() {
+ Map<String, String> variables = new HashMap<String, String>();
+ variables.put("mso-request-id", "testRequestId");
+ variables.put("bpmnRequest", getCreateNetworkRequestSDNCRollback());
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "UPDATE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("networkId", "49c86598-f766-46f8-84f8-8d1c1b10f9b4");
+ variables.put("serviceType", "vMOG");
+ variables.put("vfModuleType", "");
+ variables.put("networkType", "modelName");
+ return variables;
+
+ }
+
+ public String getCreateNetworkRequestSDNCRollback() {
+
+ String request =
+ "{ \"requestDetails\": { " + '\n' +
+ " \"modelInfo\": { " + '\n' +
+ " \"modelType\": \"modelType\", " + '\n' +
+ " \"modelId\": \"modelId\", " + '\n' +
+ " \"modelNameVersionId\": \"modelNameVersionId\", " + '\n' +
+ " \"modelName\": \"CONTRAIL_EXTERNAL\", " + '\n' +
+ " \"modelVersion\": \"1\" " + '\n' +
+ " }, " + '\n' +
+ " \"cloudConfiguration\": { " + '\n' +
+ " \"lcpCloudRegionId\": \"RDM2WAGPLCP\", " + '\n' +
+ " \"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestInfo\": { " + '\n' +
+ " \"instanceName\": \"MNS-25180-L-01-dmz_direct_net_3\", " + '\n' +
+ " \"source\": \"VID\", " + '\n' +
+ " \"callbackUrl\": \"\", " + '\n' +
+ " \"suppressRollback\": \"true\" ," + '\n' +
+ " \"productFamilyId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\" " + '\n' +
+ " }, " + '\n' +
+ " \"requestParameters\": { " + '\n' +
+ " \"userParams\": [] " + '\n' +
+ " } " + '\n' +
+ " } " + '\n' +
+ "}";
+
+
+ return request;
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
new file mode 100644
index 0000000000..cbf91bfdb3
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit test cases for UpdateVfModule.bpmn
+ */
+public class UpdateVfModuleInfraTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public UpdateVfModuleInfraTest() throws IOException {
+ callbacks.put("changeassign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyChangeAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfUpdate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestUpdateCallback.xml"));
+ }
+
+ /**
+ * Sunny day scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Ignore
+ @Deployment(resources = {
+ "process/UpdateVfModuleInfra.bpmn",
+ "subprocess/DoUpdateVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void sunnyDay() throws Exception {
+
+ logStart();
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", "supercool");
+ MockGetGenericVnfByIdWithPriority("skask", "supercool", 200, "VfModularity/VfModule-supercool.xml", 1);
+ mockSDNCAdapter("/SDNCAdapter", "SvcInstanceId><", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPut("skask", "/supercool", 202);
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String updaetVfModuleRequest =
+ FileUtil.readResourceFile("__files/InfrastructureFlows/UpdateVfModule_VID_request.json");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVID();
+
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("UpdateVfModuleInfra",
+ "v1", businessKey, updaetVfModuleRequest, variables);
+
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectSDNCCallbacks(callbacks, "changeassign, query");
+ injectVNFRestCallbacks(callbacks, "vnfUpdate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ // TODO add appropriate assertions
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "UpdateVfModuleInfraSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVID() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "UPDATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "supercool");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java
new file mode 100644
index 0000000000..34c0af43c4
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockPutVNFVolumeGroup;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit test cases for UpdateVfModuleVolume.bpmn
+ */
+public class UpdateVfModuleVolumeInfraV1Test extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public UpdateVfModuleVolumeInfraV1Test() throws IOException {
+ callbacks.put("volumeGroupUpdate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml"));
+ }
+
+ /**
+ * Happy path scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "process/UpdateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void happyPath() throws Exception {
+
+ logStart();
+
+ MockGetGenericVnfById("/TEST-VNF-ID-0123", "CreateVfModuleVolumeInfraV1/GenericVnf.xml", 200);
+ MockGetVolumeGroupById("mdt1", "78987", "UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml");
+ MockGetVfModuleId("9e48f6ea-f786-46de-800a-d480e5ccc846", "6a1dc898-b590-47b9-bbf0-34424a7a2ec3/", "UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml", 200);
+ mockPutVNFVolumeGroup("78987", 202);
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String updaetVfModuleVolRequest =
+ FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ testVariables.put("volumeGroupId", "78987");
+ testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("UpdateVfModuleVolumeInfraV1", "v1", businessKey, updaetVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupUpdate");
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "UpdateVfModuleVolumeSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ /**
+ * VF Module Personal model id does not match request model invariant id
+ * @throws Exception
+ */
+ @Test
+ //@Ignore
+ @Deployment(resources = {
+ "process/UpdateVfModuleVolumeInfraV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void testPersonaModelIdNotMatch() throws Exception {
+
+ logStart();
+
+ MockGetVolumeGroupById("mdt1", "78987", "UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml");
+ MockGetGenericVnfById("/TEST-VNF-ID-0123", "CreateVfModuleVolumeInfraV1/GenericVnf.xml", 200);
+ MockGetVfModuleId("9e48f6ea-f786-46de-800a-d480e5ccc846", "6a1dc898-b590-47b9-bbf0-34424a7a2ec3/", "UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml", 200);
+ mockPutVNFVolumeGroup("78987", 202);
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String updaetVfModuleVolRequest =
+ FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json");
+
+ Map<String, Object> testVariables = new HashMap<String, Object>();
+ testVariables.put("requestId", "TEST-REQUEST-ID-0123");
+ testVariables.put("serviceInstanceId", "test-service-instance-id");
+ testVariables.put("volumeGroupId", "78987");
+ testVariables.put("vnfId", "TEST-VNF-ID-0123");
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("UpdateVfModuleVolumeInfraV1", "v1", businessKey, updaetVfModuleVolRequest, testVariables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectVNFRestCallbacks(callbacks, "volumeGroupUpdate");
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "UpdateVfModuleVolumeSuccessIndicator", true);
+
+ logEnd();
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
new file mode 100644
index 0000000000..40eca5a038
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1bf6df0d1f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml
new file mode 100644
index 0000000000..a5640b2b26
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml
new file mode 100644
index 0000000000..c67e980c63
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml
@@ -0,0 +1,78 @@
+<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.openecomp.mso.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000071: root cause</b>
+ <pre>java.lang.NullPointerException
+ org.openecomp.mso.adapters.network.NetworkAdapterRest$CreateNetworkVolumesTask.run(NetworkAdapterRest.java:128)
+ org.openecomp.mso.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.openecomp.mso.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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml
new file mode 100644
index 0000000000..b40bd07a9d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml
@@ -0,0 +1,24 @@
+<ns2:createNetworkResponse xmlns:ns2="http://org.openecomp.mso/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
new file mode 100644
index 0000000000..09f01fb7ca
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..b2d9ce2c5d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
new file mode 100644
index 0000000000..4dfd8d3f12
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml
new file mode 100644
index 0000000000..5cda12da2f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..77e3a649fb
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml
new file mode 100644
index 0000000000..5cda12da2f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
new file mode 100644
index 0000000000..fb8c365844
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..59deca9aee
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..02a280da58
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
new file mode 100644
index 0000000000..52e9692b4d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..ddae6b1182
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
new file mode 100644
index 0000000000..19aac50ee4
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..be820b83b1
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml
new file mode 100644
index 0000000000..1ede44427a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml
new file mode 100644
index 0000000000..458426660e
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.openecomp/mso/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
new file mode 100644
index 0000000000..4c18356bf9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..6ab9416617
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..91048eca9b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json
@@ -0,0 +1,65 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "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",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-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",
+ "modelCustomizationName": "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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json
new file mode 100644
index 0000000000..72e41839fb
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json
@@ -0,0 +1,45 @@
+{
+ "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",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "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",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..bff26fa78a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
new file mode 100644
index 0000000000..152bafc0eb
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..cb20a41ca0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
new file mode 100644
index 0000000000..55fdedb66c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBAdapter.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBAdapter.xml
new file mode 100644
index 0000000000..5a36d741d0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBAdapter.xml
@@ -0,0 +1 @@
+<DbTag>Notified</DbTag> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml
new file mode 100644
index 0000000000..7c30f75497
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/Database/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.openecomp.mso/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
new file mode 100644
index 0000000000..4b3ac855df
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
@@ -0,0 +1,7 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
+ &lt;output xmlns="org:openecomp: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> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml
new file mode 100644
index 0000000000..9b651f25e3
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml
new file mode 100644
index 0000000000..4ce7048950
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml
new file mode 100644
index 0000000000..a740caacc4
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml
new file mode 100644
index 0000000000..841cae0a2b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..25aa45afd9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json
new file mode 100644
index 0000000000..35ba121086
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json
@@ -0,0 +1,17 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "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/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..c02c35f9c9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
new file mode 100644
index 0000000000..5e8a62b25b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
new file mode 100644
index 0000000000..586e0a620a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml
new file mode 100644
index 0000000000..803a847bbc
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.openecomp/mso/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml
new file mode 100644
index 0000000000..e6ada9c826
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.openecomp/mso/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
new file mode 100644
index 0000000000..4c18356bf9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..6ab9416617
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..5ff965f7e2
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json
@@ -0,0 +1,64 @@
+{
+ "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": "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",
+ "modelNameVersionId": "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",
+ "modelNameVersionId": "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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..bff26fa78a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..cb20a41ca0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
new file mode 100644
index 0000000000..a472996121
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..8ba178cc1c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
new file mode 100644
index 0000000000..8ba178cc1c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml
new file mode 100644
index 0000000000..416689e10c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml
new file mode 100644
index 0000000000..e377c70474
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json
new file mode 100644
index 0000000000..2b9c2879a7
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json
@@ -0,0 +1,38 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "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",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json
new file mode 100644
index 0000000000..f90b9678f0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json
@@ -0,0 +1,39 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "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",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "cascadeDelete": true
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json
new file mode 100644
index 0000000000..e3556e7b4a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json
@@ -0,0 +1,51 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "introvert",
+"modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1",
+"modelCustomizationId": "MODEL12345"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "MDTWNJ21",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceName": "PCRF::module-0",
+"instanceId": "supercool",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "123456",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "skask",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml
new file mode 100644
index 0000000000..a5640b2b26
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
new file mode 100644
index 0000000000..c67e980c63
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
@@ -0,0 +1,78 @@
+<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.openecomp.mso.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000071: root cause</b>
+ <pre>java.lang.NullPointerException
+ org.openecomp.mso.adapters.network.NetworkAdapterRest$CreateNetworkVolumesTask.run(NetworkAdapterRest.java:128)
+ org.openecomp.mso.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.openecomp.mso.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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
new file mode 100644
index 0000000000..7a00744103
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
@@ -0,0 +1,24 @@
+<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.openecomp.mso/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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml
new file mode 100644
index 0000000000..ca5145c226
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
new file mode 100644
index 0000000000..e06d27ea88
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..24ee1df9c8
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..686ac1667f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
new file mode 100644
index 0000000000..b01e469cbf
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..a19f9412c8
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml
new file mode 100644
index 0000000000..c35faef27f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..244a51e160
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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>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>
+ <related-to>vf-module</related-to>
+ <related-link>http://localhost:28090/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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..8ab460e24d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json
@@ -0,0 +1,64 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "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",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1",
+ "modelCustomizationName": "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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json
new file mode 100644
index 0000000000..963e2dd7d7
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json
@@ -0,0 +1,64 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "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",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff-x",
+ "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1",
+ "modelCustomizationName": "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/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
new file mode 100644
index 0000000000..58b8708809
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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>
+ <persona-model-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <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/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..0ec1e30022
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/GenericVnf.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/GenericVnf.xml
new file mode 100644
index 0000000000..b2560bcb47
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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>
+ <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>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..d7bbb15b8c
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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="mtcnjv9aaas01.mtcnj.aic.cip.com-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/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml
new file mode 100644
index 0000000000..919ff2c36b
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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.openecomp/workflow/sdnc/adapter/schema/v1"/>
+ </soap:Body>
+</soap:Envelope> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VfModule-new.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VfModule-new.xml
new file mode 100644
index 0000000000..a71441e916
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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>
+ <persona-model-id>00000000-0000-0000-0000-000000000000</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <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/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VfModule-supercool.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VfModule-supercool.xml
new file mode 100644
index 0000000000..1066b17b94
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <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/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml
new file mode 100644
index 0000000000..354ebb7160
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/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/MSOInfrastructureBPMN/src/test/resources/__files/deleteNetworkResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/deleteNetworkResponse_Success.xml
new file mode 100644
index 0000000000..902c0837d9
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/deleteNetworkResponse_Success.xml
@@ -0,0 +1,3 @@
+<ns2:deleteNetworkResponse xmlns:ns2="http://org.openecomp.mso/network">
+ <networkDeleted>true</networkDeleted>
+</ns2:deleteNetworkResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml
new file mode 100644
index 0000000000..68db73d5a5
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
+
+ <property name="jdbcUrl" value="jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000" />
+ <property name="jdbcDriver" value="org.h2.Driver" />
+ <property name="jdbcUsername" value="sa" />
+ <property name="jdbcPassword" value="" />
+
+ <!-- Database configurations -->
+ <property name="databaseSchemaUpdate" value="true" />
+
+ <!-- job executor configurations -->
+ <property name="jobExecutorActivate" value="true" />
+
+ <property name="history" value="full" />
+
+ <property name="customPostBPMNParseListeners">
+ <list>
+ <bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
+ </list>
+ </property>
+
+ <property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
+
+ <!--<property name="idGenerator" ref="uuidGenerator" />-->
+
+ <!-- engine plugins -->
+ <property name="processEnginePlugins">
+ <list>
+ <ref bean="connectProcessEnginePlugin" />
+ <ref bean="spinProcessEnginePlugin" />
+ <ref bean="loggingPlugin" />
+ <ref bean="workflowExceptionPlugin" />
+ <ref bean="workbenchPlugin" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="workbenchPlugin" class="org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap">
+ <property name="httpPort" value="28088"/>
+ </bean>
+
+ <bean id="loggingPlugin" class="org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin" />
+
+ <!-- Needed until all subflows generate MSOWorkflowException events -->
+ <bean id="workflowExceptionPlugin" class="org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin" />
+
+ <bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
+
+ <!--<bean id="uuidGenerator" class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />-->
+
+ <!-- engine plugin beans -->
+ <bean id="connectProcessEnginePlugin" class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
+ <bean id="spinProcessEnginePlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
+
+</beans>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/logging.properties b/bpmn/MSOInfrastructureBPMN/src/test/resources/logging.properties
new file mode 100644
index 0000000000..4941c55971
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/logging.properties
@@ -0,0 +1,2 @@
+#register SLF4JBridgeHandler as handler for the j.u.l. root logger
+handlers = org.slf4j.bridge.SLF4JBridgeHandler
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.properties b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.properties
new file mode 100644
index 0000000000..f800d00245
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.properties
@@ -0,0 +1,3 @@
+# Default BPMN properties for unit tests
+
+URNMapping.FileSystemLoading.Enabled=true \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
new file mode 100644
index 0000000000..ac340c79b6
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
@@ -0,0 +1,85 @@
+# Default URN Mappings for unit tests
+
+mso.rollback=true
+
+canopi.auth=757A94191D685FD2092AC1490730A4FC
+csi.aots.addincidentmanagement.endpoint=http://localhost:28090/AddIncidentManagementTicketRequest
+csi.networkstatus.endpoint=http://localhost:28090/SendManagedNetworkStatusNotification
+mso.csi.pwd=4EA237303511EFBBC37F17A351562131
+mso.csi.usrname=mso
+mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7
+
+mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess
+
+mso.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter
+mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC
+
+mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter
+mso.adapters.network.rest.endpoint=http://localhost:28090/networks/NetworkAdapter
+
+mso.adapters.po.auth=757A94191D685FD2092AC1490730A4FC
+mso.adapters.po.password=3141634BF7E070AA289CF2892C986C0B
+mso.po.timeout=PT60S
+
+aai.auth=757A94191D685FD2092AC1490730A4FC
+
+mso.adapters.sdnc.endpoint=http://localhost:28090/SDNCAdapter
+mso.adapters.sdnc.rest.endpoint=http://localhost:28090/SDNCAdapter/v1/sdnc
+mso.adapters.sdnc.timeout=PT60S
+mso.sdnc.firewall.yang.model=http://com/openecomp/svc/mis/firewall-lite-gui
+mso.sdnc.firewall.yang.model.version=2015-05-15
+mso.sdnc.password=3141634BF7E070AA289CF2892C986C0B
+mso.sdnc.timeout.firewall.minutes=20
+mso.sdnc.timeout=PT10S
+mso.sdnc.timeout.ucpe.async.hours=120
+mso.sdnc.timeout.ucpe.async.minutes=5
+mso.workflow.message.endpoint=http://localhost:28080/mso/WorkflowMesssage
+mso.workflow.sdncadapter.callback=http://localhost:28080/mso/SDNCAdapterCallbackService
+
+mso.catalog.db.endpoint=http://localhost:28090/
+
+mso.adapters.tenant.endpoint=http://localhost:28090/tenantAdapterMock
+mso.adapters.vnf-async.endpoint=http://localhost:28090/vnfs/VnfAdapterAsync
+mso.adapters.vnf.endpoint=http://localhost:28090/vnfs/VnfAdapter
+mso.adapters.vnf.rest.endpoint=http://localhost:28090/vnfs/v1/vnfs
+mso.workflow.vnfadapter.create.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.delete.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.query.callback=http://localhost:28080/mso/services/VNFAdapterQuerCallbackV1
+mso.workflow.vnfadapter.rollback.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.createvce.delay.seconds=1
+mso.infra.customer.id=testCustIdInfra
+
+aai.endpoint=http://localhost:28090
+
+# AAI version mappings
+
+# Example to override default version for a resource:
+#mso.workflow.default.aai.vce.version=6
+#mso.workflow.default.aai.v6.vce.uri=/aai/v6/network/vces/vce
+
+mso.workflow.global.default.aai.version=8
+mso.workflow.default.aai.cloud-region.version=9
+mso.workflow.default.aai.generic-vnf.version=9
+
+mso.workflow.default.aai.v9.cloud-region.uri=/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+mso.workflow.default.aai.v8.customer.uri=/aai/v8/business/customers/customer
+mso.workflow.default.aai.v8.generic-query.uri=/aai/v8/search/generic-query
+mso.workflow.default.aai.v9.generic-vnf.uri=/aai/v9/network/generic-vnfs/generic-vnf
+mso.workflow.default.aai.v8.l3-network.uri=/aai/v8/network/l3-networks/l3-network
+mso.workflow.default.aai.v8.network-policy.uri=/aai/v8/network/network-policies/network-policy
+mso.workflow.default.aai.v8.nodes-query.uri=/aai/v8/search/nodes-query
+mso.workflow.default.aai.v8.route-table-reference.uri=/aai/v8/network/route-table-references/route-table-reference
+mso.workflow.default.aai.v8.tenant.uri=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+mso.workflow.default.aai.v8.vce.uri=/aai/v8/network/vces/vce
+mso.workflow.default.aai.v8.vpn-binding.uri=/aai/v8/network/vpn-bindings/vpn-binding
+mso.workflow.notification.name=GenericNotificationService
+
+log.debug.CompleteMsoProcess=true
+log.debug.CreateNetworkInstanceInfra=true
+log.debug.CreateServiceInstanceInfra=true
+log.debug.DeleteNetworkInstanceInfra=true
+log.debug.FalloutHandler=true
+log.debug.GenericGetService=true
+log.debug.sdncAdapter=true
+log.debug.UpdateNetworkInstanceInfra=true
+log.debug.VnfAdapterRestV1=true \ No newline at end of file
diff --git a/bpmn/MSOMockServer/.gitignore b/bpmn/MSOMockServer/.gitignore
new file mode 100644
index 0000000000..f6c8fbcdef
--- /dev/null
+++ b/bpmn/MSOMockServer/.gitignore
@@ -0,0 +1,4 @@
+/bin
+/target
+/target
+/target
diff --git a/bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF b/bpmn/MSOMockServer/WebContent/META-INF/MANIFEST.MF
index 254272e1c0..254272e1c0 100644
--- a/bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF
+++ b/bpmn/MSOMockServer/WebContent/META-INF/MANIFEST.MF
diff --git a/bpmn/MSOMockServer/WebContent/WEB-INF/web.xml b/bpmn/MSOMockServer/WebContent/WEB-INF/web.xml
new file mode 100644
index 0000000000..1aa8cdb8d7
--- /dev/null
+++ b/bpmn/MSOMockServer/WebContent/WEB-INF/web.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+</web-app> \ No newline at end of file
diff --git a/bpmn/MSOMockServer/pom.xml b/bpmn/MSOMockServer/pom.xml
new file mode 100644
index 0000000000..268f392977
--- /dev/null
+++ b/bpmn/MSOMockServer/pom.xml
@@ -0,0 +1,95 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSOMockServer</artifactId>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <attachClasses>true</attachClasses>
+ <archiveClasses>true</archiveClasses>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+
+ <dependency>
+ <groupId>com.github.tomakehurst</groupId>
+ <artifactId>wiremock</artifactId>
+ <version>1.56</version>
+ <classifier>standalone</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.skyscreamer</groupId>
+ <artifactId>jsonassert</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.jayway.jsonpath</groupId>
+ <artifactId>json-path</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.sf.jopt-simple</groupId>
+ <artifactId>jopt-simple</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-client</artifactId>
+ <version>3.0.8.Final</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java
new file mode 100644
index 0000000000..12231c9ee5
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class FileUtil {
+
+ /**
+ * Read the specified resource file and return the contents as a String.
+ *
+ * @param fileName Name of the resource file
+ * @return the contents of the resource file as a String
+ * @throws IOException if there is a problem reading the file
+ */
+ public static String readResourceFile(String fileName) {
+ InputStream stream;
+ try {
+ stream = getResourceAsStream(fileName);
+ byte[] bytes;
+ bytes = new byte[stream.available()];
+ stream.read(bytes);
+ stream.close();
+ return new String(bytes);
+ } catch (IOException e) {
+ return "";
+ }
+ }
+
+ /**
+ * Get an InputStream for the resource specified.
+ *
+ * @param resourceName Name of resource for which to get InputStream.
+ * @return an InputStream for the resource specified.
+ * @throws IOException If we can't get the InputStream for whatever reason.
+ */
+ private static InputStream getResourceAsStream(String resourceName) throws IOException {
+ InputStream stream =
+ FileUtil.class.getClassLoader().getResourceAsStream(resourceName);
+ if (stream == null) {
+ throw new IOException("Can't access resource '" + resourceName + "'");
+ }
+ return stream;
+ }
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResource.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResource.java
new file mode 100644
index 0000000000..8b8bea6a8d
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResource.java
@@ -0,0 +1,207 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import com.github.tomakehurst.wiremock.WireMockServer;
+import com.github.tomakehurst.wiremock.client.WireMock;
+
+/**
+ *
+ * Mock Resource which is used to start, stop the WireMock Server
+ * Also up to 50 mock properties can be added at run-time to change the properties used in transformers such as sdnc_delay in SDNCAdapterMockTransformer
+ * You can also selectively setup a stub (use reset before setting up), reset all stubs
+ */
+@Path("/server")
+public class MockResource {
+
+ private boolean started = false;
+ private final Integer defaultPort = 28090;
+ private WireMockServer wireMockServer = null;
+ private static Map<String,String> mockProperties = new HashMap<String,String>();
+
+ public static String getMockProperties(String key) {
+ return mockProperties.get(key);
+ }
+
+ private synchronized void initMockServer(int portNumber) {
+ String path = FileUtil.class.getClassLoader().getResource("__files/sdncSimResponse.xml").getFile();
+ path = path.substring(0,path.indexOf("__files/"));
+
+ wireMockServer = new WireMockServer(wireMockConfig().port(portNumber).extensions("org.openecomp.mso.bpmn.mock.SDNCAdapterMockTransformer")
+ .extensions("org.openecomp.mso.bpmn.mock.SDNCAdapterNetworkTopologyMockTransformer")
+ .extensions("org.openecomp.mso.bpmn.mock.VnfAdapterCreateMockTransformer")
+ .extensions("org.openecomp.mso.bpmn.mock.VnfAdapterDeleteMockTransformer")
+ .extensions("org.openecomp.mso.bpmn.mock.VnfAdapterUpdateMockTransformer")
+ .extensions("org.openecomp.mso.bpmn.mock.VnfAdapterRollbackMockTransformer")
+ .extensions("org.openecomp.mso.bpmn.mock.VnfAdapterQueryMockTransformer"));
+ //.withRootDirectory(path));
+ //Mocks were failing - commenting out for now, both mock and transformers seem to work fine
+ WireMock.configureFor("localhost", portNumber);
+ wireMockServer.start();
+// StubResponse.setupAllMocks();
+ started= true;
+ }
+
+ public static void main(String [] args) {
+ MockResource mockresource = new MockResource();
+ mockresource.start(28090);
+ mockresource.reset();
+// mockresource.setupStub("MockCreateTenant");
+ }
+
+ /**
+ * Starts the wiremock server in default port
+ * @return
+ */
+ @GET
+ @Path("/start")
+ @Produces("application/json")
+ public Response start() {
+ return startMockServer(defaultPort);
+ }
+
+ private Response startMockServer(int port) {
+ if (!started) {
+ initMockServer(defaultPort);
+ System.out.println("Started Mock Server in port " + port);
+ return Response.status(200).entity("Started Mock Server in port " + port).build();
+ } else {
+ return Response.status(200).entity("Mock Server is already running").build();
+ }
+ }
+
+ /**
+ * Starts the wiremock server in a different port
+ * @param portNumber
+ * @return
+ */
+ @GET
+ @Path("/start/{portNumber}")
+ @Produces("application/json")
+ public Response start(@PathParam("portNumber") Integer portNumber) {
+ if (portNumber == null) portNumber = defaultPort;
+ return startMockServer(portNumber.intValue());
+ }
+
+
+ /**
+ * Stop the wiremock server
+ * @return
+ */
+ @GET
+ @Path("/stop")
+ @Produces("application/json")
+ public synchronized Response stop() {
+ if (wireMockServer.isRunning()) {
+ wireMockServer.stop();
+ started = false;
+ return Response.status(200).entity("Stopped Mock Server in port ").build();
+ }
+ return Response.status(200).entity("Mock Server is not running").build();
+ }
+
+
+ /**
+ * Return list of mock properties
+ * @return
+ */
+ @GET
+ @Path("/properties")
+ @Produces("application/json")
+ public Response getProperties() {
+ return Response.status(200).entity(mockProperties).build();
+ }
+
+ /**
+ * Update a particular mock property at run-time
+ * @param name
+ * @param value
+ * @return
+ */
+ @POST
+ @Path("/properties/{name}/{value}")
+ public Response updateProperties(@PathParam("name") String name, @PathParam("value") String value) {
+ if (mockProperties.size() > 50) return Response.serverError().build();
+ mockProperties.put(name, value);
+ return Response.status(200).build();
+ }
+
+ /**
+ * Reset all stubs
+ * @return
+ */
+ @GET
+ @Path("/reset")
+ @Produces("application/json")
+ public Response reset() {
+ WireMock.reset();
+ return Response.status(200).entity("Wiremock stubs are reset").build();
+ }
+
+
+ /**
+ * Setup a stub selectively
+ * Prior to use, make sure that stub method is available in StubResponse class
+ * @param methodName
+ * @return
+ */
+
+ // commenting for now until we figure out a way to use new StubResponse classes to setupStubs
+// @GET
+// @Path("/stub/{methodName}")
+// @Produces("application/json")
+// public Response setupStub(@PathParam("methodName") String methodName) {
+//
+// @SuppressWarnings("rawtypes")
+// Class params[] = {};
+// Object paramsObj[] = {};
+//
+// try {
+// Method thisMethod = StubResponse.class.getDeclaredMethod(methodName, params);
+// try {
+// thisMethod.invoke(StubResponse.class, paramsObj);
+// } catch (IllegalAccessException | IllegalArgumentException
+// | InvocationTargetException e) {
+// return Response.status(200).entity("Error invoking " + methodName ).build();
+// }
+// } catch (NoSuchMethodException | SecurityException e) {
+// return Response.status(200).entity("Stub " + methodName + " not found...").build();
+// }
+// return Response.status(200).entity("Successfully invoked " + methodName).build();
+// }
+
+
+ public static Map<String,String> getMockProperties(){
+ return mockProperties;
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java
new file mode 100644
index 0000000000..8cf947c600
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+/**
+ *
+ * JAX RS Application wiring for Mock Resource
+ */
+@ApplicationPath("/console")
+public class MockResourceApplication extends Application {
+
+ private Set<Object> singletons = new HashSet<Object>();
+ private Set<Class<?>> classes = new HashSet<Class<?>>();
+
+ public MockResourceApplication() {
+ singletons.add(new MockResource());
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return classes;
+ }
+
+ @Override
+ public Set<Object> getSingletons() {
+ return singletons;
+ }
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java
new file mode 100644
index 0000000000..f30c223449
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
+import com.github.tomakehurst.wiremock.common.FileSource;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.http.Request;
+import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+
+/**
+ *
+ * Simulates SDNC Adapter Callback response
+ *
+ */
+public class SDNCAdapterMockTransformer extends ResponseTransformer {
+
+ private String callbackResponse;
+ private String requestId;
+
+ public SDNCAdapterMockTransformer() {
+ callbackResponse = FileUtil.readResourceFile("__files/sdncSimResponse.xml");
+ }
+
+ public SDNCAdapterMockTransformer(String requestId) {
+ this.requestId = requestId;
+ }
+
+ public String name() {
+ return "sdnc-adapter-transformer";
+ }
+
+ /**
+ * Grab the incoming request xml,extract the request id and replace the stub response with the incoming request id
+ * so that callback response can be correlated
+ *
+ * Mock Resource can be used to add dynamic properties. If sdnc_delay is not in the list by default waits for 300ms before
+ * the callback response is sent
+ */
+ @Override
+ public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
+ FileSource fileSource) {
+ String requestBody = request.getBodyAsString();
+
+ String callbackUrl = requestBody.substring(requestBody.indexOf("<sdncadapter:CallbackUrl>")+25, requestBody.indexOf("</sdncadapter:CallbackUrl>"));
+ String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>"));
+
+ callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ System.out.println("callbackResponse:" + callbackResponse);
+
+ if (this.requestId != null) {
+ callbackResponse = callbackResponse.replace(this.requestId, requestId);
+ } else {
+ callbackResponse = callbackResponse.replace("testRequestId", requestId);
+ }
+
+
+ Object sdncDelay = MockResource.getMockProperties().get("sdnc_delay");
+ int delay = 300;
+ if (sdncDelay != null) {
+ delay = Integer.parseInt(sdncDelay.toString());
+ }
+
+ //Kick off callback thread
+ System.out.println("callback Url:" + callbackUrl + ":delay:" + delay);
+ CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay);
+ calbackResponseThread.start();
+
+ //return 200 OK with empty body
+ return ResponseDefinitionBuilder
+ .like(responseDefinition).but()
+ .withStatus(200).withBody("").withHeader("Content-Type", "text/xml")
+ .build();
+ }
+
+ @Override
+ public boolean applyGlobally() {
+ return false;
+ }
+
+ /**
+ *
+ * Callback response thread which sends the callback response asynchronously
+ *
+ */
+ private class CallbackResponseThread extends Thread {
+
+ private String callbackUrl;
+ private String payLoad;
+ private int delay;
+
+ public CallbackResponseThread(String callbackUrl, String payLoad, int delay) {
+ this.callbackUrl = callbackUrl;
+ this.payLoad = payLoad;
+ this.delay = delay;
+ }
+
+ public void run () {
+ try {
+ //Delay sending callback response
+ sleep(delay);
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ System.out.println("Sending callback response:" + callbackUrl);
+ ClientRequest request = new ClientRequest(callbackUrl);
+ request.body("text/xml", payLoad);
+ System.err.println(payLoad);
+ try {
+ ClientResponse result = request.post();
+ //System.err.println("Successfully posted callback:" + result.getStatus());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ }
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
new file mode 100644
index 0000000000..ead12ec755
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
+import com.github.tomakehurst.wiremock.common.FileSource;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.http.Request;
+import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+
+public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseTransformer {
+
+ private String callbackResponse;
+ private String requestId;
+
+ public SDNCAdapterNetworkTopologyMockTransformer() {
+ callbackResponse = ""; // FileUtil.readResourceFile("__files/sdncDeleteNetworkTopologySimResponse.xml");
+ }
+
+ public SDNCAdapterNetworkTopologyMockTransformer(String requestId) {
+ this.requestId = requestId;
+ }
+
+ public String name() {
+ return "network-topology-operation-transformer";
+ }
+
+ @Override
+ public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition, FileSource fileSource) {
+ String requestBody = request.getBodyAsString();
+
+ String callbackUrl = requestBody.substring(requestBody.indexOf("<sdncadapter:CallbackUrl>")+25, requestBody.indexOf("</sdncadapter:CallbackUrl>"));
+ String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>"));
+ System.out.println("request callbackUrl : " + callbackUrl);
+ System.out.println("request requestId : " + requestId);
+
+ System.out.println("file path/name : " + responseDefinition.getBodyFileName());
+ callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ // extract Response responseRequestId
+ String responseRequestId = callbackResponse.substring(callbackResponse.indexOf("<RequestId>")+11, callbackResponse.indexOf("</RequestId>"));
+ System.out.println("response requestId: " + responseRequestId);
+ System.out.println("callbackResponse (before): " + callbackResponse);
+ callbackResponse = callbackResponse.replace(responseRequestId, requestId);
+ if (this.requestId != null) {
+ callbackResponse = callbackResponse.replace(this.requestId, requestId);
+ } else {
+ callbackResponse = callbackResponse.replace(responseRequestId, requestId);
+ }
+ System.out.println("callbackResponse (after):" + callbackResponse);
+
+ Object sdncDelay = MockResource.getMockProperties().get("sdnc_delay");
+ int delay = 300;
+ if (sdncDelay != null) {
+ delay = Integer.parseInt(sdncDelay.toString());
+ }
+
+ //Kick off callback thread
+ System.out.println("(NetworkTopologyMockTransformer) callback Url:" + callbackUrl + ":delay:" + delay);
+ CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay);
+ calbackResponseThread.start();
+
+ //return 200 OK with body
+ return ResponseDefinitionBuilder
+ .like(responseDefinition).but()
+ .withStatus(200).withBody(callbackResponse).withHeader("Content-Type", "text/xml")
+ .build();
+ }
+
+ @Override
+ public boolean applyGlobally() {
+ return false;
+ }
+
+ private class CallbackResponseThread extends Thread {
+
+ private String callbackUrl;
+ private String payLoad;
+ private int delay;
+
+ public CallbackResponseThread(String callbackUrl, String payLoad, int delay) {
+ this.callbackUrl = callbackUrl;
+ this.payLoad = payLoad;
+ this.delay = delay;
+ }
+
+ public void run () {
+ try {
+ //Delay sending callback response
+ sleep(delay);
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ System.out.println("Sending callback response to url: " + callbackUrl);
+ ClientRequest request = new ClientRequest(callbackUrl);
+ request.body("text/xml", payLoad);
+ //System.err.println(payLoad);
+ try {
+ ClientResponse result = request.post();
+ System.out.println("Successfully posted callback? Status: " + result.getStatus());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ System.out.println("catch error in - request.post() ");
+ e.printStackTrace();
+ }
+ }
+
+ }
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseAAI.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseAAI.java
new file mode 100644
index 0000000000..07bde0accb
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseAAI.java
@@ -0,0 +1,787 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+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.urlEqualTo;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+/**
+ * Reusable Mock StubResponses for AAI Endpoints
+ *
+ */
+public class StubResponseAAI {
+
+ public static void setupAllMocks() {
+
+ }
+
+
+ /**
+ * Tunnel-XConnect Mock Stub Response
+ */
+ public static void MockPutTunnelXConnect(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId, String tunnelId){
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId + "/tunnel-xconnects/tunnel-xconnect/" + tunnelId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+
+ /**
+ * Allotted Resource Mock StubResponses below
+ */
+ public static void MockPutAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockPutAllottedResource_500(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+
+ /**
+ * Service Instance Mock StubResponses below
+ */
+ public static void MockGetServiceInstance(String globalCustId, String subscriptionType, String serviceInstanceId, String responseFile) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetServiceInstance_404(String customer, String serviceSubscription, String serviceInstanceId){
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+
+ public static void MockGetServiceInstance_500(String customer, String serviceSubscription, String serviceInstanceId){
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockGetServiceInstance_500(String customer, String serviceSubscription, String serviceInstanceId, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockNodeQueryServiceInstanceByName(String serviceInstanceName, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/nodes-query[?]search-node-type=service-instance[&]filter=service-instance-name:EQUALS:" + serviceInstanceName))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockNodeQueryServiceInstanceByName_404(String serviceInstanceName){
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/nodes-query[?]search-node-type=service-instance&filter=service-instance-name:EQUALS:" + serviceInstanceName))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+
+ public static void MockNodeQueryServiceInstanceByName_500(String serviceInstanceName){
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/nodes-query[?]search-node-type=service-instance&filter=service-instance-name:EQUALS:" + serviceInstanceName))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockNodeQueryServiceInstanceById(String serviceInstanceId, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/nodes-query[?]search-node-type=service-instance[&]filter=service-instance-id:EQUALS:" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockNodeQueryServiceInstanceById_404(String serviceInstanceId){
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/nodes-query[?]search-node-type=service-instance&filter=service-instance-id:EQUALS:" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+
+ public static void MockNodeQueryServiceInstanceById_500(String serviceInstanceId){
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/nodes-query[?]search-node-type=service-instance&filter=service-instance-id:EQUALS:" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockDeleteServiceInstance(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(204)));
+ }
+
+ public static void MockGetServiceInstance(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion, int statusCode){
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockGetServiceInstance(String customer, String serviceSubscription, String resourceVersion, int statusCode){
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")));
+ }
+
+ public static void MockDeleteServiceInstance(String customer, String serviceSubscription, String resourceVersion, int statusCode){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "[?]resource-version=" +1234))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockDeleteServiceInstance_404(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+
+ public static void MockDeleteServiceInstance_500(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockPutServiceInstance(String globalCustId, String subscriptionType, String serviceInstanceId, String responseFile) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockPutServiceInstance_500(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))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+
+ /**
+ * Service-Subscription Mock StubResponses below
+ */
+ public static void MockGetServiceSubscription(String globalCustId, String subscriptionType, String responseFile) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockDeleteServiceSubscription(String globalCustId, String subscriptionType, int statusCode) {
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockDeleteServiceInstanceId(String globalCustId, String subscriptionType, String serviceInstanceId) {
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockPutServiceSubscription(String globalCustId, String subscriptionType) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockGetServiceSubscription(String globalCustId, String subscriptionType, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ /**
+ * Customer Mock StubResponses below
+ */
+ public static void MockGetCustomer(String globalCustId, String responseFile) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockDeleteCustomer(String globalCustId) {
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockPutCustomer(String globalCustId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockPutCustomer_500(String globalCustId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+
+ /**
+ * Generic-Vnf Mock StubResponses below
+ */
+ public static void MockGetGenericVnfById(String vnfId, String responseFile, int statusCode){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetGenericVnfByIdWithPriority(String vnfId, int statusCode, String responseFile) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId))
+ .atPriority(1)
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetGenericVnfByIdWithPriority(String vnfId, String vfModuleId, int statusCode, String responseFile, int priority) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId))
+ .atPriority(priority)
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetGenericVnfByIdWithDepth(String vnfId, int depth, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "[?]depth=" + depth))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetGenericVnfById_404(String vnfId){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+
+ public static void MockGetGenericVnfById_500(String vnfId){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockGetGenericVnfByName(String vnfName, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=" + vnfName))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetGenericVnfByNameWithDepth(String vnfName, int depth, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=" + vnfName + "[&]depth=" + depth))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetGenericVnfByName_404(String vnfName){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=" + vnfName))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+
+ public static void MockDeleteGenericVnf(String vnfId, String resourceVersion){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(204)));
+ }
+
+ public static void MockDeleteGenericVnf(String vnfId, String resourceVersion, int statusCode){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockDeleteGenericVnf_500(String vnfId, String resourceVersion){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockPutGenericVnf(String vnfId){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockPutGenericVnf(String vnfId, String requestBodyContaining, int statusCode) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId))
+ .withRequestBody(containing(requestBodyContaining))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockPutGenericVnf(String vnfId, int statusCode) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockPutGenericVnf_Bad(String vnfId, int statusCode){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockPatchGenericVnf(String vnfId){
+ stubFor(patch(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+ /**
+ * Vce Mock StubResponses below
+ */
+ public static void MockGetVceById(String vnfId, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/vces/vce/" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetVceByName(String vnfName, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/vces/vce[?]vnf-name=" + vnfName))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockDeleteVce(String vnfId, String resourceVersion, int statusCode){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/vces/vce/" + vnfId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void MockPutVce(String vnfId){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/vces/vce/" + vnfId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockGetGenericVceByNameWithDepth(String vnfName, int depth, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/vces/vce[?]vnf-name=" + vnfName + "[&]depth=" + depth))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetVceGenericQuery(String serviceInstanceName, int depth, int statusCode, String responseFile){
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/generic-query[?]key=service-instance.service-instance-name:" + serviceInstanceName + "[&]start-node-type=service-instance[&]include=vce[&]depth=" + depth))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ /**
+ * Tenant Mock StubResponses below
+ */
+ public static void MockGetTenantGenericQuery(String customer, String serviceType, String responseFile) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/search/generic-query[?]key=customer.global-customer-id:" + customer + "&key=service-subscription.service-type:" + serviceType + "&start-node-type=service-subscription&include=tenant&include=service-subscription&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetTenant(String tenantId, String responseFile) {
+ stubFor(get(urlEqualTo("/aai/v2/cloud-infrastructure/tenants/tenant/" + tenantId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ /**
+ * Network Mock StubResponses below
+ */
+ public static void MockGetNetwork(String networkId, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockPutNetwork(String networkId, int statusCode, String responseFile) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockPutNetwork(String networkPolicyId, String responseFile, int statusCode) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/" + networkPolicyId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetNetworkName(String networkPolicyName, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network[?]network-name=" + networkPolicyName))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetNetworkVpnBinding(String networkBindingId, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/vpn-bindings/vpn-binding/" + networkBindingId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetNetworkPolicy(String networkPolicy, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/" + networkPolicy))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetNetworkPolicyfqdn(String networkPolicy, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy[?]network-policy-fqdn=" + networkPolicy))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetNetworkRouteTable(String networkRouteId, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/route-table-references/route-table-reference/" + networkRouteId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockPatchVfModuleId(String vnfId, String vfModuleId) {
+ stubFor(patch(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+
+ /**
+ * Cloud infrastructure below
+ */
+
+ public static void MockGetCloudRegion(String cloudRegionId, int statusCode, String responseFile) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ /**
+ * Volume Group StubResponse below
+ */
+ public static void MockGetVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockPutVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile, int statusCode) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetVolumeGroupByName(String cloudRegionId, String volumeGroupName, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups[?]volume-group-name=" + volumeGroupName))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockDeleteVolumeGroupById(String cloudRegionId, String volumeGroupId, String resourceVersion, int statusCode) {
+ stubFor(delete(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId + "[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ /**
+ * VF-Module StubResponse below
+ * @param statusCode TODO
+ */
+ public static void MockGetVfModuleId(String vnfId, String vfModuleId, String responseFile, int statusCode) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetVfModuleIdNoResponse(String vnfId, String requestContaining, String vfModuleId) {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")));
+ }
+
+ public static void MockPutVfModuleIdNoResponse(String vnfId, String requestContaining, String vfModuleId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId +"/vf-modules/vf-module/" +vfModuleId))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockPutVfModuleId(String vnfId, String vfModuleId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockPutVfModuleId(String vnfId, String vfModuleId, int returnCode) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(returnCode)));
+ }
+
+ public static void MockDeleteVfModuleId(String vnfId, String vfModuleId, String resourceVersion, int returnCode) {
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId + "/[?]resource-version=" + resourceVersion))
+ .willReturn(aResponse()
+ .withStatus(returnCode)));
+ }
+
+ //// Deprecated Stubs below - to be deleted once unit test that reference them are refactored to use common ones above ////
+ @Deprecated
+ public static void MockGetVceById(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/vces/vce/testVnfId123?depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getVceResponse.xml")));
+ }
+ @Deprecated
+ public static void MockGetVceByName(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/vces/vce[?]vnf-name=testVnfName123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getVceByNameResponse.xml")));
+ }
+ @Deprecated
+ public static void MockPutVce(){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/vces/vce/testVnfId123"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+ @Deprecated
+ public static void MockDeleteVce(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/vces/vce/testVnfId123[?]resource-version=testReVer123"))
+ .willReturn(aResponse()
+ .withStatus(204)));
+ }
+ @Deprecated
+ public static void MockDeleteVce_404(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/vces/vce/testVnfId123[?]resource-version=testReVer123"))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+
+ @Deprecated
+ public static void MockDeleteServiceSubscription(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET[?]resource-version=1234"))
+ .willReturn(aResponse()
+ .withStatus(204)));
+ }
+ @Deprecated
+ public static void MockGetServiceSubscription(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getServiceSubscription.xml")));
+ }
+ @Deprecated
+ public static void MockGetServiceSubscription_200Empty(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET[?]resource-version=1234"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(" ")));
+ }
+ @Deprecated
+ public static void MockGetServiceSubscription_404() {
+ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET"))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+ @Deprecated
+ public static void MockGENPSIPutServiceInstance(){
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml")));
+ }
+
+ @Deprecated
+ public static void MockGENPSIPutServiceSubscription(){
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml")));
+ }
+ @Deprecated
+ public static void MockGENPSIPutServiceInstance_get500(){
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericPutServiceInstance/aaiFault.xml")));
+ }
+
+ @Deprecated
+ public static void MockGetGenericVnfById(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfByNameResponse.xml")));
+ }
+ @Deprecated
+ public static void MockGetGenericVnfById_404(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123"))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+ @Deprecated
+ public static void MockGetGenericVnfByName(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=testVnfName123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfResponse.xml")));
+ }
+ @Deprecated
+ public static void MockGetGenericVnfByName_hasRelationships(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=testVnfName123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfResponse_hasRelationships.xml")));
+ }
+ @Deprecated
+ public static void MockGetGenericVnfById_hasRelationships(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfResponse_hasRelationships.xml")));
+ }
+ @Deprecated
+ public static void MockGetGenericVnfById_500(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+ @Deprecated
+ public static void MockGetGenericVnfByName_404(){
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=testVnfName123"))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+ @Deprecated
+ public static void MockPutGenericVnf(){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+ @Deprecated
+ public static void MockPutGenericVnf_400(){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123"))
+ .willReturn(aResponse()
+ .withStatus(400)));
+ }
+ @Deprecated
+ public static void MockDeleteGenericVnf(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123[?]resource-version=testReVer123"))
+ .willReturn(aResponse()
+ .withStatus(204)));
+ }
+ @Deprecated
+ public static void MockDeleteGenericVnf_404(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123[?]resource-version=testReVer123"))
+ .willReturn(aResponse()
+ .withStatus(404)));
+ }
+ @Deprecated
+ public static void MockDeleteGenericVnf_500(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123[?]resource-version=testReVer123"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+ @Deprecated
+ public static void MockDeleteGenericVnf_412(){
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/testVnfId123[[?]]resource-version=testReVer123"))
+ .willReturn(aResponse()
+ .withStatus(412)));
+ }
+
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
new file mode 100644
index 0000000000..7eefa4bc39
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
@@ -0,0 +1,65 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+
+/**
+ * Stub response class for Database stubs
+ * including database adapter, catalog db,
+ * and other databases.
+ */
+public class StubResponseDatabase {
+
+ public static void setupAllMocks() {
+
+ }
+
+ public static void mockUpdateRequestDB(int statusCode, String reponseFile) {
+ stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(reponseFile)));
+ }
+
+ public static void MockGetAllottedResourcesByModelInvariantId(String modelInvariantId, String responseFile){
+ stubFor(get(urlEqualTo("/v1/serviceAllottedResources?serviceModelInvariantUuid=" + modelInvariantId))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/json")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockGetAllottedResourcesByModelInvariantId_500(String modelInvariantId, String responseFile){
+ stubFor(get(urlEqualTo("/v1/serviceAllottedResources?serviceModelInvariantUuid=" + modelInvariantId))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseNetworkAdapter.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseNetworkAdapter.java
new file mode 100644
index 0000000000..c81578a998
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseNetworkAdapter.java
@@ -0,0 +1,93 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+
+/**
+ * Please describe the StubResponseNetwork.java class
+ *
+ */
+public class StubResponseNetworkAdapter {
+
+ private static final String EOL = "\n";
+
+ public static void setupAllMocks() {
+
+ }
+
+
+ public static void MockNetworkAdapter() {
+ stubFor(post(urlEqualTo("/networks/NetworkAdapter"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockNetworkAdapter(String response) {
+ stubFor(post(urlEqualTo("/networks/NetworkAdapter"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(response)));
+ }
+
+ public static void MockNetworkAdapter_500() {
+ stubFor(post(urlEqualTo("/networks/NetworkAdapter"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockNetworkAdapter(String networkId, int statusCode, String responseFile) {
+ stubFor(delete(urlEqualTo("/networks/NetworkAdapter/" + networkId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockNetworkAdapterContainingRequest(String requestContaining, int statusCode, String responseFile) {
+ stubFor(post(urlEqualTo("/networks/NetworkAdapter"))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void MockPutNetworkAdapter(String networkId, String requestContaining, int statusCode, String responseFile) {
+ stubFor(put(urlEqualTo("/networks/NetworkAdapter/" + networkId))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSDNCAdapter.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSDNCAdapter.java
new file mode 100644
index 0000000000..8e4b789366
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSDNCAdapter.java
@@ -0,0 +1,138 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+
+/**
+ * Please describe the StubResponseSDNC.java class
+ */
+public class StubResponseSDNCAdapter {
+
+ public static void setupAllMocks() {
+
+ }
+
+ public static void mockSDNCAdapter(int statusCode) {
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)));
+ }
+
+ public static void mockSDNCAdapter(String endpoint, int statusCode, String responseFile) {
+ stubFor(post(urlEqualTo(endpoint))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockSDNCAdapter(String responseFile) {
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockSDNCAdapter(String endpoint, String requestContaining, int statusCode, String responseFile) {
+ stubFor(post(urlEqualTo(endpoint))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockSDNCAdapterSimulator(String responseFile) {
+ MockResource mockResource = new MockResource();
+ mockResource.updateProperties("sdnc_delay", "300");
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/soap+xml")
+ .withTransformers("sdnc-adapter-transformer")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockSDNCAdapterSimulator(String responseFile, String requestContaining) {
+ MockResource mockResource = new MockResource();
+ mockResource.updateProperties("sdnc_delay", "300");
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/soap+xml")
+ .withTransformers("sdnc-adapter-transformer")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockSDNCAdapterRest() {
+ stubFor(post(urlEqualTo("/SDNCAdapter/v1/sdnc/services"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/json")));
+ }
+
+ public static void mockSDNCAdapterRest_500() {
+ stubFor(post(urlEqualTo("/SDNCAdapter/v1/sdnc/services"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "application/json")));
+ }
+
+ public static void mockSDNCAdapterRest(String requestContaining) {
+ stubFor(post(urlEqualTo("/SDNCAdapter/v1/sdnc/services"))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/json")));
+ }
+
+ public static void mockSDNCAdapterRest_500(String requestContaining) {
+ stubFor(post(urlEqualTo("/SDNCAdapter/v1/sdnc/services"))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "application/json")));
+ }
+
+ public static void mockSDNCAdapterTopology(String responseFile, String requestContaining) {
+ MockResource mockResource = new MockResource();
+ mockResource.updateProperties("sdnc_delay", "300");
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withTransformers("network-topology-operation-transformer")
+ .withBodyFile(responseFile)));
+ }
+
+
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java
new file mode 100644
index 0000000000..7951a48184
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java
@@ -0,0 +1,130 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+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.urlEqualTo;
+
+/**
+ * Please describe the StubResponseVNF.java class
+ */
+public class StubResponseVNFAdapter {
+
+ public static void mockVNFAdapter() {
+ stubFor(post(urlEqualTo("/vnfs/VnfAdapterAsync"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void mockVNFAdapter(String responseFile) {
+ stubFor(post(urlEqualTo("/vnfs/VnfAdapterAsync"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockVNFAdapter_500() {
+ stubFor(post(urlEqualTo("/vnfs/VnfAdapterAsync"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void mockVNFAdapterTransformer(String transformer, String responseFile) {
+ MockResource mockResource = new MockResource();
+ mockResource.updateProperties("vnf_delay", "300");
+ stubFor(post(urlEqualTo("/vnfs/VnfAdapterAsync"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/soap+xml")
+ .withTransformers(transformer)
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockVNFAdapterTransformer(String transformer, String responseFile, String requestContaining) {
+ MockResource mockResource = new MockResource();
+ mockResource.updateProperties("vnf_delay", "300");
+ stubFor(post(urlEqualTo("/vnfs/VnfAdapterAsync"))
+ .withRequestBody(containing(requestContaining))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/soap+xml")
+ .withTransformers(transformer)
+ .withBodyFile(responseFile)));
+ }
+
+ public static void mockVNFPost(String vfModuleId, int statusCode, String vnfId) {
+ stubFor(post(urlEqualTo("/vnfs/v1/vnfs/" + vnfId + "/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void mockVNFPut(String vfModuleId, int statusCode) {
+ stubFor(put(urlEqualTo("/vnfs/v1/vnfs/vnfId/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void mockVNFPut(String vnfId, String vfModuleId, int statusCode) {
+ stubFor(put(urlEqualTo("/vnfs/v1/vnfs/" + vnfId + "/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void mockVNFDelete(String vnfId, String vfModuleId, int statusCode) {
+ stubFor(delete(urlEqualTo("/vnfs/v1/vnfs/" + vnfId + "/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void mockVNFRollbackDelete(String vfModuleId, int statusCode) {
+ stubFor(delete(urlEqualTo("/vnfs/v1/vnfs/vnfId/vf-modules" + vfModuleId + "/rollback"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void mockPutVNFVolumeGroup(String volumeGroupId, int statusCode) {
+ stubFor(put(urlEqualTo("/vnfs/v1/volume-groups/" + volumeGroupId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void mockPostVNFVolumeGroup(int statusCode) {
+ stubFor(post(urlEqualTo("/vnfs/v1/volume-groups"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
+ }
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java
new file mode 100644
index 0000000000..2afe048db4
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java
@@ -0,0 +1,148 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import javax.xml.ws.Endpoint;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
+import com.github.tomakehurst.wiremock.common.FileSource;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.http.Request;
+import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+
+/**
+ * Please describe the VnfAdapterCreateMockTransformer.java class
+ *
+ */
+public class VnfAdapterCreateMockTransformer extends ResponseTransformer {
+
+ private String notifyCallbackResponse;
+ private String ackResponse;
+
+ public VnfAdapterCreateMockTransformer() {
+ notifyCallbackResponse = FileUtil.readResourceFile("__files/vnfAdapterMocks/vnfCreateSimResponse.xml"); // default response
+ }
+
+ @Override
+ public String name() {
+ return "vnf-adapter-create-transformer";
+ }
+
+ @Override
+ public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
+ FileSource fileSource) {
+
+ String requestBody = request.getBodyAsString();
+
+ String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
+ String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>"));
+ String responseMessageId = "";
+ String updatedResponse = "";
+
+ try {
+ // try supplied response file (if any)
+ System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ notifyCallbackResponse = ackResponse;
+ responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
+ updatedResponse = ackResponse.replace(responseMessageId, messageId);
+ } catch (Exception ex) {
+ System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfCreateSimResponse.xml'");
+ responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
+ updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
+ }
+
+ System.out.println("response (mock) messageId : " + responseMessageId);
+ System.out.println("request (replacement) messageId: " + messageId);
+
+ System.out.println("vnf Response (before):" + notifyCallbackResponse);
+ System.out.println("vnf Response (after):" + updatedResponse);
+
+ Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
+ int delay = 300;
+ if (vnfDelay != null) {
+ delay = Integer.parseInt(vnfDelay.toString());
+ }
+
+ //Kick off callback thread
+ System.out.println("VnfAdapterCreateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
+ callbackResponseThread.start();
+
+ return ResponseDefinitionBuilder
+ .like(responseDefinition).but()
+ .withStatus(200).withBody(updatedResponse).withHeader("Content-Type", "text/xml")
+ .build();
+
+ }
+
+ @Override
+ public boolean applyGlobally() {
+ return false;
+ }
+
+ private class CallbackResponseThread extends Thread {
+
+ private String callbackUrl;
+ private String payLoad;
+ private int delay;
+
+ public CallbackResponseThread(String callbackUrl, String payLoad, int delay) {
+ this.callbackUrl = callbackUrl;
+ this.payLoad = payLoad;
+ this.delay = delay;
+ }
+
+ @SuppressWarnings("deprecation")
+ public void run () {
+ try {
+ //Delay sending callback response
+ sleep(delay);
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ System.out.println("Sending callback response to url: " + callbackUrl);
+ ClientRequest request = new ClientRequest(callbackUrl);
+ request.body("text/xml", payLoad);
+ //System.out.println("payLoad: " + payLoad);
+
+ try {
+ ClientResponse result = request.post();
+ System.out.println("Successfully posted callback? Status: " + result.getStatus());
+ //System.err.println("Successfully posted callback:" + result.getStatus());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ System.out.println("catch error in - request.post() ");
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+
+} \ No newline at end of file
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterDeleteMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterDeleteMockTransformer.java
new file mode 100644
index 0000000000..e9b67b78e5
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterDeleteMockTransformer.java
@@ -0,0 +1,146 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
+import com.github.tomakehurst.wiremock.common.FileSource;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.http.Request;
+import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+
+/**
+ * Please describe the VnfAdapterCreateMockTransformer.java class
+ *
+ */
+public class VnfAdapterDeleteMockTransformer extends ResponseTransformer {
+
+
+ private String notifyCallbackResponse;
+ private String ackResponse;
+
+ public VnfAdapterDeleteMockTransformer() {
+ notifyCallbackResponse = FileUtil.readResourceFile("__files/vnfAdapterMocks/vnfDeleteSimResponse.xml");
+ }
+
+ @Override
+ public String name() {
+ return "vnf-adapter-delete-transformer";
+ }
+
+ @Override
+ public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
+ FileSource fileSource) {
+
+ // System.err.println("notifyCallbackResponse:" + notifyCallbackResponse);
+
+ String requestBody = request.getBodyAsString();
+
+ String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
+ String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>"));
+ String responseMessageId = "";
+ String updatedResponse = "";
+
+ try {
+ // try supplied response file (if any)
+ System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ notifyCallbackResponse = ackResponse;
+ responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
+ updatedResponse = ackResponse.replace(responseMessageId, messageId);
+ } catch (Exception ex) {
+ System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'");
+ responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
+ updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
+ }
+
+ System.out.println("response (mock) messageId : " + responseMessageId);
+ System.out.println("request (replacement) messageId: " + messageId);
+
+ System.out.println("vnf Response (before):" + notifyCallbackResponse);
+ System.out.println("vnf Response (after):" + updatedResponse);
+
+ Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
+ int delay = 300;
+ if (vnfDelay != null) {
+ delay = Integer.parseInt(vnfDelay.toString());
+ }
+
+ //Kick off callback thread
+ System.out.println("VnfAdapterDeleteMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
+ callbackResponseThread.start();
+
+ return ResponseDefinitionBuilder
+ .like(responseDefinition).but()
+ .withStatus(200).withBody(updatedResponse).withHeader("Content-Type", "text/xml")
+ .build();
+
+ }
+
+ @Override
+ public boolean applyGlobally() {
+ return false;
+ }
+
+ private class CallbackResponseThread extends Thread {
+
+ private String callbackUrl;
+ private String payLoad;
+ private int delay;
+
+ public CallbackResponseThread(String callbackUrl, String payLoad, int delay) {
+ this.callbackUrl = callbackUrl;
+ this.payLoad = payLoad;
+ this.delay = delay;
+ }
+
+ @SuppressWarnings("deprecation")
+ public void run () {
+ try {
+ //Delay sending callback response
+ sleep(delay);
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ System.out.println("Sending callback response to url: " + callbackUrl);
+ ClientRequest request = new ClientRequest(callbackUrl);
+ request.body("text/xml", payLoad);
+ //System.err.println(payLoad);
+ try {
+ ClientResponse result = request.post();
+ System.out.println("Successfully posted callback? Status: " + result.getStatus());
+ //System.err.println("Successfully posted callback:" + result.getStatus());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ System.out.println("catch error in - request.post() ");
+ e.printStackTrace();
+ }
+ }
+
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterQueryMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterQueryMockTransformer.java
new file mode 100644
index 0000000000..1acd8db723
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterQueryMockTransformer.java
@@ -0,0 +1,160 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
+import com.github.tomakehurst.wiremock.common.FileSource;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.http.Request;
+import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+
+/**
+ * Please describe the VnfAdapterQueryMockTransformer.java class
+ *
+ */
+
+
+public class VnfAdapterQueryMockTransformer extends ResponseTransformer{
+
+ private String notifyCallbackResponse;
+ private String ackResponse;
+ private String messageId;
+
+ public VnfAdapterQueryMockTransformer() {
+ notifyCallbackResponse = FileUtil.readResourceFile("__files/vnfAdapterMocks/vnfQuerySimResponse.xml");
+ }
+
+ public VnfAdapterQueryMockTransformer(String messageId) {
+ this.messageId = messageId;
+ }
+
+ @Override
+ public String name() {
+ return "vnf-adapter-query-transformer";
+ }
+
+ @Override
+ public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
+ FileSource fileSource) {
+
+ String requestBody = request.getBodyAsString();
+
+ String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
+ String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>"));
+ // String updatedResponse = notifyCallbackResponse.replace("b1a82ce6-7f5c-45fd-9273-acaf88fc2137", messageId);
+
+ String responseMessageId = "";
+ String updatedResponse = "";
+
+ // if (ackResponse == null) {
+ //System.err.println("file:" + responseDefinition.getBodyFileName());
+ // ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ //}
+
+
+ try {
+ // try supplied response file (if any)
+ System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ notifyCallbackResponse = ackResponse;
+ responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
+ updatedResponse = ackResponse.replace(responseMessageId, messageId);
+ } catch (Exception ex) {
+ System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'");
+ responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
+ updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
+ }
+
+ System.out.println("response (mock) messageId : " + responseMessageId);
+ System.out.println("request (replacement) messageId: " + messageId);
+
+ System.out.println("vnf Response (before):" + notifyCallbackResponse);
+ System.out.println("vnf Response (after):" + updatedResponse);
+
+
+ Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
+ int delay = 300;
+ if (vnfDelay != null) {
+ delay = Integer.parseInt(vnfDelay.toString());
+ }
+
+ //Kick off callback thread
+
+ //System.out.println("notficationUrl" + notficationUrl);
+ //System.out.println("updatedResponse" + updatedResponse);
+ System.out.println("VnfAdapterQueryMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
+ System.out.println("Inside Callback" );
+ callbackResponseThread.start();
+
+ return ResponseDefinitionBuilder
+ .like(responseDefinition).but()
+ .withStatus(200).withBody(updatedResponse).withHeader("Content-Type", "text/xml")
+ .build();
+ }
+
+ @Override
+ public boolean applyGlobally() {
+ return false;
+ }
+
+ private class CallbackResponseThread extends Thread {
+
+ private String callbackUrl;
+ private String payLoad;
+ private int delay;
+
+ public CallbackResponseThread(String callbackUrl, String payLoad, int delay) {
+ this.callbackUrl = callbackUrl;
+ this.payLoad = payLoad;
+ this.delay = delay;
+ }
+
+ public void run () {
+ try {
+ //Delay sending callback response
+ sleep(delay);
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ ClientRequest request = new ClientRequest(callbackUrl);
+ request.body("text/xml", payLoad);
+ //System.err.println(payLoad);
+ try {
+ ClientResponse result = request.post();
+ //System.err.println("Successfully posted callback:" + result.getStatus());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterRollbackMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterRollbackMockTransformer.java
new file mode 100644
index 0000000000..259d2e3b4b
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterRollbackMockTransformer.java
@@ -0,0 +1,147 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
+import com.github.tomakehurst.wiremock.common.FileSource;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.http.Request;
+import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+
+/**
+ * Please describe the VnfAdapterCreateMockTransformer.java class
+ *
+ */
+public class VnfAdapterRollbackMockTransformer extends ResponseTransformer {
+
+ private String notifyCallbackResponse;
+ private String ackResponse;
+ private String messageId;
+
+ public VnfAdapterRollbackMockTransformer() {
+ notifyCallbackResponse = FileUtil.readResourceFile("__files/vnfAdapterMocks/vnfRollbackSimResponse.xml");
+ }
+
+ public VnfAdapterRollbackMockTransformer(String messageId) {
+ this.messageId = messageId;
+ }
+
+ @Override
+ public String name() {
+ return "vnf-adapter-rollback-transformer";
+ }
+
+ @Override
+ public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
+ FileSource fileSource) {
+
+ String requestBody = request.getBodyAsString();
+
+ String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
+ String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>"));
+ String responseMessageId = "";
+ String updatedResponse = "";
+
+ try {
+ // try supplied response file (if any)
+ System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ notifyCallbackResponse = ackResponse;
+ responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
+ updatedResponse = ackResponse.replace(responseMessageId, messageId);
+ } catch (Exception ex) {
+ System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'");
+ responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
+ updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
+ }
+
+ System.out.println("response (mock) messageId : " + responseMessageId);
+ System.out.println("request (replacement) messageId: " + messageId);
+
+ System.out.println("vnf Response (before):" + notifyCallbackResponse);
+ System.out.println("vnf Response (after):" + updatedResponse);
+
+ Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
+ int delay = 300;
+ if (vnfDelay != null) {
+ delay = Integer.parseInt(vnfDelay.toString());
+ }
+
+ //Kick off callback thread
+ System.out.println("VnfAdapterRollbackMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
+ callbackResponseThread.start();
+
+ return ResponseDefinitionBuilder
+ .like(responseDefinition).but()
+ .withStatus(200).withBody(updatedResponse).withHeader("Content-Type", "text/xml")
+ .build();
+
+ }
+
+ @Override
+ public boolean applyGlobally() {
+ return false;
+ }
+
+ private class CallbackResponseThread extends Thread {
+
+ private String callbackUrl;
+ private String payLoad;
+ private int delay;
+
+ public CallbackResponseThread(String callbackUrl, String payLoad, int delay) {
+ this.callbackUrl = callbackUrl;
+ this.payLoad = payLoad;
+ this.delay = delay;
+ }
+
+ public void run () {
+ try {
+ //Delay sending callback response
+ sleep(delay);
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ System.out.println("Sending callback response to url: " + callbackUrl);
+ ClientRequest request = new ClientRequest(callbackUrl);
+ request.body("text/xml", payLoad);
+ //System.err.println(payLoad);
+ try {
+ ClientResponse result = request.post();
+ System.out.println("Successfully posted callback? Status: " + result.getStatus());
+ //System.err.println("Successfully posted callback:" + result.getStatus());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ System.out.println("catch error in - request.post() ");
+ e.printStackTrace();
+ }
+ }
+
+ }
+}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterUpdateMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterUpdateMockTransformer.java
new file mode 100644
index 0000000000..d720b2410b
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterUpdateMockTransformer.java
@@ -0,0 +1,148 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.mock;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
+import com.github.tomakehurst.wiremock.common.FileSource;
+import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
+import com.github.tomakehurst.wiremock.http.Request;
+import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+
+/**
+ * Please describe the VnfAdapterUpdateMockTransformer.java class
+ *
+ */
+public class VnfAdapterUpdateMockTransformer extends ResponseTransformer {
+
+ private String notifyCallbackResponse;
+ private String requestId;
+ private String ackResponse;
+
+ public VnfAdapterUpdateMockTransformer() {
+ notifyCallbackResponse = FileUtil.readResourceFile("vnfAdapter/vnfUpdateSimResponse.xml");
+ }
+
+ public VnfAdapterUpdateMockTransformer(String requestId) {
+ this.requestId = requestId;
+ }
+
+
+ public String name() {
+ return "vnf-adapter-update-transformer";
+ }
+
+ @Override
+ public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
+ FileSource fileSource) {
+
+ String requestBody = request.getBodyAsString();
+
+ String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
+ String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>"));
+ String responseMessageId = "";
+ String updatedResponse = "";
+
+ try {
+ // try supplied response file (if any)
+ System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
+ notifyCallbackResponse = ackResponse;
+ responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
+ updatedResponse = ackResponse.replace(responseMessageId, messageId);
+ } catch (Exception ex) {
+ System.out.println(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'");
+ responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
+ updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
+ }
+
+ System.out.println("response (mock) messageId : " + responseMessageId);
+ System.out.println("request (replacement) messageId: " + messageId);
+
+ System.out.println("vnf Response (before):" + notifyCallbackResponse);
+ System.out.println("vnf Response (after):" + updatedResponse);
+
+ Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
+ int delay = 300;
+ if (vnfDelay != null) {
+ delay = Integer.parseInt(vnfDelay.toString());
+ }
+
+ //Kick off callback thread
+ System.out.println("VnfAdapterUpdateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
+ callbackResponseThread.start();
+
+ return ResponseDefinitionBuilder
+ .like(responseDefinition).but()
+ .withStatus(200).withBody(updatedResponse).withHeader("Content-Type", "text/xml")
+ .build();
+
+ }
+
+ @Override
+ public boolean applyGlobally() {
+ return false;
+ }
+
+ private class CallbackResponseThread extends Thread {
+
+ private String callbackUrl;
+ private String payLoad;
+ private int delay;
+
+ public CallbackResponseThread(String callbackUrl, String payLoad, int delay) {
+ this.callbackUrl = callbackUrl;
+ this.payLoad = payLoad;
+ this.delay = delay;
+ }
+
+ public void run () {
+ try {
+ //Delay sending callback response
+ sleep(delay);
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ System.out.println("Sending callback response to url: " + callbackUrl);
+ ClientRequest request = new ClientRequest(callbackUrl);
+ request.body("text/xml", payLoad);
+ //System.err.println(payLoad);
+ try {
+ ClientResponse result = request.post();
+ System.out.println("Successfully posted callback? Status: " + result.getStatus());
+ //System.err.println("Successfully posted callback:" + result.getStatus());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ System.out.println("catch error in - request.post() ");
+ e.printStackTrace();
+ }
+ }
+
+ }
+}
+
diff --git a/bpmn/MSOMockServer/src/main/resources/__files/sdncSimResponse.xml b/bpmn/MSOMockServer/src/main/resources/__files/sdncSimResponse.xml
new file mode 100644
index 0000000000..bef293dfde
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/resources/__files/sdncSimResponse.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://domain2.openecomp.org/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest
+ xmlns="http://domain2.openecomp.org/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>d325c9a7-84c0-4081-b979-9cc773a0976d</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;layer3-service-list
+ xmlns="com:att:sdnctl:l3api"&gt;&lt;service-instance-id&gt;0XX/VXXX/003717//Shakeout&lt;/service-instance-id&gt;&lt;service-status&gt;&lt;rpc-name&gt;svc-topology-operation&lt;/rpc-name&gt;&lt;rpc-action&gt;delete&lt;/rpc-action&gt;&lt;request-status&gt;synccomplete&lt;/request-status&gt;&lt;final-indicator&gt;Y&lt;/final-indicator&gt;&lt;l3sdn-action&gt;DisconnectLayer3ServiceRequest&lt;/l3sdn-action&gt;&lt;response-timestamp&gt;2015-10-22T02:11:52.010Z&lt;/response-timestamp&gt;&lt;/service-status&gt;&lt;service-data&gt;&lt;svc-config-additional-data/&gt;&lt;/service-data&gt;&lt;/layer3-service-list&gt;
+ </RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/MSOMockServer/src/main/webapp/WEB-INF/jboss-web.xml b/bpmn/MSOMockServer/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000000..cca27bb062
--- /dev/null
+++ b/bpmn/MSOMockServer/src/main/webapp/WEB-INF/jboss-web.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+<jboss-web>
+ <security-domain>other</security-domain>
+ <context-root>/msomock</context-root>
+</jboss-web> \ No newline at end of file
diff --git a/bpmn/MSORESTClient/pom.xml b/bpmn/MSORESTClient/pom.xml
index 3c2ea83bb6..2c899084f8 100644
--- a/bpmn/MSORESTClient/pom.xml
+++ b/bpmn/MSORESTClient/pom.xml
@@ -1,59 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>bpmn</artifactId>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
<version>1.1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.openecomp.mso</groupId>
- <artifactId>MSORESTClient</artifactId>
-
- <packaging>jar</packaging>
-
- <name>MSO REST Client API</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- <version>4.5</version>
- </dependency>
- <dependency>
- <groupId>com.metaparadigm</groupId>
- <artifactId>json-rpc</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.10.19</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <finalName>MSORESTClient</finalName>
- <plugins>
- <!-- <plugin>
- </plugin> -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- </plugins>
-
- </build>
-</project>
+ </parent>
+
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>MSORESTClient</artifactId>
+
+ <packaging>jar</packaging>
+
+ <name>MSO REST Client API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.evosuite</groupId>
+ <artifactId>evosuite-standalone-runtime</artifactId>
+ <version>${evosuiteVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ <version>4.5</version>
+ </dependency>
+ <dependency>
+ <groupId>com.metaparadigm</groupId>
+ <artifactId>json-rpc</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.10.19</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <finalName>MSORESTClient</finalName>
+ <plugins>
+
+ </plugins>
+
+ </build>
+</project>
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
index dfb9f36e9a..ea9ca62bf5 100644
--- a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
@@ -21,6 +21,7 @@
package org.openecomp.mso.rest;
import java.io.IOException;
+import java.util.Arrays;
import org.apache.http.Header;
import org.apache.http.HttpResponse;
@@ -44,7 +45,7 @@ public class APIResponse {
* @param httpResponse used to create headers
* @return http headers
*/
- private HttpHeader[] buildHeaders(final HttpResponse httpResponse) {
+ private static HttpHeader[] buildHeaders(final HttpResponse httpResponse) {
final Header[] headers = httpResponse.getAllHeaders();
HttpHeader[] httpHeaders = new HttpHeader[headers.length];
@@ -102,7 +103,12 @@ public class APIResponse {
* @return http response body
*/
public byte[] getResponseBodyAsByteArray() {
- return this.responseBody;
+ // avoid exposing internals, create copy
+ if (this.responseBody != null) {
+ return Arrays.copyOf(this.responseBody, this.responseBody.length);
+ } else {
+ return null;
+ }
}
/**
@@ -125,11 +131,7 @@ public class APIResponse {
*/
public HttpHeader[] getAllHeaders() {
// avoid exposing internals, create copy
- HttpHeader[] copy = new HttpHeader[this.headers.length];
- for (int i = 0; i < this.headers.length; ++i) {
- copy[i] = headers[i];
- }
- return copy;
+ return Arrays.copyOf(this.headers, this.headers.length);
}
public String getFirstHeader(String name) {
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
index 5c200046ca..cab3e5082e 100644
--- a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
@@ -91,7 +91,6 @@ public class RESTClient {
private final LinkedHashMap<String, List<String>> parameters;
private HttpEntity httpEntity;
- private HttpClient unitTestClient;
/**
* Internal method used to build an APIResponse using the specified
@@ -583,13 +582,6 @@ public class RESTClient {
return httpEntity;
}
- public HttpClient getUnitTestClient() {
- return unitTestClient;
- }
-
- public void setUnitTestClient(HttpClient unitTestClient) {
- this.unitTestClient = unitTestClient;
- }
/**
* Allows inclusion of a request body with DELETE.
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
index 87a3f47cfe..e44a44d118 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
@@ -3,6 +3,26 @@
* Mon Nov 14 11:46:25 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.junit.Test;
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java
index 59f09a0bc9..80915d74cf 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java
@@ -4,6 +4,26 @@
* Mon Nov 14 11:46:25 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
index 21043496db..f0aeee0f99 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
@@ -3,6 +3,26 @@
* Mon Nov 14 11:47:07 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.junit.Test;
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
index e59f7da9fb..0438c1fba6 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
@@ -4,6 +4,26 @@
* Mon Nov 14 11:47:07 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java
deleted file mode 100644
index 1a9e05abd0..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java
+++ /dev/null
@@ -1,1068 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:49:09 GMT 2016
- */
-
-package org.openecomp.mso.rest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.MockitoExtension.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import java.io.InputStream;
-import java.util.LinkedHashMap;
-import java.util.List;
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.StatusLine;
-import org.apache.http.client.HttpClient;
-import org.apache.http.entity.InputStreamEntity;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class RESTClientESTest extends RESTClientESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException");
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(httpClient0).toString();
- doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
- rESTClient0.setUnitTestClient(httpClient0);
- // Undeclared exception!
- try {
- rESTClient0.patch("<;xR");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.rest.APIResponse", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(rESTConfig0).getProxyHost();
- doReturn(0).when(rESTConfig0).getProxyPort();
- doReturn((String) null).when(rESTConfig0).getURL();
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(httpClient0).toString();
- rESTClient0.setUnitTestClient(httpClient0);
- HttpClient httpClient1 = rESTClient0.getUnitTestClient();
- assertSame(httpClient1, httpClient0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- RESTClient rESTClient0 = new RESTClient((String) null, "Jhhlq!Y8o>CaA", (-3767));
- String string0 = rESTClient0.getURL();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("", "=&http.request_sent=http.request_sent", 783, true);
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- String string0 = rESTClient0.getURL();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("http");
- RESTClient rESTClient1 = rESTClient0.setParameter("http", "http");
- LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getParameters();
- assertEquals(1, linkedHashMap0.size());
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
- RESTClient rESTClient1 = rESTClient0.setHeader(",%LX:SC+'3!nt", ",[o<:aGQK");
- LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getHeaders();
- assertEquals(1, linkedHashMap0.size());
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
- InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0);
- StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
- doReturn(0).when(statusLine0).getStatusCode();
- HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
- doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity();
- doReturn(statusLine0).when(httpResponse0).getStatusLine();
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn("Q[z^W").when(httpClient0).toString();
- doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
- rESTClient0.setUnitTestClient(httpClient0);
- HttpClient httpClient1 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- // Undeclared exception!
- try {
- rESTClient0.post();
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Entity may not be null
- //
- verifyException("org.apache.http.util.Args", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- RESTClient rESTClient1 = rESTClient0.setParameter((String) null, "7%d/ia+s(I~@<PK");
- // Undeclared exception!
- try {
- rESTClient1.post();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(rESTConfig0).getProxyHost();
- doReturn(0).when(rESTConfig0).getProxyPort();
- doReturn((String) null).when(rESTConfig0).getURL();
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- // Undeclared exception!
- try {
- rESTClient0.post();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- }
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("UTF-8");
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- RESTClient rESTClient1 = rESTClient0.addParameter((String) null, "");
- // Undeclared exception!
- try {
- rESTClient1.patch("DELETE");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("!{usNmLQ_Gt.C_98");
- // Undeclared exception!
- try {
- rESTClient0.patch("https");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 1: !{usNmLQ_Gt.C_98
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- rESTClient0.addParameter("", (String) null);
- // Undeclared exception!
- try {
- rESTClient0.httpPut("");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697));
- // Undeclared exception!
- try {
- rESTClient0.httpPut("");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 11: szM4DVVoiAs`]T/
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- RESTClient rESTClient0 = new RESTClient((String) null);
- // Undeclared exception!
- try {
- rESTClient0.httpPost(" I3^~h5yoFuif");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- }
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("&", false);
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- rESTClient0.setHeader((String) null, "/G$0vW$R4vUaL)*tz");
- // Undeclared exception!
- try {
- rESTClient0.httpPost("/G$0vW$R4vUaL)*tz");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Header name may not be null
- //
- verifyException("org.apache.http.util.Args", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("oO!CF58JhSCm6t");
- rESTClient0.addParameter((String) null, "oO!CF58JhSCm6t");
- // Undeclared exception!
- try {
- rESTClient0.httpPost();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test16() throws Throwable {
- RESTClient rESTClient0 = new RESTClient((String) null, "F(Oy=<SOmNE9", (-1932735280));
- // Undeclared exception!
- try {
- rESTClient0.httpPost();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- }
- }
-
- @Test(timeout = 4000)
- public void test17() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("JAl/&Uq6mM8Kf8", false);
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- // Undeclared exception!
- try {
- rESTClient0.httpPost();
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test18() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("&8jW\"", "&8jW\"", (-1));
- // Undeclared exception!
- try {
- rESTClient0.httpPost();
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 0: &8jW\"
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test19() throws Throwable {
- RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T");
- RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T");
- // Undeclared exception!
- try {
- rESTClient1.httpPatch((String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test20() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("[59t(J)");
- // Undeclared exception!
- try {
- rESTClient0.httpPatch("[59t(J)");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 0: [59t(J)
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test21() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1));
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(httpClient0).toString();
- doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
- rESTClient0.setUnitTestClient(httpClient0);
- // Undeclared exception!
- try {
- rESTClient0.httpGet();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.rest.APIResponse", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test22() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("*;R");
- // Undeclared exception!
- try {
- rESTClient0.httpGet();
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 0: *;R
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test23() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("compatibility");
- RESTClient rESTClient1 = rESTClient0.addParameter("https", "https");
- RESTClient rESTClient2 = rESTClient1.setHeader("compatibility", "https");
- RESTClient rESTClient3 = rESTClient2.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer");
- InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
- InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0);
- StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
- doReturn(0).when(statusLine0).getStatusCode();
- rESTClient3.addHeader("2b?N", "https");
- HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
- doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity();
- doReturn(statusLine0).when(httpResponse0).getStatusLine();
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString();
- doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
- rESTClient2.setUnitTestClient(httpClient0);
- // Undeclared exception!
- try {
- rESTClient3.httpDelete("");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Entity may not be null
- //
- verifyException("org.apache.http.util.Args", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test24() throws Throwable {
- RESTClient rESTClient0 = new RESTClient(")TZ;T]b%B[FkT4", "%y@{Wz}c3J-!m", 1772);
- RESTClient rESTClient1 = rESTClient0.addParameter("$y*O^k0", (String) null);
- // Undeclared exception!
- try {
- rESTClient1.httpDelete((String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test25() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("Length Required");
- // Undeclared exception!
- try {
- rESTClient0.httpDelete("Length Required");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 6: Length Required
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test26() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("yhPl=c#;<s`V", false);
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- rESTClient0.addParameter("yhPl=c#;<s`V", (String) null);
- // Undeclared exception!
- try {
- rESTClient0.httpDelete();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test27() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605);
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- // Undeclared exception!
- try {
- rESTClient0.httpDelete();
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 8: 2cSq'/FF]W'K.S^k=<=
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test28() throws Throwable {
- RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T");
- RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T");
- // Undeclared exception!
- try {
- rESTClient1.get();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test29() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("z8UR?=)5pTtS]*");
- // Undeclared exception!
- try {
- rESTClient0.get();
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test30() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("JB<TRwDR@k.-C$=w3", "|N", 0);
- // Undeclared exception!
- try {
- rESTClient0.get();
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in path at index 2: JB<TRwDR@k.-C$=w3
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test31() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351));
- RESTClient rESTClient1 = rESTClient0.setParameter("I/O exception (", (String) null);
- // Undeclared exception!
- try {
- rESTClient1.delete();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.net.URLEncoder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test32() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("\":VYxeR;PP]jO_[f'");
- // Undeclared exception!
- try {
- rESTClient0.delete();
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Illegal character in scheme name at index 0: \":VYxeR;PP]jO_[f'
- //
- verifyException("java.net.URI", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test33() throws Throwable {
- RESTClient rESTClient0 = null;
- try {
- rESTClient0 = new RESTClient((RESTConfig) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.rest.RESTClient", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test34() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- rESTClient0.addParameter("", "");
- // Undeclared exception!
- try {
- rESTClient0.httpPatch("lr");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test35() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("", "netscape", 1);
- // Undeclared exception!
- try {
- rESTClient0.httpPost("");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test36() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig((String) null);
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- // Undeclared exception!
- try {
- rESTClient0.httpGet();
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test37() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("K.7:dc=", "K.7:dc=", 0);
- try {
- rESTClient0.httpPost();
- fail("Expecting exception: Exception");
-
- } catch(Exception e) {
- //
- // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc=
- //
- verifyException("org.openecomp.mso.rest.RESTClient", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test38() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException=", "EWh2BZ[]:q+%4S#7K", (-1847));
- // Undeclared exception!
- try {
- rESTClient0.httpDelete();
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test39() throws Throwable {
- RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
- String string0 = rESTClient0.getURL();
- assertEquals(",%LX:SC+'3!nt", string0);
- }
-
- @Test(timeout = 4000)
- public void test40() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("compatibility");
- InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
- doReturn((-3113)).when(inputStream0).read(any(byte[].class));
- HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
- doReturn(201).when(statusLine0).getStatusCode();
- HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- doReturn(inputStream0).when(httpEntity1).getContent();
- doReturn(0L, (long)(-2116360694)).when(httpEntity1).getContentLength();
- HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- doReturn(false).when(httpEntity2).isStreaming();
- HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
- doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
- doReturn(statusLine0).when(httpResponse0).getStatusLine();
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString();
- doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
- rESTClient0.setUnitTestClient(httpClient0);
- // Undeclared exception!
- try {
- rESTClient0.httpDelete("");
- fail("Expecting exception: IndexOutOfBoundsException");
-
- } catch(IndexOutOfBoundsException e) {
- //
- // off: 0 len: -3113 b.length: 4096
- //
- verifyException("org.apache.http.util.ByteArrayBuffer", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test41() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("compatibility");
- HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
- doReturn(201).when(statusLine0).getStatusCode();
- Header[] headerArray0 = new Header[0];
- HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- doReturn((InputStream) null).when(httpEntity1).getContent();
- HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- doReturn(false).when(httpEntity2).isStreaming();
- HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
- doReturn(headerArray0).when(httpResponse0).getAllHeaders();
- doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
- doReturn(statusLine0).when(httpResponse0).getStatusLine();
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString();
- doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
- rESTClient0.setUnitTestClient(httpClient0);
- APIResponse aPIResponse0 = rESTClient0.httpDelete("");
- assertEquals(201, aPIResponse0.getStatusCode());
- }
-
- @Test(timeout = 4000)
- public void test42() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("wlq:6r");
- try {
- rESTClient0.httpDelete("E");
- fail("Expecting exception: Exception");
-
- } catch(Exception e) {
- //
- // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: wlq:6r
- //
- verifyException("org.openecomp.mso.rest.RESTClient", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test43() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- // Undeclared exception!
- try {
- rESTClient0.httpPatch("");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test44() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("DELETE");
- // Undeclared exception!
- try {
- rESTClient0.httpPatch((String) null);
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test45() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException");
- RESTClient rESTClient1 = rESTClient0.addParameter("DELETE", "");
- // Undeclared exception!
- try {
- rESTClient1.patch("<;xR");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test46() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("compatibility");
- HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
- doReturn(201).when(statusLine0).getStatusCode();
- Header[] headerArray0 = new Header[0];
- HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- doReturn((InputStream) null).when(httpEntity1).getContent();
- HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
- doReturn(false).when(httpEntity2).isStreaming();
- HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
- doReturn(headerArray0).when(httpResponse0).getAllHeaders();
- doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
- doReturn(statusLine0).when(httpResponse0).getStatusLine();
- HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
- doReturn("GiQ=eHBwH9zA4COa").when(httpClient0).toString();
- doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
- rESTClient0.setUnitTestClient(httpClient0);
- APIResponse aPIResponse0 = rESTClient0.httpPut("compatibility");
- assertEquals(201, aPIResponse0.getStatusCode());
- }
-
- @Test(timeout = 4000)
- public void test47() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- // Undeclared exception!
- try {
- rESTClient0.httpPut("");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test48() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("compatibility");
- rESTClient0.addParameter("https", "https");
- // Undeclared exception!
- try {
- rESTClient0.httpPut("compatibility");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test49() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("", "(", 307);
- // Undeclared exception!
- try {
- rESTClient0.httpPut((String) null);
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test50() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("@0*Eu-=Fa");
- // Undeclared exception!
- try {
- rESTClient0.httpPost("@0*Eu-=Fa");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test51() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("x");
- // Undeclared exception!
- try {
- rESTClient0.httpPost((String) null);
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test52() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605);
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- RESTClient rESTClient1 = rESTClient0.setHeader("WkI<", "http");
- RESTClient rESTClient2 = rESTClient1.setHeader("WkI<", "");
- assertEquals("2cSq'/FF]W'K.S^k=<=", rESTClient2.getURL());
- }
-
- @Test(timeout = 4000)
- public void test53() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697));
- RESTClient rESTClient1 = rESTClient0.setHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/");
- RESTClient rESTClient2 = rESTClient1.addHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/");
- assertSame(rESTClient0, rESTClient2);
- }
-
- @Test(timeout = 4000)
- public void test54() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("E U(~h|zVLWi", "http", 0);
- rESTClient0.setParameter("E U(~h|zVLWi", "http");
- RESTClient rESTClient1 = rESTClient0.setParameter("E U(~h|zVLWi", "k@(}4U05'$}yl)W");
- assertSame(rESTClient1, rESTClient0);
- }
-
- @Test(timeout = 4000)
- public void test55() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- RESTClient rESTClient1 = rESTClient0.addParameter("", "");
- RESTClient rESTClient2 = rESTClient0.addParameter("", (String) null);
- assertSame(rESTClient2, rESTClient1);
- }
-
- @Test(timeout = 4000)
- public void test56() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("compatibility");
- rESTClient0.addParameter("https", "https");
- RESTClient rESTClient1 = rESTClient0.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer");
- // Undeclared exception!
- try {
- rESTClient1.httpDelete("");
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test57() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("K.7:dc=");
- try {
- rESTClient0.get();
- fail("Expecting exception: Exception");
-
- } catch(Exception e) {
- //
- // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc=
- //
- verifyException("org.openecomp.mso.rest.RESTClient", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test58() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("http.virtual-host");
- RESTClient rESTClient1 = rESTClient0.addAuthorizationHeader("EWh2BZ[]:q+%4S#7K");
- assertSame(rESTClient0, rESTClient1);
- }
-
- @Test(timeout = 4000)
- public void test59() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351));
- // Undeclared exception!
- try {
- rESTClient0.delete();
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test60() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("UTF-8");
- RESTClient rESTClient0 = new RESTClient(rESTConfig0);
- HttpEntity httpEntity0 = rESTClient0.getHttpEntity();
- assertNull(httpEntity0);
- }
-
- @Test(timeout = 4000)
- public void test61() throws Throwable {
- RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
- LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getHeaders();
- assertEquals(0, linkedHashMap0.size());
- }
-
- @Test(timeout = 4000)
- public void test62() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("DELETE");
- HttpClient httpClient0 = rESTClient0.getUnitTestClient();
- assertNull(httpClient0);
- }
-
- @Test(timeout = 4000)
- public void test63() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1));
- RESTClient rESTClient1 = rESTClient0.addParameter("o", "o");
- // Undeclared exception!
- try {
- rESTClient1.httpGet();
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test64() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("DELETE");
- LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getParameters();
- assertTrue(linkedHashMap0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test65() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("");
- // Undeclared exception!
- try {
- rESTClient0.post();
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test66() throws Throwable {
- RESTClient rESTClient0 = new RESTClient("DELETE");
- // Undeclared exception!
- try {
- rESTClient0.httpDelete((String) null);
- fail("Expecting exception: IllegalStateException");
-
- } catch(IllegalStateException e) {
- //
- // Target host is null
- //
- verifyException("org.apache.http.util.Asserts", e);
- }
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java
deleted file mode 100644
index 2761b252fd..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:49:09 GMT 2016
- */
-
-package org.openecomp.mso.rest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class RESTClientESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.RESTClient";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RESTClientESTestscaffolding.class.getClassLoader() ,
- "org.apache.http.client.methods.HttpPatch",
- "org.apache.http.io.HttpMessageParserFactory",
- "org.apache.http.impl.conn.DefaultHttpResponseParserFactory",
- "org.apache.http.impl.execchain.RequestAbortedException",
- "org.apache.http.impl.execchain.ProtocolExec",
- "org.apache.http.config.Registry",
- "org.apache.http.cookie.MalformedCookieException",
- "org.apache.http.impl.conn.SystemDefaultDnsResolver",
- "org.apache.http.client.protocol.RequestClientConnControl",
- "org.apache.http.conn.ConnectionRequest",
- "org.apache.http.impl.client.DefaultUserTokenHandler",
- "org.apache.http.impl.conn.DefaultManagedHttpClientConnection",
- "org.apache.http.conn.HttpClientConnectionManager",
- "org.apache.http.client.protocol.RequestAcceptEncoding",
- "org.apache.http.HttpException",
- "org.apache.http.cookie.CookieSpec",
- "org.apache.http.impl.cookie.RFC2965SpecFactory",
- "org.apache.http.pool.AbstractConnPool$1",
- "org.apache.http.conn.ssl.AllowAllHostnameVerifier",
- "org.apache.http.client.CredentialsProvider",
- "org.apache.http.client.ClientProtocolException",
- "org.apache.http.pool.RouteSpecificPool",
- "org.apache.http.client.methods.Configurable",
- "org.apache.http.config.RegistryBuilder",
- "org.apache.http.params.AbstractHttpParams",
- "org.apache.http.io.HttpTransportMetrics",
- "org.apache.http.conn.ssl.AbstractVerifier",
- "org.openecomp.mso.rest.RESTConfig",
- "org.apache.http.auth.Credentials",
- "org.apache.http.io.HttpMessageParser",
- "org.apache.http.client.methods.AbstractExecutionAwareRequest",
- "org.apache.http.impl.BHttpConnectionBase",
- "org.apache.http.HttpConnectionMetrics",
- "org.apache.http.io.HttpMessageWriter",
- "org.apache.http.HttpClientConnection",
- "org.apache.http.conn.ConnectionPoolTimeoutException",
- "org.apache.http.conn.routing.HttpRouteDirector",
- "org.apache.http.pool.ConnPool",
- "org.apache.http.protocol.HttpProcessor",
- "org.apache.http.auth.AuthProtocolState",
- "org.apache.http.client.RedirectStrategy",
- "org.apache.http.impl.client.BasicCookieStore",
- "org.apache.http.conn.routing.BasicRouteDirector",
- "org.apache.http.protocol.HttpContext",
- "org.apache.http.params.HttpParams",
- "org.apache.http.client.NonRepeatableRequestException",
- "org.apache.http.HttpResponse",
- "org.apache.http.impl.client.AuthenticationStrategyImpl",
- "org.apache.http.impl.client.HttpClientBuilder",
- "org.apache.http.message.HeaderGroup",
- "org.apache.http.impl.io.DefaultHttpRequestWriterFactory",
- "org.apache.http.client.protocol.RequestAuthCache",
- "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory",
- "org.apache.http.impl.conn.DefaultSchemePortResolver",
- "org.apache.http.config.MessageConstraints",
- "org.apache.http.Header",
- "org.apache.http.conn.HttpHostConnectException",
- "org.apache.http.util.EntityUtils",
- "org.apache.http.impl.NoConnectionReuseStrategy",
- "org.apache.http.impl.client.BasicCredentialsProvider",
- "org.apache.http.conn.ConnectionKeepAliveStrategy",
- "org.apache.http.cookie.CookieSpecFactory",
- "org.apache.http.conn.ssl.X509HostnameVerifier",
- "org.apache.http.protocol.ChainBuilder",
- "org.apache.http.impl.client.DefaultHttpRequestRetryHandler",
- "org.apache.http.impl.conn.PoolingHttpClientConnectionManager",
- "org.apache.http.impl.conn.DefaultProxyRoutePlanner",
- "org.apache.http.impl.auth.KerberosSchemeFactory",
- "org.apache.http.util.ByteArrayBuffer",
- "org.apache.http.cookie.CookieOrigin",
- "org.apache.http.client.methods.HttpRequestBase",
- "org.apache.http.HttpEntity",
- "org.apache.http.pool.PoolEntryCallback",
- "org.apache.http.entity.StringEntity",
- "org.apache.http.impl.DefaultConnectionReuseStrategy",
- "org.apache.http.pool.ConnFactory",
- "org.apache.http.client.methods.HttpGet",
- "org.apache.http.protocol.BasicHttpContext",
- "org.apache.commons.logging.impl.Jdk14Logger",
- "org.apache.http.impl.execchain.ClientExecChain",
- "org.apache.http.HttpVersion",
- "org.apache.http.conn.SchemePortResolver",
- "org.apache.http.message.BasicStatusLine",
- "org.apache.http.conn.DnsResolver",
- "org.apache.http.impl.client.TargetAuthenticationStrategy",
- "org.apache.http.params.CoreProtocolPNames",
- "org.apache.http.auth.AuthScheme",
- "org.apache.http.message.AbstractHttpMessage",
- "org.apache.http.auth.MalformedChallengeException",
- "org.apache.http.HttpEntityEnclosingRequest",
- "org.apache.http.entity.AbstractHttpEntity",
- "org.apache.http.ReasonPhraseCatalog",
- "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel",
- "org.apache.http.client.UserTokenHandler",
- "org.apache.http.impl.auth.DigestSchemeFactory",
- "org.apache.http.impl.conn.HttpClientConnectionOperator",
- "org.apache.http.HttpResponseFactory",
- "org.apache.http.client.methods.HttpPut",
- "org.openecomp.mso.rest.RESTClient",
- "org.apache.http.ConnectionReuseStrategy",
- "org.apache.http.client.protocol.RequestDefaultHeaders",
- "org.apache.http.message.BasicHeader",
- "org.apache.http.impl.conn.ConnectionShutdownException",
- "org.apache.http.conn.ManagedHttpClientConnection",
- "org.apache.http.client.protocol.ResponseContentEncoding",
- "org.apache.http.message.BasicLineParser",
- "org.apache.http.client.methods.HttpPost",
- "org.apache.http.auth.AuthSchemeProvider",
- "org.apache.http.config.SocketConfig",
- "org.apache.http.util.Asserts",
- "org.apache.http.client.config.RequestConfig",
- "org.apache.http.StatusLine",
- "org.apache.http.impl.DefaultBHttpClientConnection",
- "org.apache.http.impl.DefaultHttpResponseFactory",
- "org.apache.http.io.SessionOutputBuffer",
- "org.apache.http.RequestLine",
- "org.apache.http.conn.HttpConnectionFactory",
- "org.apache.http.protocol.RequestContent",
- "org.apache.http.cookie.CookieIdentityComparator",
- "org.apache.http.config.Lookup",
- "org.apache.http.HttpMessage",
- "org.apache.http.impl.cookie.NetscapeDraftSpecFactory",
- "org.apache.http.HttpRequestInterceptor",
- "org.apache.http.HeaderElementIterator",
- "org.apache.http.client.AuthCache",
- "org.apache.http.pool.AbstractConnPool",
- "org.apache.http.HeaderIterator",
- "org.apache.http.conn.ClientConnectionManager",
- "org.apache.http.HttpInetConnection",
- "org.apache.http.entity.ContentType",
- "org.apache.http.message.LineFormatter",
- "org.apache.http.cookie.CookieSpecProvider",
- "org.apache.http.HttpRequest",
- "org.apache.http.pool.ConnPoolControl",
- "org.openecomp.mso.rest.APIResponse",
- "org.apache.http.client.BackoffManager",
- "org.openecomp.mso.rest.HostNameVerifier",
- "org.apache.http.client.AuthenticationStrategy",
- "org.apache.http.conn.socket.ConnectionSocketFactory",
- "org.apache.http.protocol.RequestTargetHost",
- "org.apache.http.pool.PoolEntry",
- "org.apache.http.message.BasicLineFormatter",
- "org.apache.http.client.methods.HttpUriRequest",
- "org.apache.http.protocol.HttpRequestExecutor",
- "org.apache.http.client.methods.HttpRequestWrapper",
- "org.apache.http.io.SessionInputBuffer",
- "org.apache.http.impl.cookie.IgnoreSpecFactory",
- "org.apache.http.impl.auth.HttpAuthenticator",
- "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory",
- "org.apache.http.conn.ConnectTimeoutException",
- "org.apache.http.client.methods.AbortableHttpRequest",
- "org.apache.http.client.HttpClient",
- "org.apache.http.auth.AuthSchemeFactory",
- "org.apache.http.cookie.Cookie",
- "org.apache.http.protocol.ImmutableHttpProcessor",
- "org.apache.http.impl.auth.SPNegoSchemeFactory",
- "org.apache.http.protocol.HTTP",
- "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$ConfigData",
- "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody",
- "org.apache.http.TokenIterator",
- "org.openecomp.mso.rest.HttpHeader",
- "org.apache.http.client.methods.HttpRequestWrapper$HttpEntityEnclosingRequestWrapper",
- "org.apache.http.protocol.HttpCoreContext",
- "org.apache.http.impl.conn.CPool",
- "org.apache.http.impl.auth.NTLMSchemeFactory",
- "org.apache.http.client.utils.URIUtils",
- "org.apache.http.ProtocolVersion",
- "org.apache.http.client.protocol.RequestExpectContinue",
- "org.apache.http.util.VersionInfo",
- "org.apache.http.impl.cookie.RFC2109SpecFactory",
- "org.apache.http.entity.InputStreamEntity",
- "org.apache.http.HttpHost",
- "org.apache.http.conn.UnsupportedSchemeException",
- "org.apache.http.ProtocolException",
- "org.apache.http.impl.cookie.BrowserCompatSpecFactory",
- "org.apache.http.client.methods.HttpEntityEnclosingRequestBase",
- "org.apache.http.params.BasicHttpParams",
- "org.apache.http.client.protocol.HttpClientContext",
- "org.apache.http.impl.client.ProxyAuthenticationStrategy",
- "org.apache.http.conn.ssl.StrictHostnameVerifier",
- "org.apache.http.io.HttpMessageWriterFactory",
- "org.apache.http.concurrent.Cancellable",
- "org.apache.http.impl.execchain.MainClientExec",
- "org.apache.http.protocol.HttpProcessorBuilder",
- "org.apache.http.entity.ContentLengthStrategy",
- "org.apache.http.impl.execchain.TunnelRefusedException",
- "org.apache.http.conn.routing.HttpRoutePlanner",
- "org.apache.http.Consts",
- "org.apache.http.conn.ssl.SSLConnectionSocketFactory",
- "org.apache.http.message.LineParser",
- "org.apache.http.impl.cookie.BestMatchSpecFactory",
- "org.apache.http.params.HttpParamsNames",
- "org.apache.http.conn.ssl.SSLInitializationException",
- "org.openecomp.mso.rest.RESTException",
- "org.apache.http.util.Args",
- "org.apache.http.params.HttpProtocolParams",
- "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy",
- "org.apache.http.protocol.RequestUserAgent",
- "org.apache.http.config.ConnectionConfig",
- "org.apache.http.conn.socket.LayeredConnectionSocketFactory",
- "org.apache.http.conn.ssl.BrowserCompatHostnameVerifier",
- "org.apache.http.util.TextUtils",
- "org.apache.http.HttpResponseInterceptor",
- "org.apache.http.impl.EnglishReasonPhraseCatalog",
- "org.apache.http.client.config.RequestConfig$Builder",
- "org.apache.http.auth.AuthenticationException",
- "org.apache.http.auth.AuthState",
- "org.apache.http.client.protocol.RequestAddCookies",
- "org.apache.http.impl.conn.DefaultRoutePlanner",
- "org.apache.http.conn.routing.HttpRoute",
- "org.apache.http.impl.conn.CPoolEntry",
- "org.apache.http.client.CookieStore",
- "org.apache.http.impl.auth.BasicSchemeFactory",
- "org.apache.http.conn.socket.PlainConnectionSocketFactory",
- "org.apache.http.client.HttpRequestRetryHandler",
- "org.apache.http.ParseException",
- "org.apache.http.impl.client.CloseableHttpClient",
- "org.apache.http.client.protocol.ResponseProcessCookies",
- "org.apache.http.message.BasicRequestLine",
- "org.apache.http.client.ServiceUnavailableRetryStrategy",
- "org.apache.http.client.methods.HttpExecutionAware",
- "org.apache.http.impl.client.InternalHttpClient",
- "org.apache.http.HeaderElement",
- "org.apache.http.client.ConnectionBackoffStrategy",
- "org.apache.http.util.CharArrayBuffer",
- "org.apache.http.impl.execchain.RetryExec",
- "org.apache.http.conn.routing.RouteInfo",
- "org.apache.http.client.ResponseHandler",
- "org.apache.http.HttpConnection",
- "org.apache.http.message.ParserCursor"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RESTClientESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody",
- "org.apache.http.conn.socket.PlainConnectionSocketFactory",
- "org.apache.http.conn.ssl.AbstractVerifier",
- "org.apache.commons.logging.impl.Jdk14Logger",
- "org.apache.http.conn.ssl.SSLConnectionSocketFactory",
- "org.apache.http.impl.conn.CPool",
- "org.apache.http.message.BasicLineFormatter",
- "org.apache.http.impl.io.DefaultHttpRequestWriterFactory",
- "org.apache.http.ProtocolVersion",
- "org.apache.http.HttpVersion",
- "org.apache.http.message.BasicLineParser",
- "org.apache.http.impl.EnglishReasonPhraseCatalog",
- "org.apache.http.impl.DefaultHttpResponseFactory",
- "org.apache.http.impl.conn.DefaultHttpResponseParserFactory",
- "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory",
- "org.apache.http.impl.conn.HttpClientConnectionOperator",
- "org.apache.http.impl.conn.DefaultSchemePortResolver",
- "org.apache.http.impl.conn.SystemDefaultDnsResolver",
- "org.apache.http.util.VersionInfo",
- "org.apache.http.impl.client.HttpClientBuilder",
- "org.apache.http.protocol.HttpRequestExecutor",
- "org.apache.http.impl.DefaultConnectionReuseStrategy",
- "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy",
- "org.apache.http.impl.client.AuthenticationStrategyImpl",
- "org.apache.http.impl.client.TargetAuthenticationStrategy",
- "org.apache.http.impl.client.ProxyAuthenticationStrategy",
- "org.apache.http.impl.client.DefaultUserTokenHandler",
- "org.apache.http.client.protocol.RequestClientConnControl",
- "org.apache.http.client.protocol.ResponseContentEncoding",
- "org.apache.http.impl.client.DefaultHttpRequestRetryHandler",
- "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel",
- "org.apache.http.impl.client.BasicCookieStore",
- "org.apache.http.cookie.CookieIdentityComparator",
- "org.apache.http.client.config.RequestConfig",
- "org.apache.http.client.methods.HttpPut",
- "org.apache.http.message.HeaderGroup",
- "org.apache.http.message.BasicHeader",
- "org.apache.http.entity.AbstractHttpEntity",
- "org.apache.http.Consts",
- "org.apache.http.entity.ContentType",
- "org.apache.http.util.CharArrayBuffer",
- "org.apache.http.params.BasicHttpParams",
- "org.apache.http.message.BasicRequestLine",
- "org.apache.http.protocol.HttpCoreContext",
- "org.apache.http.client.protocol.HttpClientContext",
- "org.apache.http.auth.AuthProtocolState",
- "org.apache.http.client.methods.HttpPost",
- "org.apache.http.HttpHost",
- "org.apache.http.client.methods.HttpGet",
- "org.apache.http.client.methods.HttpPatch",
- "org.openecomp.mso.rest.RESTException",
- "org.apache.http.client.ClientProtocolException",
- "org.apache.http.protocol.HTTP",
- "org.apache.http.message.BasicStatusLine",
- "org.apache.http.util.ByteArrayBuffer"
- );
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java
deleted file mode 100644
index a1c83ba70e..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpVersion;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.message.BasicHttpResponse;
-import org.junit.Assert;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import org.openecomp.mso.rest.APIResponse;
-import org.openecomp.mso.rest.RESTClient;
-import org.openecomp.mso.rest.RESTException;
-
-/**
- * @version 1.0
- *
- */
-public class RESTClientTest {
-
- @Test
- public void testSimpleHTTP() throws RESTException, ClientProtocolException, IOException {
- HttpClient mockHttpClient = mock(HttpClient.class);
- HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
- response.setEntity(new StringEntity("test","UTF-8"));
- when(mockHttpClient.execute(Mockito.<HttpUriRequest>any())).thenReturn(response);
-
- RESTClient restClient = new RESTClient("http://localhost");
- restClient.setUnitTestClient(mockHttpClient);
- APIResponse apiResponse = restClient.get();
- Assert.assertEquals(200, apiResponse.getStatusCode());
- Assert.assertEquals("test", apiResponse.getResponseBodyAsString());
- }
-
- @Test
- public void testSimpleHTTPS() throws RESTException, ClientProtocolException, IOException {
- HttpClient mockHttpClient = mock(HttpClient.class);
- HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
- response.setEntity(new StringEntity("test","UTF-8"));
- when(mockHttpClient.execute(Mockito.<HttpUriRequest>any())).thenReturn(response);
-
- RESTClient restClient = new RESTClient("https://localhost");
- restClient.setUnitTestClient(mockHttpClient);
- APIResponse apiResponse = restClient.get();
- Assert.assertEquals(200, apiResponse.getStatusCode());
- Assert.assertEquals("test", apiResponse.getResponseBodyAsString());
- }
-
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java
index 0a46cebf29..bb7460dfc6 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java
@@ -3,6 +3,26 @@
* Mon Nov 14 11:47:42 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.junit.Test;
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java
index 1eb33ddd80..1fabc6bc5d 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java
@@ -4,6 +4,26 @@
* Mon Nov 14 11:47:42 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java
index aff908ee98..e4ac23b3bd 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java
@@ -3,6 +3,26 @@
* Mon Nov 14 11:47:59 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.junit.Test;
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java
index 13d4dcc026..3e3c9873b7 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java
@@ -4,6 +4,26 @@
* Mon Nov 14 11:47:59 GMT 2016
*/
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
package org.openecomp.mso.rest;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
diff --git a/bpmn/MSOURN-plugin/pom.xml b/bpmn/MSOURN-plugin/pom.xml
index 5ad57a6096..ac75b53c08 100644
--- a/bpmn/MSOURN-plugin/pom.xml
+++ b/bpmn/MSOURN-plugin/pom.xml
@@ -1,72 +1,71 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>bpmn</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.openecomp.mso</groupId>
- <artifactId>cockpit-urnmap-plugin</artifactId>
-
- <packaging>jar</packaging>
-
- <name>MSO URN Mapping Cockpit Plugin</name>
-
- <dependencies>
- <!-- TODO Upate it to ee and proper version-->
- <dependency>
- <groupId>org.camunda.bpm.webapp</groupId>
- <artifactId>camunda-webapp-core</artifactId>
- <version>${camunda.version}</version>
- <!-- exclusion to use latest commons-fileupload -->
- <exclusions>
- <exclusion>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- latest commons-fileupload -->
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.3.2</version>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>2.0</version>
- </dependency>
- <!-- TODO Upate it to ee version -->
- <dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-engine</artifactId>
- <version>${camunda.version}</version>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.openecomp.mso</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>bpmn</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>cockpit-urnmap-plugin</artifactId>
+
+ <packaging>jar</packaging>
+
+ <name>MSO URN Mapping Cockpit Plugin</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.camunda.bpm.webapp</groupId>
+ <artifactId>camunda-webapp</artifactId>
+ <classifier>classes</classifier>
+ <version>${camunda.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <!-- TODO Upate it to ee version -->
+ <dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-engine</artifactId>
+ <version>${camunda.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.mso</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.evosuite</groupId>
+ <artifactId>evosuite-standalone-runtime</artifactId>
+ <version>${evosuiteVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project> \ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPlugin.java
index 9a02aa0c38..09fdc1c85e 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPlugin.java
@@ -1,54 +1,53 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin;
-
-import com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource;
-
-
-
-public class URNMapPlugin extends AbstractCockpitPlugin{
- public static final String ID = "urnMap-plugin";
-
- public String getId() {
- return ID;
- }
-
- @Override
- public Set<Class<?>> getResourceClasses() {
- Set<Class<?>> classes = new HashSet<Class<?>>();
-
- classes.add(URNMapPluginRootResource.class);
-
- return classes;
- }
-
- @Override
- public List<String> getMappingFiles() {
- return Arrays.asList("com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml");
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin;
+import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource;
+
+
+
+public class URNMapPlugin extends AbstractCockpitPlugin{
+ public static final String ID = "urnMap-plugin";
+
+ public String getId() {
+ return ID;
+ }
+
+ @Override
+ public Set<Class<?>> getResourceClasses() {
+ Set<Class<?>> classes = new HashSet<Class<?>>();
+
+ classes.add(URNMapPluginRootResource.class);
+
+ return classes;
+ }
+
+ @Override
+ public List<String> getMappingFiles() {
+ return Arrays.asList("org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml");
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
index 8a9d136dd6..f7cc311e77 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
@@ -1,89 +1,89 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-import org.camunda.bpm.engine.ProcessEngineConfiguration;
-import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
-import org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration;
-import org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor;
-import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor;
-import org.camunda.bpm.engine.impl.interceptor.LogInterceptor;
-import org.camunda.bpm.engine.impl.util.ReflectUtil;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfiguration {
-
- private String resourceName;
-
- protected void init() {
- throw new IllegalArgumentException(
- "Normal 'init' on process engine only used for extended MyBatis mappings is not allowed, please use 'initFromProcessEngineConfiguration'. You cannot construct a process engine with this configuration.");
- }
-
- /**
- * initialize the {@link ProcessEngineConfiguration} from an existing one,
- * just using the database settings and initialize the database / MyBatis
- * stuff.
- */
- public void initFromProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration, String resourceName) {
- this.resourceName = resourceName;
-
- setDatabaseType(processEngineConfiguration.getDatabaseType());
- setDataSource(processEngineConfiguration.getDataSource());
- setDatabaseTablePrefix(processEngineConfiguration.getDatabaseTablePrefix());
-
- initDataSource();
- //initVariableTypes();
- initCommandContextFactory();
- initTransactionFactory();
- initTransactionContextFactory();
- initCommandExecutors();
- initSqlSessionFactory();
- initIncidentHandlers();
- initIdentityProviderSessionFactory();
- initSessionFactories();
- }
-
- /**
- * In order to always open a new command context set the property
- * "alwaysOpenNew" to true inside the CommandContextInterceptor.
- *
- * If you execute the custom queries inside the process engine
- * (for example in a service task), you have to do this.
- */
- @Override
- protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() {
- List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>();
- defaultCommandInterceptorsTxRequired.add(new LogInterceptor());
- defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true));
- return defaultCommandInterceptorsTxRequired;
- }
-
- @Override
- protected InputStream getMyBatisXmlConfigurationSteam() {
- return ReflectUtil.getResourceAsStream(resourceName);
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+import org.camunda.bpm.engine.ProcessEngineConfiguration;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration;
+import org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor;
+import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor;
+import org.camunda.bpm.engine.impl.interceptor.LogInterceptor;
+import org.camunda.bpm.engine.impl.util.ReflectUtil;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfiguration {
+
+ private String resourceName;
+
+ protected void init() {
+ throw new IllegalArgumentException(
+ "Normal 'init' on process engine only used for extended MyBatis mappings is not allowed, please use 'initFromProcessEngineConfiguration'. You cannot construct a process engine with this configuration.");
+ }
+
+ /**
+ * initialize the {@link ProcessEngineConfiguration} from an existing one,
+ * just using the database settings and initialize the database / MyBatis
+ * stuff.
+ */
+ public void initFromProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration, String resourceName) {
+ this.resourceName = resourceName;
+
+ setDatabaseType(processEngineConfiguration.getDatabaseType());
+ setDataSource(processEngineConfiguration.getDataSource());
+ setDatabaseTablePrefix(processEngineConfiguration.getDatabaseTablePrefix());
+
+ initDataSource();
+ //initVariableTypes();
+ initCommandContextFactory();
+ initTransactionFactory();
+ initTransactionContextFactory();
+ initCommandExecutors();
+ initSqlSessionFactory();
+ initIncidentHandlers();
+ initIdentityProviderSessionFactory();
+ initSessionFactories();
+ }
+
+ /**
+ * In order to always open a new command context set the property
+ * "alwaysOpenNew" to true inside the CommandContextInterceptor.
+ *
+ * If you execute the custom queries inside the process engine
+ * (for example in a service task), you have to do this.
+ */
+ @Override
+ protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() {
+ List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>();
+ defaultCommandInterceptorsTxRequired.add(new LogInterceptor());
+ defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true));
+ return defaultCommandInterceptorsTxRequired;
+ }
+
+ @Override
+ protected InputStream getMyBatisXmlConfigurationSteam() {
+ return ReflectUtil.getResourceAsStream(resourceName);
+ }
+
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisQueryCommandExecutor.java
index 0bd7d739c5..02b128f4ee 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisQueryCommandExecutor.java
@@ -1,44 +1,44 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
-import org.camunda.bpm.engine.impl.interceptor.Command;
-
-/**
- * Helper to initialize a minimized process engine which does all the transaction and MyBatis mapping stuff for us
- * and can be used to execute queries.
- */
-public class MyBatisQueryCommandExecutor {
-
- private MyBatisExtendedSessionFactory myBatisExtendedSessionFactory;
-
- public MyBatisQueryCommandExecutor(ProcessEngineConfigurationImpl processEngineConfiguration, String mappingResourceName) {
- myBatisExtendedSessionFactory = new MyBatisExtendedSessionFactory();
- myBatisExtendedSessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration, mappingResourceName);
- }
-
- public <T> T executeQueryCommand(Command<T> command) {
- return myBatisExtendedSessionFactory.getCommandExecutorTxRequired().execute(command);
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.interceptor.Command;
+
+/**
+ * Helper to initialize a minimized process engine which does all the transaction and MyBatis mapping stuff for us
+ * and can be used to execute queries.
+ */
+public class MyBatisQueryCommandExecutor {
+
+ private MyBatisExtendedSessionFactory myBatisExtendedSessionFactory;
+
+ public MyBatisQueryCommandExecutor(ProcessEngineConfigurationImpl processEngineConfiguration, String mappingResourceName) {
+ myBatisExtendedSessionFactory = new MyBatisExtendedSessionFactory();
+ myBatisExtendedSessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration, mappingResourceName);
+ }
+
+ public <T> T executeQueryCommand(Command<T> command) {
+ return myBatisExtendedSessionFactory.getCommandExecutorTxRequired().execute(command);
+ }
+
+
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNData.java
index f8396bb223..59c41b1e42 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNData.java
@@ -1,47 +1,47 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-public class URNData {
-
- private String URNName;
- private String URNValue;
- private String Ver_;
- public String getURNName() {
- return URNName;
- }
- public void setURNName(String uRNName) {
- URNName = uRNName;
- }
- public String getURNValue() {
- return URNValue;
- }
- public void setURNValue(String uRNValue) {
- URNValue = uRNValue;
- }
- public String getVer_() {
- return Ver_;
- }
- public void setVer_(String ver_) {
- Ver_ = ver_;
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+public class URNData {
+
+ private String URNName;
+ private String URNValue;
+ private String Ver_;
+ public String getURNName() {
+ return URNName;
+ }
+ public void setURNName(String uRNName) {
+ URNName = uRNName;
+ }
+ public String getURNValue() {
+ return URNValue;
+ }
+ public void setURNValue(String uRNValue) {
+ URNValue = uRNValue;
+ }
+ public String getVer_() {
+ return Ver_;
+ }
+ public void setVer_(String ver_) {
+ Ver_ = ver_;
+ }
+
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNService.java
index 7fd41c131d..c512c35c68 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNService.java
@@ -1,48 +1,48 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-import java.util.List;
-
-import org.camunda.bpm.engine.ProcessEngines;
-import org.camunda.bpm.engine.impl.ProcessEngineImpl;
-import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
-import org.camunda.bpm.engine.impl.interceptor.Command;
-import org.camunda.bpm.engine.impl.interceptor.CommandContext;
-
-public class URNService {
-
-
- public List<URNData> getProperties() {
- ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
- ProcessEngineConfigurationImpl processEngineConfiguration = processEngine.getProcessEngineConfiguration();
-
- MyBatisQueryCommandExecutor commandExecutor = new MyBatisQueryCommandExecutor(processEngineConfiguration, "mappings.xml");
- return commandExecutor.executeQueryCommand(new Command<List<URNData>>() {
-
- @SuppressWarnings("unchecked")
- public List<URNData> execute(CommandContext commandContext) {
- return (List<URNData>) commandContext.getDbSqlSession().selectList("retrieveUrnKeyValuePair", null);
- }
- });
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+import java.util.List;
+
+import org.camunda.bpm.engine.ProcessEngines;
+import org.camunda.bpm.engine.impl.ProcessEngineImpl;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.interceptor.Command;
+import org.camunda.bpm.engine.impl.interceptor.CommandContext;
+
+public class URNService {
+
+
+ public List<URNData> getProperties() {
+ ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
+ ProcessEngineConfigurationImpl processEngineConfiguration = processEngine.getProcessEngineConfiguration();
+
+ MyBatisQueryCommandExecutor commandExecutor = new MyBatisQueryCommandExecutor(processEngineConfiguration, "mappings.xml");
+ return commandExecutor.executeQueryCommand(new Command<List<URNData>>() {
+
+ @SuppressWarnings("unchecked")
+ public List<URNData> execute(CommandContext commandContext) {
+ return (List<URNData>) commandContext.getDbSqlSession().selectList("retrieveUrnKeyValuePair", null);
+ }
+ });
+ }
+
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
index 44fe47b053..51ceb0d1ab 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
@@ -1,98 +1,96 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-
-import org.camunda.bpm.cockpit.db.QueryParameters;
-import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
-import com.att.camunda.bpm.plugin.urnmap.db.*;
-import org.camunda.bpm.cockpit.db.CommandExecutor;
-
-import com.att.camunda.bpm.plugin.urnmap.db.URNData;
-
-public class ProcessInstanceResource extends AbstractPluginResource {
-
- public ProcessInstanceResource(String engineName) {
- super(engineName);
- }
-
- @GET
- public List<URNData> getUrnDataMap() {
- List<URNData> list = getQueryService()
- .executeQuery(
- "cockpit.urnMap.retrieveUrnKeyValuePair",
- new QueryParameters<URNData>());
-
- System.out.println("urnmap-plugin project - Results Retrieved: ");
- System.out.println("URNName: " + " " + "URNValue: " );
- for(URNData d: list)
- {
- System.out.println( d.getURNName() + " " + d.getURNValue());
- }
-
- return list;
- }
-
- @PUT
- //public void insertNewRow(String key_, String value_)
- public void insertNewRow(String temp)
- {
- System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp);
- StringTokenizer st = new StringTokenizer(temp, "|");
- String key_ = "";
- String value_ = "";
-
- while(st.hasMoreTokens()) {
- key_ = st.nextToken();
- value_ = st.nextToken();
- System.out.println(key_ + "\t" + value_);
- }
-
- System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_);
- URNData nRow = new URNData();
- nRow.setVer_("1");
- nRow.setURNName(key_);
- nRow.setURNValue(value_);
-
- getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class);
-
- System.out.println("AddNewRow: XXXXXX END XXXXXXXXXXX");
- }
-
- @POST
- // public void getPersistData(List<URNData > myList) {
- public void getPersistData(URNData d) {
-
- System.out.println("getPersistData: UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() );
-
- getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class);
- //getQueryService().executeQuery("cockpit.sample.persistURNData", d, ProcessInstanceCountDto.class);
-
-
- System.out.println("XXXXXXXXXX - END - XXXXXXXXXXXXXXX");
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+
+import org.camunda.bpm.cockpit.db.QueryParameters;
+import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
+import org.camunda.bpm.cockpit.db.CommandExecutor;
+import org.openecomp.camunda.bpmn.plugin.urnmap.db.*;
+
+public class ProcessInstanceResource extends AbstractPluginResource {
+
+ public ProcessInstanceResource(String engineName) {
+ super(engineName);
+ }
+
+ @GET
+ public List<URNData> getUrnDataMap() {
+ List<URNData> list = getQueryService()
+ .executeQuery(
+ "cockpit.urnMap.retrieveUrnKeyValuePair",
+ new QueryParameters<URNData>());
+
+ System.out.println("urnmap-plugin project - Results Retrieved: ");
+ System.out.println("URNName: " + " " + "URNValue: " );
+ for(URNData d: list)
+ {
+ System.out.println( d.getURNName() + " " + d.getURNValue());
+ }
+
+ return list;
+ }
+
+ @PUT
+ //public void insertNewRow(String key_, String value_)
+ public void insertNewRow(String temp)
+ {
+ System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp);
+ StringTokenizer st = new StringTokenizer(temp, "|");
+ String key_ = "";
+ String value_ = "";
+
+ while(st.hasMoreTokens()) {
+ key_ = st.nextToken();
+ value_ = st.nextToken();
+ System.out.println(key_ + "\t" + value_);
+ }
+
+ System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_);
+ URNData nRow = new URNData();
+ nRow.setVer_("1");
+ nRow.setURNName(key_);
+ nRow.setURNValue(value_);
+
+ getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class);
+
+ System.out.println("AddNewRow: XXXXXX END XXXXXXXXXXX");
+ }
+
+ @POST
+ // public void getPersistData(List<URNData > myList) {
+ public void getPersistData(URNData d) {
+
+ System.out.println("getPersistData: UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() );
+
+ getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class);
+ //getQueryService().executeQuery("cockpit.sample.persistURNData", d, ProcessInstanceCountDto.class);
+
+
+ System.out.println("XXXXXXXXXX - END - XXXXXXXXXXXXXXX");
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResource.java
index c30eb8d8d7..0e1ccd96d8 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResource.java
@@ -1,43 +1,42 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource;
-
-import com.att.camunda.bpm.plugin.urnmap.URNMapPlugin;
-
-@SuppressWarnings("deprecation")
-@Path("plugin/" + URNMapPlugin.ID)
-public class URNMapPluginRootResource extends AbstractPluginRootResource
-{
- public URNMapPluginRootResource() {
- super(URNMapPlugin.ID);
- //super("");
- }
-
- @Path("{engineName}/process-instance")
- public URNResource getProcessInstanceResource(@PathParam("engineName") String engineName) {
- return subResource(new URNResource(engineName), engineName);
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+
+import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource;
+import org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin;
+
+@SuppressWarnings("deprecation")
+@Path("plugin/" + URNMapPlugin.ID)
+public class URNMapPluginRootResource extends AbstractPluginRootResource
+{
+ public URNMapPluginRootResource() {
+ super(URNMapPlugin.ID);
+ //super("");
+ }
+
+ @Path("{engineName}/process-instance")
+ public URNResource getProcessInstanceResource(@PathParam("engineName") String engineName) {
+ return subResource(new URNResource(engineName), engineName);
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResource.java
index 08724db415..3dc6c249f5 100644
--- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResource.java
@@ -1,205 +1,205 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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=========================================================
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-/***
-import java.beans.Statement;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-*/
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.sql.DataSource;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-
-import org.camunda.bpm.cockpit.db.QueryParameters;
-import org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource;
-
-
-//import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
-import com.att.camunda.bpm.plugin.urnmap.db.URNData;
-import org.openecomp.mso.logger.MsoLogger;
-
-
-//public class ProcessInstanceResource extends AbstractPluginResource {
-public class URNResource extends AbstractCockpitPluginResource{
- public URNResource(String engineName) {
- super(engineName);
- }
-
- private Connection conn;
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
- @GET
- public List<URNData> getUrnDataMap()
- {
- List<URNData> list = new ArrayList();
-
- try {
-
- conn = getDBConnection();
- PreparedStatement psData = conn
- .prepareStatement("select * from ATT_URN_MAPPING order by NAME_");
-
- ResultSet r = psData.executeQuery();
-
- while(r.next())
- {
- URNData d = new URNData();
- d.setURNName(r.getString("NAME_"));
- d.setURNValue(r.getString("VALUE_"));
- d.setVer_( r.getString("REV_"));
-
- list.add(d);
- }
-
- psData.close();
- conn.close();
-
- } catch (Exception e)
- {
-
- e.printStackTrace();
- }
-
- for(URNData d: list)
- {
- msoLogger.debug( d.getURNName() + " " + d.getURNValue());
- //msoLogger.debug("Started Executing " + getTaskName());
- msoLogger.debug("Started Executing " + d.getURNName() + " " + d.getURNValue());
- }
-
- return list;
- }
-
- public List<URNData> getUrnDataMapOLD()
- {
-
- List<URNData> list = getQueryService()
- .executeQuery("cockpit.urnMap.retrieveUrnKeyValuePair", new QueryParameters<URNData>());
-
- msoLogger.debug("urnmap-plugin project - Results Retrieved: ");
- msoLogger.debug("URNName: " + " " + "URNValue: " );
-
- for(URNData d: list)
- {
- //msoLogger.debug( d.getURNName() + " " + d.getURNValue());
- msoLogger.debug( d.getURNName() + " " + d.getURNValue());
- }
-
- return list;
- }
-
- public Connection getDBConnection()
- {
- try {
-
- if(conn == null)
- {
- Context ctx = new InitialContext();
- DataSource ds = (DataSource)ctx.lookup("java:jboss/datasources/ProcessEngine");//jboss
- conn = ds.getConnection();
-
- }
-
- } catch (Exception e)
- {
-
- e.printStackTrace();
- }
-
- return conn;
- }
-
- @PUT
- public void insertNewRow(String temp)
- {
- msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp);
- msoLogger.debug("AddNewRow: EngineName ---> " + engineName);
-
- StringTokenizer st = new StringTokenizer(temp, "|");
- String key_ = "";
- String value_ = "";
-
- while(st.hasMoreTokens()) {
- key_ = st.nextToken();
- value_ = st.nextToken();
- msoLogger.debug(key_ + "\t" + value_);
- }
-
- msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_);
- final URNData nRow = new URNData();
- nRow.setVer_("1");
- final String myKey = key_;
- final String myValue = value_;
-
- msoLogger.debug("----------- START ----------------------");
- try {
-
- conn = getDBConnection();
- PreparedStatement psData = conn
- .prepareStatement("Insert into ATT_URN_MAPPING values ('" + key_ + "', '" + value_ + "', '1')");
-
- psData.executeUpdate();
-
- psData.close();
- conn.close();
- //}
-
- } catch (Exception e)
- {
-
- e.printStackTrace();
- }
- // getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class);
- }
-
- @POST
- public void getPersistData(URNData d) {
-
- //getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class);
-
- try {
-
- conn = getDBConnection();
- PreparedStatement psData = conn
- .prepareStatement("UPDATE ATT_URN_MAPPING set VALUE_ ='"+ d.getURNValue() + "' WHERE NAME_='" + d.getURNName() + "'");
-
- psData.executeUpdate();
-
- psData.close();
- conn.close();
- } catch (Exception e)
- {
-
- e.printStackTrace();
- }
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+/***
+import java.beans.Statement;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+*/
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.sql.DataSource;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+
+import org.camunda.bpm.cockpit.db.QueryParameters;
+import org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource;
+
+
+//import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
+import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData;
+import org.openecomp.mso.logger.MsoLogger;
+
+
+//public class ProcessInstanceResource extends AbstractPluginResource {
+public class URNResource extends AbstractCockpitPluginResource{
+ public URNResource(String engineName) {
+ super(engineName);
+ }
+
+ private Connection conn;
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+ @GET
+ public List<URNData> getUrnDataMap()
+ {
+ List<URNData> list = new ArrayList();
+
+ try {
+
+ conn = getDBConnection();
+ PreparedStatement psData = conn
+ .prepareStatement("select * from MSO_URN_MAPPING order by NAME_");
+
+ ResultSet r = psData.executeQuery();
+
+ while(r.next())
+ {
+ URNData d = new URNData();
+ d.setURNName(r.getString("NAME_"));
+ d.setURNValue(r.getString("VALUE_"));
+ d.setVer_( r.getString("REV_"));
+
+ list.add(d);
+ }
+
+ psData.close();
+ conn.close();
+
+ } catch (Exception e)
+ {
+
+ e.printStackTrace();
+ }
+
+ for(URNData d: list)
+ {
+ msoLogger.debug( d.getURNName() + " " + d.getURNValue());
+ //msoLogger.debug("Started Executing " + getTaskName());
+ msoLogger.debug("Started Executing " + d.getURNName() + " " + d.getURNValue());
+ }
+
+ return list;
+ }
+
+ public List<URNData> getUrnDataMapOLD()
+ {
+
+ List<URNData> list = getQueryService()
+ .executeQuery("cockpit.urnMap.retrieveUrnKeyValuePair", new QueryParameters<URNData>());
+
+ msoLogger.debug("urnmap-plugin project - Results Retrieved: ");
+ msoLogger.debug("URNName: " + " " + "URNValue: " );
+
+ for(URNData d: list)
+ {
+ //msoLogger.debug( d.getURNName() + " " + d.getURNValue());
+ msoLogger.debug( d.getURNName() + " " + d.getURNValue());
+ }
+
+ return list;
+ }
+
+ public Connection getDBConnection()
+ {
+ try {
+
+ if(conn == null)
+ {
+ Context ctx = new InitialContext();
+ DataSource ds = (DataSource)ctx.lookup("java:jboss/datasources/ProcessEngine");//jboss
+ conn = ds.getConnection();
+
+ }
+
+ } catch (Exception e)
+ {
+
+ e.printStackTrace();
+ }
+
+ return conn;
+ }
+
+ @PUT
+ public void insertNewRow(String temp)
+ {
+ msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp);
+ msoLogger.debug("AddNewRow: EngineName ---> " + engineName);
+
+ StringTokenizer st = new StringTokenizer(temp, "|");
+ String key_ = "";
+ String value_ = "";
+
+ while(st.hasMoreTokens()) {
+ key_ = st.nextToken();
+ value_ = st.nextToken();
+ msoLogger.debug(key_ + "\t" + value_);
+ }
+
+ msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_);
+ final URNData nRow = new URNData();
+ nRow.setVer_("1");
+ final String myKey = key_;
+ final String myValue = value_;
+
+ msoLogger.debug("----------- START ----------------------");
+ try {
+
+ conn = getDBConnection();
+ PreparedStatement psData = conn
+ .prepareStatement("Insert into MSO_URN_MAPPING values ('" + key_ + "', '" + value_ + "', '1')");
+
+ psData.executeUpdate();
+
+ psData.close();
+ conn.close();
+ //}
+
+ } catch (Exception e)
+ {
+
+ e.printStackTrace();
+ }
+ // getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class);
+ }
+
+ @POST
+ public void getPersistData(URNData d) {
+
+ //getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class);
+
+ try {
+
+ conn = getDBConnection();
+ PreparedStatement psData = conn
+ .prepareStatement("UPDATE MSO_URN_MAPPING set VALUE_ ='"+ d.getURNValue() + "' WHERE NAME_='" + d.getURNName() + "'");
+
+ psData.executeUpdate();
+
+ psData.close();
+ conn.close();
+ } catch (Exception e)
+ {
+
+ e.printStackTrace();
+ }
+
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin b/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin
index 1e207d8022..9a5055af22 100644
--- a/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin
+++ b/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin
@@ -1 +1 @@
-com.att.camunda.bpm.plugin.urnmap.URNMapPlugin \ No newline at end of file
+org.openecomp.camunda.bpm.plugin.urnmap.URNMapPlugin \ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/src/main/resources/mappings.xml b/bpmn/MSOURN-plugin/src/main/resources/mappings.xml
index d0a9177b7e..c66704ed15 100644
--- a/bpmn/MSOURN-plugin/src/main/resources/mappings.xml
+++ b/bpmn/MSOURN-plugin/src/main/resources/mappings.xml
@@ -1,32 +1,32 @@
-<?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=========================================================
- -->
-
-
-<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
-
-<configuration>
- <settings>
- <setting name="lazyLoadingEnabled" value="false" />
- </settings>
- <mappers>
- <mapper resource="com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml" />
- </mappers>
-</configuration>
+<?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=========================================================
+ -->
+
+
+<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
+
+<configuration>
+ <settings>
+ <setting name="lazyLoadingEnabled" value="false" />
+ </settings>
+ <mappers>
+ <mapper resource="org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml" />
+ </mappers>
+</configuration>
diff --git a/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml b/bpmn/MSOURN-plugin/src/main/resources/org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml
index ed610305ac..d0b58618e4 100644
--- a/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml
+++ b/bpmn/MSOURN-plugin/src/main/resources/org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml
@@ -23,39 +23,39 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cockpit.urnMap">
- <resultMap id="urnDataMap" type="com.att.camunda.bpm.plugin.urnmap.db.URNData">
+ <resultMap id="urnDataMap" type="org.openecomp.camunda.bpm.plugin.urnmap.db.URNData">
<result property="URNName" column="URNNAME" jdbcType="VARCHAR"/>
<result property="URNValue" column="URNVALUE" jdbcType="VARCHAR" />
</resultMap>
<select id="retrieveUrnKeyValuePair" resultMap="urnDataMap">
- select NAME_ URNName, VALUE_ URNValue from ATT_URN_MAPPING
+ select NAME_ URNName, VALUE_ URNValue from MSO_URN_MAPPING
</select>
<!-- INSERT cockpit.InsertURNData keyProperty="NAME_" -->
- <resultMap id="insertNewRow" type="com.att.camunda.bpm.plugin.urnmap.db.URNData">
+ <resultMap id="insertNewRow" type="org.openecomp.camunda.bpm.plugin.urnmap.db.URNData">
<result property="URNName" column="NAME_" jdbcType="VARCHAR" />
<result property="URNValue" column="VALUE_" jdbcType="VARCHAR" />
<result property="1" column="REV_" jdbcType="INTEGER"/>
</resultMap>
- <insert id="insertNewRow" parameterType="com.att.camunda.bpm.plugin.urnmap.db.URNData">
- insert into ATT_URN_MAPPING (NAME_, VALUE_, REV_)
+ <insert id="insertNewRow" parameterType="org.openecomp.camunda.bpm.plugin.urnmap.db.URNData">
+ insert into MSO_URN_MAPPING (NAME_, VALUE_, REV_)
values (
#{URNName}, #{URNValue}, 1
)
</insert>
<!-- UPDATE cockpit.InsertURNData -->
- <resultMap id="saveURNMappingDataMap" type="com.att.camunda.bpm.plugin.urnmap.db.URNData">
+ <resultMap id="saveURNMappingDataMap" type="org.openecomp.camunda.bpm.plugin.urnmap.db.URNData">
<result property="URNName" column="NAME_" jdbcType="VARCHAR" />
<result property="URNValue" column="VALUE_" jdbcType="VARCHAR" />
<result property="1" column="REV_" jdbcType="INTEGER"/>
</resultMap>
<update id="persistURNData">
- update ATT_URN_MAPPING set
+ update MSO_URN_MAPPING set
NAME_ = #{URNName},
VALUE_ = #{URNValue},
REV_ = 1
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTest.java
index 0377b444be..e8d1af566a 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTest.java
@@ -1,40 +1,43 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 13:49:02 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.util.List;
-import java.util.Set;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class URNMapPluginESTest extends URNMapPluginESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
- Set<Class<?>> set0 = uRNMapPlugin0.getResourceClasses();
- assertFalse(set0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
- String string0 = uRNMapPlugin0.getId();
- assertEquals("urnMap-plugin", string0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
- List<String> list0 = uRNMapPlugin0.getMappingFiles();
- assertEquals(1, list0.size());
- }
-}
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:49:02 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+import java.util.Set;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+import org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class URNMapPluginESTest extends URNMapPluginESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test0() throws Throwable {
+ URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
+ Set<Class<?>> set0 = uRNMapPlugin0.getResourceClasses();
+ assertFalse(set0.isEmpty());
+ }
+
+ @Test(timeout = 4000)
+ public void test1() throws Throwable {
+ URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
+ String string0 = uRNMapPlugin0.getId();
+ assertEquals("urnMap-plugin", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test2() throws Throwable {
+ URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
+ List<String> list0 = uRNMapPlugin0.getMappingFiles();
+ assertEquals(1, list0.size());
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTestscaffolding.java
index 472a2bc7e3..8a24352bd4 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTestscaffolding.java
@@ -1,91 +1,91 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 13:49:02 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class URNMapPluginESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.webapp.plugin.spi.impl.AbstractAppPlugin",
- "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
- "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
- "org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin",
- "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
- "org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin",
- "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource",
- "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
- "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin"
- );
- }
-}
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:49:02 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNMapPluginESTestscaffolding {
+
+ @org.junit.Rule
+ public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+ private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
+
+ private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+ @BeforeClass
+ public static void initEvoSuiteFramework() {
+ org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin";
+ org.evosuite.runtime.GuiSupport.initialize();
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
+ org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
+ org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
+ org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
+ org.evosuite.runtime.classhandling.JDKClassResetter.init();
+ initializeClasses();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ }
+
+ @AfterClass
+ public static void clearEvoSuiteFramework(){
+ Sandbox.resetDefaultSecurityManager();
+ java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
+ }
+
+ @Before
+ public void initTestCase(){
+ threadStopper.storeCurrentThreads();
+ threadStopper.startRecordingTime();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
+ org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
+
+ org.evosuite.runtime.GuiSupport.setHeadless();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ org.evosuite.runtime.agent.InstrumentingAgent.activate();
+ }
+
+ @After
+ public void doneWithTestCase(){
+ threadStopper.killAndJoinClientThreads();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
+ org.evosuite.runtime.classhandling.JDKClassResetter.reset();
+ resetClasses();
+ org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
+ org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
+ org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
+ }
+
+
+ private static void initializeClasses() {
+ org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginESTestscaffolding.class.getClassLoader() ,
+ "org.camunda.bpm.webapp.plugin.spi.impl.AbstractAppPlugin",
+ "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
+ "org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin",
+ "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
+ "org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource",
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin"
+ );
+ }
+
+ private static void resetClasses() {
+ org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginESTestscaffolding.class.getClassLoader());
+
+ org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+ "org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin"
+ );
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTest.java
index c7b241c2d5..dedd6b37fc 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTest.java
@@ -1,86 +1,88 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 13:48:50 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class URNDataESTest extends URNDataESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- URNData uRNData0 = new URNData();
- uRNData0.setVer_("yE)");
- String string0 = uRNData0.getVer_();
- assertEquals("yE)", string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- URNData uRNData0 = new URNData();
- uRNData0.setURNValue("Dw]M@,~.D");
- String string0 = uRNData0.getURNValue();
- assertEquals("Dw]M@,~.D", string0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- URNData uRNData0 = new URNData();
- uRNData0.setURNName("");
- String string0 = uRNData0.getURNName();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- URNData uRNData0 = new URNData();
- String string0 = uRNData0.getVer_();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- URNData uRNData0 = new URNData();
- String string0 = uRNData0.getURNValue();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- URNData uRNData0 = new URNData();
- String string0 = uRNData0.getURNName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- URNData uRNData0 = new URNData();
- uRNData0.setURNValue("");
- String string0 = uRNData0.getURNValue();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- URNData uRNData0 = new URNData();
- uRNData0.setVer_("");
- String string0 = uRNData0.getVer_();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- URNData uRNData0 = new URNData();
- uRNData0.setURNName("2Gv9h[mmV=,z\"VSY`t)");
- String string0 = uRNData0.getURNName();
- assertEquals("2Gv9h[mmV=,z\"VSY`t)", string0);
- }
-}
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:48:50 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class URNDataESTest extends URNDataESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test0() throws Throwable {
+ URNData uRNData0 = new URNData();
+ uRNData0.setVer_("yE)");
+ String string0 = uRNData0.getVer_();
+ assertEquals("yE)", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test1() throws Throwable {
+ URNData uRNData0 = new URNData();
+ uRNData0.setURNValue("Dw]M@,~.D");
+ String string0 = uRNData0.getURNValue();
+ assertEquals("Dw]M@,~.D", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test2() throws Throwable {
+ URNData uRNData0 = new URNData();
+ uRNData0.setURNName("");
+ String string0 = uRNData0.getURNName();
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test3() throws Throwable {
+ URNData uRNData0 = new URNData();
+ String string0 = uRNData0.getVer_();
+ assertNull(string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test4() throws Throwable {
+ URNData uRNData0 = new URNData();
+ String string0 = uRNData0.getURNValue();
+ assertNull(string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test5() throws Throwable {
+ URNData uRNData0 = new URNData();
+ String string0 = uRNData0.getURNName();
+ assertNull(string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test6() throws Throwable {
+ URNData uRNData0 = new URNData();
+ uRNData0.setURNValue("");
+ String string0 = uRNData0.getURNValue();
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test7() throws Throwable {
+ URNData uRNData0 = new URNData();
+ uRNData0.setVer_("");
+ String string0 = uRNData0.getVer_();
+ assertEquals("", string0);
+ }
+
+ @Test(timeout = 4000)
+ public void test8() throws Throwable {
+ URNData uRNData0 = new URNData();
+ uRNData0.setURNName("2Gv9h[mmV=,z\"VSY`t)");
+ String string0 = uRNData0.getURNName();
+ assertEquals("2Gv9h[mmV=,z\"VSY`t)", string0);
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTestscaffolding.java
index 7ae4fabb38..eef0d9b0aa 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTestscaffolding.java
@@ -1,78 +1,78 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 13:48:50 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class URNDataESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.db.URNData";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNDataESTestscaffolding.class.getClassLoader() ,
- "com.att.camunda.bpm.plugin.urnmap.db.URNData"
- );
- }
-
- private static void resetClasses() {
- }
-}
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:48:50 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNDataESTestscaffolding {
+
+ @org.junit.Rule
+ public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+ private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
+
+ private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+ @BeforeClass
+ public static void initEvoSuiteFramework() {
+ org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData";
+ org.evosuite.runtime.GuiSupport.initialize();
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
+ org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
+ org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
+ org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
+ org.evosuite.runtime.classhandling.JDKClassResetter.init();
+ initializeClasses();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ }
+
+ @AfterClass
+ public static void clearEvoSuiteFramework(){
+ Sandbox.resetDefaultSecurityManager();
+ java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
+ }
+
+ @Before
+ public void initTestCase(){
+ threadStopper.storeCurrentThreads();
+ threadStopper.startRecordingTime();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
+ org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
+
+ org.evosuite.runtime.GuiSupport.setHeadless();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ org.evosuite.runtime.agent.InstrumentingAgent.activate();
+ }
+
+ @After
+ public void doneWithTestCase(){
+ threadStopper.killAndJoinClientThreads();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
+ org.evosuite.runtime.classhandling.JDKClassResetter.reset();
+ resetClasses();
+ org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
+ org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
+ org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
+ }
+
+
+ private static void initializeClasses() {
+ org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNDataESTestscaffolding.class.getClassLoader() ,
+ "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData"
+ );
+ }
+
+ private static void resetClasses() {
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTest.java
index 9c71cdebf3..b79468cfd0 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTest.java
@@ -1,34 +1,36 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 13:47:07 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class URNServiceESTest extends URNServiceESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- URNService uRNService0 = new URNService();
- // Undeclared exception!
- try {
- uRNService0.getProperties();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("com.att.camunda.bpm.plugin.urnmap.db.URNService", e);
- }
- }
-}
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:47:07 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class URNServiceESTest extends URNServiceESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test0() throws Throwable {
+ URNService uRNService0 = new URNService();
+ // Undeclared exception!
+ try {
+ uRNService0.getProperties();
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService", e);
+ }
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTestscaffolding.java
index d6ce3f31b4..dbbce2d67b 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTestscaffolding.java
@@ -1,97 +1,97 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 13:47:07 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.db;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class URNServiceESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.db.URNService";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNServiceESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.engine.ProcessEngineException",
- "com.att.camunda.bpm.plugin.urnmap.db.URNService",
- "org.camunda.bpm.engine.impl.interceptor.Command",
- "org.camunda.bpm.engine.ClassLoadingException",
- "org.camunda.bpm.engine.ProcessEngine",
- "org.camunda.bpm.engine.ProcessEngines",
- "org.camunda.bpm.engine.ProcessEngineInfo",
- "org.camunda.bpm.application.ProcessApplicationUnavailableException",
- "org.camunda.bpm.engine.impl.ProcessEngineImpl",
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.impl.util.ReflectUtil",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "com.att.camunda.bpm.plugin.urnmap.db.URNData"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNServiceESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.camunda.bpm.engine.impl.context.Context",
- "org.camunda.bpm.engine.ProcessEngines",
- "org.camunda.bpm.engine.impl.util.ReflectUtil"
- );
- }
-}
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:47:07 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.db;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNServiceESTestscaffolding {
+
+ @org.junit.Rule
+ public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+ private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
+
+ private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+ @BeforeClass
+ public static void initEvoSuiteFramework() {
+ org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService";
+ org.evosuite.runtime.GuiSupport.initialize();
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
+ org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
+ org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
+ org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
+ org.evosuite.runtime.classhandling.JDKClassResetter.init();
+ initializeClasses();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ }
+
+ @AfterClass
+ public static void clearEvoSuiteFramework(){
+ Sandbox.resetDefaultSecurityManager();
+ java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
+ }
+
+ @Before
+ public void initTestCase(){
+ threadStopper.storeCurrentThreads();
+ threadStopper.startRecordingTime();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
+ org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
+
+ org.evosuite.runtime.GuiSupport.setHeadless();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ org.evosuite.runtime.agent.InstrumentingAgent.activate();
+ }
+
+ @After
+ public void doneWithTestCase(){
+ threadStopper.killAndJoinClientThreads();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
+ org.evosuite.runtime.classhandling.JDKClassResetter.reset();
+ resetClasses();
+ org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
+ org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
+ org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
+ }
+
+
+ private static void initializeClasses() {
+ org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNServiceESTestscaffolding.class.getClassLoader() ,
+ "org.camunda.bpm.engine.ProcessEngineException",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService",
+ "org.camunda.bpm.engine.impl.interceptor.Command",
+ "org.camunda.bpm.engine.ClassLoadingException",
+ "org.camunda.bpm.engine.ProcessEngine",
+ "org.camunda.bpm.engine.ProcessEngines",
+ "org.camunda.bpm.engine.ProcessEngineInfo",
+ "org.camunda.bpm.application.ProcessApplicationUnavailableException",
+ "org.camunda.bpm.engine.impl.ProcessEngineImpl",
+ "org.camunda.bpm.engine.impl.context.Context",
+ "org.camunda.bpm.engine.impl.util.ReflectUtil",
+ "org.camunda.bpm.engine.ProcessEngineServices",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData"
+ );
+ }
+
+ private static void resetClasses() {
+ org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNServiceESTestscaffolding.class.getClassLoader());
+
+ org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+ "org.camunda.bpm.engine.impl.context.Context",
+ "org.camunda.bpm.engine.ProcessEngines",
+ "org.camunda.bpm.engine.impl.util.ReflectUtil"
+ );
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTest.java
index 56d7283026..21ca18c3f7 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTest.java
@@ -1,85 +1,88 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 13:45:16 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import com.att.camunda.bpm.plugin.urnmap.db.URNData;
-
-import java.util.NoSuchElementException;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class ProcessInstanceResourceESTest extends ProcessInstanceResourceESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource((String) null);
- // Undeclared exception!
- try {
- processInstanceResource0.getUrnDataMap();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.camunda.bpm.cockpit.Cockpit", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("DEUtDF$-rb|D]l9");
- // Undeclared exception!
- try {
- processInstanceResource0.insertNewRow("DEUtDF$-rb|D]l9");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.camunda.bpm.cockpit.Cockpit", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- URNData uRNData0 = new URNData();
- ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("|");
- // Undeclared exception!
- try {
- processInstanceResource0.getPersistData(uRNData0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.camunda.bpm.cockpit.Cockpit", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("xGUKD= Ea6(aT");
- // Undeclared exception!
- try {
- processInstanceResource0.insertNewRow("xGUKD= Ea6(aT");
- fail("Expecting exception: NoSuchElementException");
-
- } catch(NoSuchElementException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.util.StringTokenizer", e);
- }
- }
-}
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:45:16 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.util.NoSuchElementException;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData;
+import org.openecomp.camunda.bpmn.plugin.urnmap.resources.ProcessInstanceResource;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class ProcessInstanceResourceESTest extends ProcessInstanceResourceESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test0() throws Throwable {
+ ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource((String) null);
+ // Undeclared exception!
+ try {
+ processInstanceResource0.getUrnDataMap();
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test1() throws Throwable {
+ ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("DEUtDF$-rb|D]l9");
+ // Undeclared exception!
+ try {
+ processInstanceResource0.insertNewRow("DEUtDF$-rb|D]l9");
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test2() throws Throwable {
+ URNData uRNData0 = new URNData();
+ ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("|");
+ // Undeclared exception!
+ try {
+ processInstanceResource0.getPersistData(uRNData0);
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test3() throws Throwable {
+ ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("xGUKD= Ea6(aT");
+ // Undeclared exception!
+ try {
+ processInstanceResource0.insertNewRow("xGUKD= Ea6(aT");
+ fail("Expecting exception: NoSuchElementException");
+
+ } catch(NoSuchElementException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("java.util.StringTokenizer", e);
+ }
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java
index bb115f1586..4408adac67 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java
@@ -1,94 +1,94 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 13:45:16 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class ProcessInstanceResourceESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.ProcessInstanceResource";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ProcessInstanceResourceESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
- "org.camunda.bpm.cockpit.CockpitRuntimeDelegate",
- "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
- "org.camunda.bpm.webapp.AppRuntimeDelegate",
- "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource",
- "org.camunda.bpm.cockpit.db.QueryService",
- "org.camunda.bpm.engine.ProcessEngine",
- "com.att.camunda.bpm.plugin.urnmap.resources.ProcessInstanceResource",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "org.camunda.bpm.cockpit.db.CommandExecutor",
- "org.camunda.bpm.cockpit.Cockpit",
- "com.att.camunda.bpm.plugin.urnmap.db.URNData"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ProcessInstanceResourceESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.camunda.bpm.cockpit.Cockpit"
- );
- }
-}
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:45:16 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ProcessInstanceResourceESTestscaffolding {
+
+ @org.junit.Rule
+ public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+ private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
+
+ private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+ @BeforeClass
+ public static void initEvoSuiteFramework() {
+ org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.resources.ProcessInstanceResource";
+ org.evosuite.runtime.GuiSupport.initialize();
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
+ org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
+ org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
+ org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
+ org.evosuite.runtime.classhandling.JDKClassResetter.init();
+ initializeClasses();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ }
+
+ @AfterClass
+ public static void clearEvoSuiteFramework(){
+ Sandbox.resetDefaultSecurityManager();
+ java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
+ }
+
+ @Before
+ public void initTestCase(){
+ threadStopper.storeCurrentThreads();
+ threadStopper.startRecordingTime();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
+ org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
+
+ org.evosuite.runtime.GuiSupport.setHeadless();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ org.evosuite.runtime.agent.InstrumentingAgent.activate();
+ }
+
+ @After
+ public void doneWithTestCase(){
+ threadStopper.killAndJoinClientThreads();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
+ org.evosuite.runtime.classhandling.JDKClassResetter.reset();
+ resetClasses();
+ org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
+ org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
+ org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
+ }
+
+
+ private static void initializeClasses() {
+ org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ProcessInstanceResourceESTestscaffolding.class.getClassLoader() ,
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
+ "org.camunda.bpm.cockpit.CockpitRuntimeDelegate",
+ "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
+ "org.camunda.bpm.webapp.AppRuntimeDelegate",
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource",
+ "org.camunda.bpm.cockpit.db.QueryService",
+ "org.camunda.bpm.engine.ProcessEngine",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.resources.ProcessInstanceResource",
+ "org.camunda.bpm.engine.ProcessEngineServices",
+ "org.camunda.bpm.cockpit.db.CommandExecutor",
+ "org.camunda.bpm.cockpit.Cockpit",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData"
+ );
+ }
+
+ private static void resetClasses() {
+ org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ProcessInstanceResourceESTestscaffolding.class.getClassLoader());
+
+ org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+ "org.camunda.bpm.cockpit.Cockpit"
+ );
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java
index ba562f9bde..c1dccfcb2b 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java
@@ -1,38 +1,42 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 13:48:27 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import javax.servlet.ServletContext;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.UriInfo;
-import org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.evosuite.runtime.javaee.injection.Injector;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class URNMapPluginRootResourceESTest extends URNMapPluginRootResourceESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- URNMapPluginRootResource uRNMapPluginRootResource0 = new URNMapPluginRootResource();
- HttpHeaders httpHeaders0 = mock(HttpHeaders.class, new ViolatedAssumptionAnswer());
- Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "headers", (Object) httpHeaders0);
- ServletContext servletContext0 = mock(ServletContext.class, new ViolatedAssumptionAnswer());
- Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "servletContext", (Object) servletContext0);
- UriInfo uriInfo0 = mock(UriInfo.class, new ViolatedAssumptionAnswer());
- Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "uriInfo", (Object) uriInfo0);
- Injector.validateBean(uRNMapPluginRootResource0, (Class<?>) URNMapPluginRootResource.class);
- URNResource uRNResource0 = uRNMapPluginRootResource0.getProcessInstanceResource("}+njRy')#n?K^");
- assertNotNull(uRNResource0);
- }
-}
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:48:27 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.evosuite.runtime.javaee.injection.Injector;
+import org.junit.runner.RunWith;
+import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource;
+import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class URNMapPluginRootResourceESTest extends URNMapPluginRootResourceESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test0() throws Throwable {
+ URNMapPluginRootResource uRNMapPluginRootResource0 = new URNMapPluginRootResource();
+ HttpHeaders httpHeaders0 = mock(HttpHeaders.class, new ViolatedAssumptionAnswer());
+ Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "headers", (Object) httpHeaders0);
+ ServletContext servletContext0 = mock(ServletContext.class, new ViolatedAssumptionAnswer());
+ Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "servletContext", (Object) servletContext0);
+ UriInfo uriInfo0 = mock(UriInfo.class, new ViolatedAssumptionAnswer());
+ Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "uriInfo", (Object) uriInfo0);
+ Injector.validateBean(uRNMapPluginRootResource0, (Class<?>) URNMapPluginRootResource.class);
+ URNResource uRNResource0 = uRNMapPluginRootResource0.getProcessInstanceResource("}+njRy')#n?K^");
+ assertNotNull(uRNResource0);
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java
index 27070528cf..1033de9c54 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java
@@ -1,119 +1,119 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 13:48:27 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class URNMapPluginRootResourceESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader() ,
- "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
- "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
- "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.camunda.bpm.cockpit.Cockpit",
- "com.att.eelf.configuration.EELFLogger",
- "org.camunda.bpm.engine.rest.exception.RestException",
- "com.att.eelf.configuration.SLF4jWrapper",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.camunda.bpm.plugin.urnmap.db.URNData",
- "org.openecomp.mso.logger.MsoLogger",
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
- "org.openecomp.mso.entity.MsoRequest",
- "org.camunda.bpm.webapp.AppRuntimeDelegate",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "com.att.eelf.configuration.EELFManager",
- "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource",
- "com.att.eelf.i18n.EELFMsgs",
- "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
- "org.openecomp.mso.logger.MsoLogger$Catalog"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.camunda.bpm.cockpit.Cockpit",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
- "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource"
- );
- }
-}
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:48:27 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNMapPluginRootResourceESTestscaffolding {
+
+ @org.junit.Rule
+ public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+ private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
+
+ private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+ @BeforeClass
+ public static void initEvoSuiteFramework() {
+ org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource";
+ org.evosuite.runtime.GuiSupport.initialize();
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
+ org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
+ org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
+ org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
+ org.evosuite.runtime.classhandling.JDKClassResetter.init();
+ initializeClasses();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ }
+
+ @AfterClass
+ public static void clearEvoSuiteFramework(){
+ Sandbox.resetDefaultSecurityManager();
+ java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
+ }
+
+ @Before
+ public void initTestCase(){
+ threadStopper.storeCurrentThreads();
+ threadStopper.startRecordingTime();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
+ org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
+
+ org.evosuite.runtime.GuiSupport.setHeadless();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ org.evosuite.runtime.agent.InstrumentingAgent.activate();
+ }
+
+ @After
+ public void doneWithTestCase(){
+ threadStopper.killAndJoinClientThreads();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
+ org.evosuite.runtime.classhandling.JDKClassResetter.reset();
+ resetClasses();
+ org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
+ org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
+ org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
+ }
+
+
+ private static void initializeClasses() {
+ org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader() ,
+ "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
+ "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource",
+ "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+ "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
+ "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+ "org.camunda.bpm.cockpit.Cockpit",
+ "com.att.eelf.configuration.EELFLogger",
+ "org.camunda.bpm.engine.rest.exception.RestException",
+ "com.att.eelf.configuration.SLF4jWrapper",
+ "com.att.eelf.i18n.EELFResourceManager",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData",
+ "org.openecomp.mso.logger.MsoLogger",
+ "org.openecomp.mso.logger.MessageEnum",
+ "com.att.eelf.i18n.EELFResolvableErrorEnum",
+ "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
+ "org.openecomp.mso.entity.MsoRequest",
+ "org.camunda.bpm.webapp.AppRuntimeDelegate",
+ "org.openecomp.mso.logger.MsoLogger$StatusCode",
+ "com.att.eelf.configuration.EELFManager",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource",
+ "com.att.eelf.i18n.EELFMsgs",
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
+ "com.att.eelf.configuration.EELFLogger$Level",
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
+ "org.openecomp.mso.logger.MsoLogger$Catalog"
+ );
+ }
+
+ private static void resetClasses() {
+ org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader());
+
+ org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+ "org.camunda.bpm.cockpit.Cockpit",
+ "org.openecomp.mso.logger.MsoLogger$Catalog",
+ "org.openecomp.mso.logger.MsoLogger",
+ "com.att.eelf.i18n.EELFResourceManager",
+ "com.att.eelf.i18n.EELFMsgs",
+ "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+ "com.att.eelf.configuration.EELFLogger$Level",
+ "com.att.eelf.configuration.EELFManager",
+ "org.openecomp.mso.logger.MessageEnum",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource",
+ "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource"
+ );
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTest.java
index 2c0a5eaf67..ca0426339a 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTest.java
@@ -1,162 +1,165 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 13:47:41 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import com.att.camunda.bpm.plugin.urnmap.db.URNData;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.List;
-import java.util.NoSuchElementException;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class URNResourceESTest extends URNResourceESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- URNResource uRNResource0 = new URNResource("pE|b");
- PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
- doReturn((-3202)).when(preparedStatement0).executeUpdate();
- Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
- doReturn("").when(connection0).toString();
- doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
- PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
- uRNResource0.insertNewRow("pE|b");
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- URNResource uRNResource0 = new URNResource("pE|b");
- Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(connection0).toString();
- doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString());
- PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
- uRNResource0.insertNewRow("pE|b");
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- URNResource uRNResource0 = new URNResource("");
- List<URNData> list0 = uRNResource0.getUrnDataMap();
- assertTrue(list0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- URNResource uRNResource0 = new URNResource("pE|b");
- PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
- doReturn((-3202)).when(preparedStatement0).executeUpdate();
- Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
- doReturn("").when(connection0).toString();
- doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
- PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
- URNData uRNData0 = new URNData();
- uRNResource0.getPersistData(uRNData0);
- assertNull(uRNData0.getVer_());
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- URNResource uRNResource0 = new URNResource("pE|b");
- Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(connection0).toString();
- doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString());
- PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
- URNData uRNData0 = new URNData();
- uRNResource0.getPersistData(uRNData0);
- assertNull(uRNData0.getVer_());
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- URNResource uRNResource0 = new URNResource("LR6iOYH?>Bg%1-x=lK");
- // Undeclared exception!
- try {
- uRNResource0.insertNewRow("LR6iOYH?>Bg%1-x=lK");
- fail("Expecting exception: NoSuchElementException");
-
- } catch(NoSuchElementException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.util.StringTokenizer", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- URNResource uRNResource0 = new URNResource("");
- // Undeclared exception!
- try {
- uRNResource0.insertNewRow((String) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.util.StringTokenizer", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- URNResource uRNResource0 = new URNResource("pE|b");
- // Undeclared exception!
- try {
- uRNResource0.getUrnDataMapOLD();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.camunda.bpm.cockpit.Cockpit", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- URNResource uRNResource0 = new URNResource("");
- Connection connection0 = uRNResource0.getDBConnection();
- assertNull(connection0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- URNResource uRNResource0 = new URNResource("pE|b");
- Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(connection0).toString();
- PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
- Connection connection1 = uRNResource0.getDBConnection();
- assertSame(connection1, connection0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- URNResource uRNResource0 = new URNResource("pE|b");
- ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer());
- doReturn(false).when(resultSet0).next();
- PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
- doReturn(resultSet0).when(preparedStatement0).executeQuery();
- Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
- doReturn("").when(connection0).toString();
- doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
- PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
- List<URNData> list0 = uRNResource0.getUrnDataMap();
- assertTrue(list0.isEmpty());
- }
-}
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:47:41 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData;
+import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class URNResourceESTest extends URNResourceESTestscaffolding {
+
+ @Test(timeout = 4000)
+ public void test00() throws Throwable {
+ URNResource uRNResource0 = new URNResource("pE|b");
+ PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
+ doReturn((-3202)).when(preparedStatement0).executeUpdate();
+ Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+ doReturn("").when(connection0).toString();
+ doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
+ PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+ uRNResource0.insertNewRow("pE|b");
+ }
+
+ @Test(timeout = 4000)
+ public void test01() throws Throwable {
+ URNResource uRNResource0 = new URNResource("pE|b");
+ Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+ doReturn((String) null).when(connection0).toString();
+ doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString());
+ PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+ uRNResource0.insertNewRow("pE|b");
+ }
+
+ @Test(timeout = 4000)
+ public void test02() throws Throwable {
+ URNResource uRNResource0 = new URNResource("");
+ List<URNData> list0 = uRNResource0.getUrnDataMap();
+ assertTrue(list0.isEmpty());
+ }
+
+ @Test(timeout = 4000)
+ public void test03() throws Throwable {
+ URNResource uRNResource0 = new URNResource("pE|b");
+ PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
+ doReturn((-3202)).when(preparedStatement0).executeUpdate();
+ Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+ doReturn("").when(connection0).toString();
+ doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
+ PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+ URNData uRNData0 = new URNData();
+ uRNResource0.getPersistData(uRNData0);
+ assertNull(uRNData0.getVer_());
+ }
+
+ @Test(timeout = 4000)
+ public void test04() throws Throwable {
+ URNResource uRNResource0 = new URNResource("pE|b");
+ Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+ doReturn((String) null).when(connection0).toString();
+ doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString());
+ PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+ URNData uRNData0 = new URNData();
+ uRNResource0.getPersistData(uRNData0);
+ assertNull(uRNData0.getVer_());
+ }
+
+ @Test(timeout = 4000)
+ public void test05() throws Throwable {
+ URNResource uRNResource0 = new URNResource("LR6iOYH?>Bg%1-x=lK");
+ // Undeclared exception!
+ try {
+ uRNResource0.insertNewRow("LR6iOYH?>Bg%1-x=lK");
+ fail("Expecting exception: NoSuchElementException");
+
+ } catch(NoSuchElementException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("java.util.StringTokenizer", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test06() throws Throwable {
+ URNResource uRNResource0 = new URNResource("");
+ // Undeclared exception!
+ try {
+ uRNResource0.insertNewRow((String) null);
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("java.util.StringTokenizer", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test07() throws Throwable {
+ URNResource uRNResource0 = new URNResource("pE|b");
+ // Undeclared exception!
+ try {
+ uRNResource0.getUrnDataMapOLD();
+ fail("Expecting exception: NullPointerException");
+
+ } catch(NullPointerException e) {
+ //
+ // no message in exception (getMessage() returned null)
+ //
+ verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+ }
+ }
+
+ @Test(timeout = 4000)
+ public void test08() throws Throwable {
+ URNResource uRNResource0 = new URNResource("");
+ Connection connection0 = uRNResource0.getDBConnection();
+ assertNull(connection0);
+ }
+
+ @Test(timeout = 4000)
+ public void test09() throws Throwable {
+ URNResource uRNResource0 = new URNResource("pE|b");
+ Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+ doReturn((String) null).when(connection0).toString();
+ PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+ Connection connection1 = uRNResource0.getDBConnection();
+ assertSame(connection1, connection0);
+ }
+
+ @Test(timeout = 4000)
+ public void test10() throws Throwable {
+ URNResource uRNResource0 = new URNResource("pE|b");
+ ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer());
+ doReturn(false).when(resultSet0).next();
+ PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
+ doReturn(resultSet0).when(preparedStatement0).executeQuery();
+ Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+ doReturn("").when(connection0).toString();
+ doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
+ PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+ List<URNData> list0 = uRNResource0.getUrnDataMap();
+ assertTrue(list0.isEmpty());
+ }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTestscaffolding.java
index 885426f3c8..33171b951e 100644
--- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java
+++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTestscaffolding.java
@@ -1,400 +1,400 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 13:47:41 GMT 2016
- */
-
-package com.att.camunda.bpm.plugin.urnmap.resources;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class URNResourceESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNResource";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNResourceESTestscaffolding.class.getClassLoader() ,
- "org.h2.store.LobStorage",
- "com.mysql.jdbc.VersionedStringProperty",
- "com.mysql.jdbc.StatementInterceptorV2",
- "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty",
- "org.h2.engine.SessionInterface",
- "org.h2.index.BaseIndex",
- "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty",
- "org.h2.store.fs.FileNioMemData",
- "org.h2.store.fs.FileNioMem",
- "org.h2.store.fs.FilePathCrypt$FileCrypt",
- "org.h2.result.Row",
- "org.h2.engine.RightOwner",
- "org.h2.table.TableView",
- "com.mysql.jdbc.JDBC4ClientInfoProvider",
- "com.mysql.jdbc.CachedResultSetMetaData",
- "org.h2.store.fs.FileMem$1",
- "com.mysql.jdbc.ConnectionFeatureNotAvailableException",
- "org.h2.security.BlockCipher",
- "org.h2.command.CommandInterface",
- "com.mysql.jdbc.MysqlIO",
- "com.mysql.jdbc.Connection",
- "com.att.eelf.i18n.EELFMsgs",
- "com.mysql.jdbc.ConnectionPropertiesImpl",
- "org.h2.constant.DbSettings",
- "com.mysql.jdbc.SingleByteCharsetConverter",
- "com.mysql.jdbc.PingTarget",
- "org.h2.index.PageIndex",
- "org.h2.util.BitField",
- "org.h2.value.ValueNull",
- "org.h2.value.ValueShort",
- "com.mysql.jdbc.SocketFactory",
- "org.h2.value.ValueDecimal",
- "com.mysql.jdbc.PacketTooBigException",
- "com.mysql.jdbc.log.StandardLogger",
- "com.mysql.jdbc.ConnectionImpl$3",
- "com.mysql.jdbc.ConnectionImpl$2",
- "com.mysql.jdbc.ConnectionImpl$5",
- "com.mysql.jdbc.ConnectionImpl$4",
- "com.mysql.jdbc.ConnectionImpl$7",
- "com.mysql.jdbc.ConnectionImpl$6",
- "org.h2.util.SmallLRUCache",
- "org.h2.mvstore.Chunk",
- "com.mysql.jdbc.ConnectionImpl$9",
- "com.mysql.jdbc.ConnectionImpl$8",
- "com.mysql.jdbc.log.Log",
- "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty",
- "com.mysql.jdbc.StringUtils",
- "org.h2.mvstore.MVStore",
- "org.h2.engine.DbObjectBase",
- "org.h2.store.FileLock",
- "com.mysql.jdbc.ResultSetImpl",
- "org.h2.schema.Sequence",
- "org.h2.value.Value",
- "org.h2.store.fs.FilePathMem",
- "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty",
- "org.h2.store.fs.FilePath",
- "org.h2.engine.DatabaseCloser",
- "org.h2.expression.ExpressionColumn",
- "com.mysql.jdbc.Statement",
- "com.mysql.jdbc.Buffer",
- "org.h2.store.fs.FilePathNioMem",
- "com.mysql.jdbc.ParameterBindings",
- "org.h2.security.SecureFileStore",
- "org.h2.store.fs.FileMem",
- "com.mysql.jdbc.BufferRow",
- "org.h2.expression.Expression",
- "org.h2.store.fs.FileSplit",
- "org.h2.util.Utils$1",
- "org.h2.value.CompareMode",
- "org.h2.util.Utils",
- "com.mysql.jdbc.exceptions.MySQLTimeoutException",
- "org.h2.command.dml.SetTypes",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.h2.jdbcx.JdbcDataSourceFactory",
- "com.mysql.jdbc.Util",
- "org.camunda.bpm.cockpit.Cockpit",
- "org.h2.value.ValueString",
- "org.h2.value.ValueJavaObject",
- "org.h2.store.PageStore",
- "com.mysql.jdbc.ConnectionPropertiesImpl$XmlMap",
- "org.h2.schema.Schema",
- "org.h2.engine.SettingsBase",
- "com.mysql.jdbc.CommunicationsException",
- "org.h2.value.CompareModeDefault",
- "org.h2.engine.SessionWithState",
- "org.h2.table.TableLinkConnection",
- "org.h2.message.Trace",
- "org.h2.engine.Comment",
- "org.h2.util.New",
- "org.camunda.bpm.engine.ProcessEngine",
- "org.h2.value.ValueInt",
- "org.h2.util.CacheWriter",
- "com.mysql.jdbc.CompressedInputStream",
- "org.h2.result.ResultInterface",
- "org.h2.util.StringUtils",
- "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
- "org.h2.table.IndexColumn",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.h2.value.CompareModeIcu4J",
- "com.mysql.jdbc.ResultSetRow",
- "com.mysql.jdbc.ConnectionImpl",
- "com.mysql.jdbc.log.NullLogger",
- "org.camunda.bpm.cockpit.db.QueryService",
- "org.camunda.bpm.engine.ProcessEngineServices",
- "com.mysql.jdbc.JDBC4PreparedStatement",
- "org.h2.schema.SchemaObject",
- "org.h2.store.FileStore",
- "org.h2.engine.SessionRemote",
- "org.h2.value.ValueUuid",
- "org.h2.mvstore.type.DataType",
- "org.h2.index.IndexType",
- "org.h2.value.ValueDate",
- "org.h2.result.SearchRow",
- "org.h2.table.Table",
- "com.att.camunda.bpm.plugin.urnmap.db.URNData",
- "org.h2.store.fs.FileMemData",
- "org.h2.value.ValueFloat",
- "org.openecomp.mso.entity.MsoRequest",
- "org.camunda.bpm.webapp.AppRuntimeDelegate",
- "org.h2.value.Transfer",
- "com.mysql.jdbc.Messages",
- "org.h2.store.fs.FileDisk",
- "com.mysql.jdbc.NetworkResources",
- "org.h2.result.RowList",
- "com.mysql.jdbc.CallableStatement$CallableStatementParamInfo",
- "org.h2.constant.ErrorCode",
- "com.mysql.jdbc.Collation",
- "org.h2.message.TraceObject",
- "com.mysql.jdbc.ByteArrayRow",
- "org.h2.store.fs.FileChannelOutputStream",
- "org.h2.value.ValueBoolean",
- "org.h2.value.ValueLobDb",
- "org.h2.util.SourceCompiler",
- "org.h2.engine.UserDataType",
- "org.h2.constraint.Constraint",
- "org.h2.table.TableBase",
- "org.h2.jdbcx.JdbcConnectionPool",
- "com.mysql.jdbc.authentication.Sha256PasswordPlugin",
- "org.h2.value.ValueLong",
- "org.h2.engine.DbObject",
- "com.mysql.jdbc.JDBC4CallableStatement",
- "org.h2.util.SortedProperties",
- "org.h2.value.ValueStringIgnoreCase",
- "org.h2.table.PlanItem",
- "org.h2.jdbcx.JdbcXAConnection",
- "org.h2.engine.UserAggregate",
- "org.h2.message.DbException",
- "com.mysql.jdbc.JDBC4ServerPreparedStatement",
- "org.h2.mvstore.MVMapConcurrent",
- "com.mysql.jdbc.Extension",
- "org.hsqldb.jdbc.JDBCDriver",
- "org.h2.engine.Database",
- "org.h2.api.DatabaseEventListener",
- "org.h2.jdbcx.JdbcDataSource",
- "org.h2.schema.TriggerObject",
- "org.h2.store.DataReader",
- "com.mysql.jdbc.StatementImpl",
- "org.hsqldb.jdbc.JDBCDriver$1",
- "org.h2.value.ValueBytes",
- "org.h2.value.ValueResultSet",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.h2.value.ValueDouble",
- "com.mysql.jdbc.CallableStatement$CallableStatementParam",
- "org.h2.schema.SchemaObjectBase",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.mysql.jdbc.StatementImpl$CancelTask$1",
- "org.h2.mvstore.Page",
- "org.h2.index.PageDelegateIndex",
- "org.h2.store.fs.FileBase",
- "com.mysql.jdbc.StatementImpl$CancelTask",
- "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
- "org.h2.message.TraceWriter",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger",
- "org.h2.table.Column",
- "org.h2.engine.Session",
- "org.h2.engine.Mode",
- "com.mysql.jdbc.exceptions.MySQLTransientException",
- "org.h2.engine.Setting",
- "org.h2.util.SourceCompiler$1",
- "org.h2.value.ValueArray",
- "com.mysql.jdbc.MySQLConnection",
- "org.h2.util.TempFileDeleter",
- "org.h2.store.fs.FileNioMem$1",
- "com.mysql.jdbc.AuthenticationPlugin",
- "org.h2.util.MathUtils",
- "org.h2.mvstore.DataUtils",
- "org.h2.store.fs.FilePathSplit",
- "org.h2.value.ValueStringFixed",
- "com.mysql.jdbc.JDBC4Connection",
- "com.mysql.jdbc.NonRegisteringDriver$1",
- "org.h2.engine.User",
- "org.h2.value.ValueTimestamp",
- "org.h2.value.Value$ValueBlob",
- "org.h2.store.fs.FilePathWrapper",
- "org.h2.constant.SysProperties",
- "com.mysql.jdbc.IterateBlock",
- "org.h2.table.RegularTable",
- "com.mysql.jdbc.Util$RandStructcture",
- "org.h2.store.fs.FileChannelInputStream",
- "com.mysql.jdbc.exceptions.MySQLStatementCancelledException",
- "com.mysql.jdbc.PreparedStatement",
- "org.h2.compress.Compressor",
- "com.mysql.jdbc.util.LRUCache",
- "com.mysql.jdbc.util.ReadAheadInputStream",
- "org.h2.index.Index",
- "com.mysql.jdbc.MysqlDataTruncation",
- "com.mysql.jdbc.CharsetMapping",
- "org.h2.store.fs.FilePathDisk",
- "org.h2.mvstore.MVMap",
- "com.mysql.jdbc.Field",
- "com.att.eelf.configuration.SLF4jWrapper",
- "com.mysql.jdbc.PreparedStatement$BatchVisitor",
- "org.h2.store.DataHandler",
- "org.h2.jdbc.JdbcConnection",
- "org.openecomp.mso.logger.MsoLogger",
- "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty",
- "com.mysql.jdbc.ConnectionProperties",
- "org.h2.Driver",
- "org.h2.engine.Role",
- "com.mysql.jdbc.Driver",
- "org.h2.value.ValueByte",
- "com.mysql.jdbc.ServerPreparedStatement",
- "org.camunda.bpm.cockpit.db.CommandExecutor",
- "com.mysql.jdbc.exceptions.MySQLNonTransientException",
- "org.camunda.bpm.cockpit.CockpitRuntimeDelegate",
- "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
- "com.mysql.jdbc.MysqlSavepoint",
- "com.mysql.jdbc.CallableStatement",
- "com.mysql.jdbc.RowData",
- "org.h2.value.Value$ValueClob",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.h2.value.ValueJavaObject$NotSerialized",
- "org.h2.value.CaseInsensitiveMap",
- "com.mysql.jdbc.CallableStatement$CallableStatementParamInfoJDBC3",
- "org.h2.util.IOUtils",
- "com.mysql.jdbc.PreparedStatement$ParseInfo",
- "org.h2.message.TraceSystem",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "com.att.eelf.configuration.EELFManager",
- "com.mysql.jdbc.StreamingNotifiable",
- "com.mysql.jdbc.ResultSetInternalMethods",
- "org.h2.command.Prepared",
- "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty",
- "com.mysql.jdbc.NonRegisteringDriver",
- "org.h2.jdbc.JdbcSQLException",
- "org.h2.mvstore.MVMap$MapBuilder",
- "org.h2.engine.ConnectionInfo",
- "com.att.eelf.i18n.EELFResourceManager$1",
- "com.mysql.jdbc.ExceptionInterceptor",
- "org.h2.value.ValueTime"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNResourceESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
- "org.camunda.bpm.cockpit.Cockpit",
- "org.h2.jdbcx.JdbcConnectionPool",
- "org.h2.message.TraceObject",
- "com.mysql.jdbc.NonRegisteringDriver",
- "com.mysql.jdbc.Driver",
- "org.hsqldb.jdbc.JDBCDriver",
- "org.h2.Driver",
- "org.h2.jdbcx.JdbcDataSource",
- "org.h2.jdbcx.JdbcDataSourceFactory",
- "org.h2.message.TraceSystem",
- "org.h2.util.Utils",
- "org.h2.util.MathUtils",
- "org.h2.constant.SysProperties",
- "org.h2.message.Trace",
- "org.h2.util.StringUtils",
- "org.h2.value.Value",
- "org.h2.value.ValueDecimal",
- "org.h2.jdbcx.JdbcXAConnection",
- "org.h2.mvstore.MVStore",
- "com.mysql.jdbc.Messages",
- "com.mysql.jdbc.ConnectionPropertiesImpl",
- "com.mysql.jdbc.Util",
- "com.mysql.jdbc.ConnectionImpl",
- "com.mysql.jdbc.JDBC4Connection",
- "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty",
- "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty",
- "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty",
- "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty",
- "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty",
- "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty",
- "com.mysql.jdbc.StringUtils",
- "com.mysql.jdbc.CharsetMapping",
- "com.mysql.jdbc.log.StandardLogger",
- "org.h2.engine.SessionRemote",
- "org.h2.mvstore.DataUtils",
- "org.h2.message.DbException",
- "org.h2.constant.ErrorCode",
- "org.h2.jdbc.JdbcSQLException",
- "org.h2.command.dml.SetTypes",
- "org.h2.engine.ConnectionInfo",
- "org.h2.engine.Database",
- "org.h2.util.BitField",
- "org.h2.engine.Mode",
- "org.h2.store.fs.FilePath",
- "org.h2.store.fs.FilePathDisk",
- "org.h2.store.fs.FilePathMem",
- "org.h2.store.fs.FilePathNioMem",
- "org.h2.store.fs.FilePathSplit",
- "org.h2.constant.DbSettings",
- "org.h2.value.CompareMode",
- "org.h2.store.FileLock",
- "org.h2.util.SortedProperties",
- "org.h2.table.Table",
- "com.mysql.jdbc.StatementImpl",
- "com.mysql.jdbc.PreparedStatement",
- "com.mysql.jdbc.MysqlIO",
- "com.mysql.jdbc.CallableStatement"
- );
- }
-}
+/**
+ * Scaffolding file used to store all the setups needed to run
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:47:41 GMT 2016
+ */
+
+package org.openecomp.camunda.bpmn.plugin.urnmap.resources;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNResourceESTestscaffolding {
+
+ @org.junit.Rule
+ public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+ private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
+
+ private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+ @BeforeClass
+ public static void initEvoSuiteFramework() {
+ org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource";
+ org.evosuite.runtime.GuiSupport.initialize();
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
+ org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
+ org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
+ org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
+ org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
+ org.evosuite.runtime.classhandling.JDKClassResetter.init();
+ initializeClasses();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ }
+
+ @AfterClass
+ public static void clearEvoSuiteFramework(){
+ Sandbox.resetDefaultSecurityManager();
+ java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
+ }
+
+ @Before
+ public void initTestCase(){
+ threadStopper.storeCurrentThreads();
+ threadStopper.startRecordingTime();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
+ org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
+
+ org.evosuite.runtime.GuiSupport.setHeadless();
+ org.evosuite.runtime.Runtime.getInstance().resetRuntime();
+ org.evosuite.runtime.agent.InstrumentingAgent.activate();
+ }
+
+ @After
+ public void doneWithTestCase(){
+ threadStopper.killAndJoinClientThreads();
+ org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
+ org.evosuite.runtime.classhandling.JDKClassResetter.reset();
+ resetClasses();
+ org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
+ org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
+ org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
+ }
+
+
+ private static void initializeClasses() {
+ org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNResourceESTestscaffolding.class.getClassLoader() ,
+ "org.h2.store.LobStorage",
+ "com.mysql.jdbc.VersionedStringProperty",
+ "com.mysql.jdbc.StatementInterceptorV2",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty",
+ "org.h2.engine.SessionInterface",
+ "org.h2.index.BaseIndex",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty",
+ "org.h2.store.fs.FileNioMemData",
+ "org.h2.store.fs.FileNioMem",
+ "org.h2.store.fs.FilePathCrypt$FileCrypt",
+ "org.h2.result.Row",
+ "org.h2.engine.RightOwner",
+ "org.h2.table.TableView",
+ "com.mysql.jdbc.JDBC4ClientInfoProvider",
+ "com.mysql.jdbc.CachedResultSetMetaData",
+ "org.h2.store.fs.FileMem$1",
+ "com.mysql.jdbc.ConnectionFeatureNotAvailableException",
+ "org.h2.security.BlockCipher",
+ "org.h2.command.CommandInterface",
+ "com.mysql.jdbc.MysqlIO",
+ "com.mysql.jdbc.Connection",
+ "com.att.eelf.i18n.EELFMsgs",
+ "com.mysql.jdbc.ConnectionPropertiesImpl",
+ "org.h2.constant.DbSettings",
+ "com.mysql.jdbc.SingleByteCharsetConverter",
+ "com.mysql.jdbc.PingTarget",
+ "org.h2.index.PageIndex",
+ "org.h2.util.BitField",
+ "org.h2.value.ValueNull",
+ "org.h2.value.ValueShort",
+ "com.mysql.jdbc.SocketFactory",
+ "org.h2.value.ValueDecimal",
+ "com.mysql.jdbc.PacketTooBigException",
+ "com.mysql.jdbc.log.StandardLogger",
+ "com.mysql.jdbc.ConnectionImpl$3",
+ "com.mysql.jdbc.ConnectionImpl$2",
+ "com.mysql.jdbc.ConnectionImpl$5",
+ "com.mysql.jdbc.ConnectionImpl$4",
+ "com.mysql.jdbc.ConnectionImpl$7",
+ "com.mysql.jdbc.ConnectionImpl$6",
+ "org.h2.util.SmallLRUCache",
+ "org.h2.mvstore.Chunk",
+ "com.mysql.jdbc.ConnectionImpl$9",
+ "com.mysql.jdbc.ConnectionImpl$8",
+ "com.mysql.jdbc.log.Log",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty",
+ "com.mysql.jdbc.StringUtils",
+ "org.h2.mvstore.MVStore",
+ "org.h2.engine.DbObjectBase",
+ "org.h2.store.FileLock",
+ "com.mysql.jdbc.ResultSetImpl",
+ "org.h2.schema.Sequence",
+ "org.h2.value.Value",
+ "org.h2.store.fs.FilePathMem",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty",
+ "org.h2.store.fs.FilePath",
+ "org.h2.engine.DatabaseCloser",
+ "org.h2.expression.ExpressionColumn",
+ "com.mysql.jdbc.Statement",
+ "com.mysql.jdbc.Buffer",
+ "org.h2.store.fs.FilePathNioMem",
+ "com.mysql.jdbc.ParameterBindings",
+ "org.h2.security.SecureFileStore",
+ "org.h2.store.fs.FileMem",
+ "com.mysql.jdbc.BufferRow",
+ "org.h2.expression.Expression",
+ "org.h2.store.fs.FileSplit",
+ "org.h2.util.Utils$1",
+ "org.h2.value.CompareMode",
+ "org.h2.util.Utils",
+ "com.mysql.jdbc.exceptions.MySQLTimeoutException",
+ "org.h2.command.dml.SetTypes",
+ "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+ "org.h2.jdbcx.JdbcDataSourceFactory",
+ "com.mysql.jdbc.Util",
+ "org.camunda.bpm.cockpit.Cockpit",
+ "org.h2.value.ValueString",
+ "org.h2.value.ValueJavaObject",
+ "org.h2.store.PageStore",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$XmlMap",
+ "org.h2.schema.Schema",
+ "org.h2.engine.SettingsBase",
+ "com.mysql.jdbc.CommunicationsException",
+ "org.h2.value.CompareModeDefault",
+ "org.h2.engine.SessionWithState",
+ "org.h2.table.TableLinkConnection",
+ "org.h2.message.Trace",
+ "org.h2.engine.Comment",
+ "org.h2.util.New",
+ "org.camunda.bpm.engine.ProcessEngine",
+ "org.h2.value.ValueInt",
+ "org.h2.util.CacheWriter",
+ "com.mysql.jdbc.CompressedInputStream",
+ "org.h2.result.ResultInterface",
+ "org.h2.util.StringUtils",
+ "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
+ "org.h2.table.IndexColumn",
+ "org.openecomp.mso.logger.MsoLogger$Catalog",
+ "org.h2.value.CompareModeIcu4J",
+ "com.mysql.jdbc.ResultSetRow",
+ "com.mysql.jdbc.ConnectionImpl",
+ "com.mysql.jdbc.log.NullLogger",
+ "org.camunda.bpm.cockpit.db.QueryService",
+ "org.camunda.bpm.engine.ProcessEngineServices",
+ "com.mysql.jdbc.JDBC4PreparedStatement",
+ "org.h2.schema.SchemaObject",
+ "org.h2.store.FileStore",
+ "org.h2.engine.SessionRemote",
+ "org.h2.value.ValueUuid",
+ "org.h2.mvstore.type.DataType",
+ "org.h2.index.IndexType",
+ "org.h2.value.ValueDate",
+ "org.h2.result.SearchRow",
+ "org.h2.table.Table",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData",
+ "org.h2.store.fs.FileMemData",
+ "org.h2.value.ValueFloat",
+ "org.openecomp.mso.entity.MsoRequest",
+ "org.camunda.bpm.webapp.AppRuntimeDelegate",
+ "org.h2.value.Transfer",
+ "com.mysql.jdbc.Messages",
+ "org.h2.store.fs.FileDisk",
+ "com.mysql.jdbc.NetworkResources",
+ "org.h2.result.RowList",
+ "com.mysql.jdbc.CallableStatement$CallableStatementParamInfo",
+ "org.h2.constant.ErrorCode",
+ "com.mysql.jdbc.Collation",
+ "org.h2.message.TraceObject",
+ "com.mysql.jdbc.ByteArrayRow",
+ "org.h2.store.fs.FileChannelOutputStream",
+ "org.h2.value.ValueBoolean",
+ "org.h2.value.ValueLobDb",
+ "org.h2.util.SourceCompiler",
+ "org.h2.engine.UserDataType",
+ "org.h2.constraint.Constraint",
+ "org.h2.table.TableBase",
+ "org.h2.jdbcx.JdbcConnectionPool",
+ "com.mysql.jdbc.authentication.Sha256PasswordPlugin",
+ "org.h2.value.ValueLong",
+ "org.h2.engine.DbObject",
+ "com.mysql.jdbc.JDBC4CallableStatement",
+ "org.h2.util.SortedProperties",
+ "org.h2.value.ValueStringIgnoreCase",
+ "org.h2.table.PlanItem",
+ "org.h2.jdbcx.JdbcXAConnection",
+ "org.h2.engine.UserAggregate",
+ "org.h2.message.DbException",
+ "com.mysql.jdbc.JDBC4ServerPreparedStatement",
+ "org.h2.mvstore.MVMapConcurrent",
+ "com.mysql.jdbc.Extension",
+ "org.hsqldb.jdbc.JDBCDriver",
+ "org.h2.engine.Database",
+ "org.h2.api.DatabaseEventListener",
+ "org.h2.jdbcx.JdbcDataSource",
+ "org.h2.schema.TriggerObject",
+ "org.h2.store.DataReader",
+ "com.mysql.jdbc.StatementImpl",
+ "org.hsqldb.jdbc.JDBCDriver$1",
+ "org.h2.value.ValueBytes",
+ "org.h2.value.ValueResultSet",
+ "com.att.eelf.i18n.EELFResolvableErrorEnum",
+ "org.h2.value.ValueDouble",
+ "com.mysql.jdbc.CallableStatement$CallableStatementParam",
+ "org.h2.schema.SchemaObjectBase",
+ "com.att.eelf.configuration.EELFLogger$Level",
+ "com.mysql.jdbc.StatementImpl$CancelTask$1",
+ "org.h2.mvstore.Page",
+ "org.h2.index.PageDelegateIndex",
+ "org.h2.store.fs.FileBase",
+ "com.mysql.jdbc.StatementImpl$CancelTask",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource",
+ "org.h2.message.TraceWriter",
+ "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+ "com.att.eelf.configuration.EELFLogger",
+ "org.h2.table.Column",
+ "org.h2.engine.Session",
+ "org.h2.engine.Mode",
+ "com.mysql.jdbc.exceptions.MySQLTransientException",
+ "org.h2.engine.Setting",
+ "org.h2.util.SourceCompiler$1",
+ "org.h2.value.ValueArray",
+ "com.mysql.jdbc.MySQLConnection",
+ "org.h2.util.TempFileDeleter",
+ "org.h2.store.fs.FileNioMem$1",
+ "com.mysql.jdbc.AuthenticationPlugin",
+ "org.h2.util.MathUtils",
+ "org.h2.mvstore.DataUtils",
+ "org.h2.store.fs.FilePathSplit",
+ "org.h2.value.ValueStringFixed",
+ "com.mysql.jdbc.JDBC4Connection",
+ "com.mysql.jdbc.NonRegisteringDriver$1",
+ "org.h2.engine.User",
+ "org.h2.value.ValueTimestamp",
+ "org.h2.value.Value$ValueBlob",
+ "org.h2.store.fs.FilePathWrapper",
+ "org.h2.constant.SysProperties",
+ "com.mysql.jdbc.IterateBlock",
+ "org.h2.table.RegularTable",
+ "com.mysql.jdbc.Util$RandStructcture",
+ "org.h2.store.fs.FileChannelInputStream",
+ "com.mysql.jdbc.exceptions.MySQLStatementCancelledException",
+ "com.mysql.jdbc.PreparedStatement",
+ "org.h2.compress.Compressor",
+ "com.mysql.jdbc.util.LRUCache",
+ "com.mysql.jdbc.util.ReadAheadInputStream",
+ "org.h2.index.Index",
+ "com.mysql.jdbc.MysqlDataTruncation",
+ "com.mysql.jdbc.CharsetMapping",
+ "org.h2.store.fs.FilePathDisk",
+ "org.h2.mvstore.MVMap",
+ "com.mysql.jdbc.Field",
+ "com.att.eelf.configuration.SLF4jWrapper",
+ "com.mysql.jdbc.PreparedStatement$BatchVisitor",
+ "org.h2.store.DataHandler",
+ "org.h2.jdbc.JdbcConnection",
+ "org.openecomp.mso.logger.MsoLogger",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty",
+ "com.mysql.jdbc.ConnectionProperties",
+ "org.h2.Driver",
+ "org.h2.engine.Role",
+ "com.mysql.jdbc.Driver",
+ "org.h2.value.ValueByte",
+ "com.mysql.jdbc.ServerPreparedStatement",
+ "org.camunda.bpm.cockpit.db.CommandExecutor",
+ "com.mysql.jdbc.exceptions.MySQLNonTransientException",
+ "org.camunda.bpm.cockpit.CockpitRuntimeDelegate",
+ "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
+ "com.mysql.jdbc.MysqlSavepoint",
+ "com.mysql.jdbc.CallableStatement",
+ "com.mysql.jdbc.RowData",
+ "org.h2.value.Value$ValueClob",
+ "com.att.eelf.i18n.EELFResourceManager",
+ "org.h2.value.ValueJavaObject$NotSerialized",
+ "org.h2.value.CaseInsensitiveMap",
+ "com.mysql.jdbc.CallableStatement$CallableStatementParamInfoJDBC3",
+ "org.h2.util.IOUtils",
+ "com.mysql.jdbc.PreparedStatement$ParseInfo",
+ "org.h2.message.TraceSystem",
+ "org.openecomp.mso.logger.MessageEnum",
+ "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+ "org.openecomp.mso.logger.MsoLogger$StatusCode",
+ "com.att.eelf.configuration.EELFManager",
+ "com.mysql.jdbc.StreamingNotifiable",
+ "com.mysql.jdbc.ResultSetInternalMethods",
+ "org.h2.command.Prepared",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty",
+ "com.mysql.jdbc.NonRegisteringDriver",
+ "org.h2.jdbc.JdbcSQLException",
+ "org.h2.mvstore.MVMap$MapBuilder",
+ "org.h2.engine.ConnectionInfo",
+ "com.att.eelf.i18n.EELFResourceManager$1",
+ "com.mysql.jdbc.ExceptionInterceptor",
+ "org.h2.value.ValueTime"
+ );
+ }
+
+ private static void resetClasses() {
+ org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNResourceESTestscaffolding.class.getClassLoader());
+
+ org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+ "org.openecomp.mso.logger.MsoLogger$Catalog",
+ "org.openecomp.mso.logger.MsoLogger",
+ "com.att.eelf.i18n.EELFResourceManager",
+ "com.att.eelf.i18n.EELFMsgs",
+ "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+ "com.att.eelf.configuration.EELFLogger$Level",
+ "com.att.eelf.configuration.EELFManager",
+ "org.openecomp.mso.logger.MessageEnum",
+ "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource",
+ "org.camunda.bpm.cockpit.Cockpit",
+ "org.h2.jdbcx.JdbcConnectionPool",
+ "org.h2.message.TraceObject",
+ "com.mysql.jdbc.NonRegisteringDriver",
+ "com.mysql.jdbc.Driver",
+ "org.hsqldb.jdbc.JDBCDriver",
+ "org.h2.Driver",
+ "org.h2.jdbcx.JdbcDataSource",
+ "org.h2.jdbcx.JdbcDataSourceFactory",
+ "org.h2.message.TraceSystem",
+ "org.h2.util.Utils",
+ "org.h2.util.MathUtils",
+ "org.h2.constant.SysProperties",
+ "org.h2.message.Trace",
+ "org.h2.util.StringUtils",
+ "org.h2.value.Value",
+ "org.h2.value.ValueDecimal",
+ "org.h2.jdbcx.JdbcXAConnection",
+ "org.h2.mvstore.MVStore",
+ "com.mysql.jdbc.Messages",
+ "com.mysql.jdbc.ConnectionPropertiesImpl",
+ "com.mysql.jdbc.Util",
+ "com.mysql.jdbc.ConnectionImpl",
+ "com.mysql.jdbc.JDBC4Connection",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty",
+ "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty",
+ "com.mysql.jdbc.StringUtils",
+ "com.mysql.jdbc.CharsetMapping",
+ "com.mysql.jdbc.log.StandardLogger",
+ "org.h2.engine.SessionRemote",
+ "org.h2.mvstore.DataUtils",
+ "org.h2.message.DbException",
+ "org.h2.constant.ErrorCode",
+ "org.h2.jdbc.JdbcSQLException",
+ "org.h2.command.dml.SetTypes",
+ "org.h2.engine.ConnectionInfo",
+ "org.h2.engine.Database",
+ "org.h2.util.BitField",
+ "org.h2.engine.Mode",
+ "org.h2.store.fs.FilePath",
+ "org.h2.store.fs.FilePathDisk",
+ "org.h2.store.fs.FilePathMem",
+ "org.h2.store.fs.FilePathNioMem",
+ "org.h2.store.fs.FilePathSplit",
+ "org.h2.constant.DbSettings",
+ "org.h2.value.CompareMode",
+ "org.h2.store.FileLock",
+ "org.h2.util.SortedProperties",
+ "org.h2.table.Table",
+ "com.mysql.jdbc.StatementImpl",
+ "com.mysql.jdbc.PreparedStatement",
+ "com.mysql.jdbc.MysqlIO",
+ "com.mysql.jdbc.CallableStatement"
+ );
+ }
+}
diff --git a/bpmn/pom.xml b/bpmn/pom.xml
index ca9d69c5bc..ed062ba1c3 100644
--- a/bpmn/pom.xml
+++ b/bpmn/pom.xml
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -13,30 +13,30 @@
<name>BPMN Subsystem</name>
<description>BPMN Subsystem for MSO</description>
<packaging>pom</packaging>
-
+
<properties>
- <camunda.version>7.3.0</camunda.version>
+ <camunda.version>7.6.0</camunda.version>
<camunda.bpm.assert.version>1.2</camunda.bpm.assert.version>
<h2.version>1.3.173</h2.version>
<groovy.version>2.4.7</groovy.version>
<saxon.version>9.5.1-8</saxon.version>
- <junit.version>4.11</junit.version>
<xmlunit.version>1.6</xmlunit.version>
-
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-
+
</properties>
<modules>
<module>MSOCoreBPMN</module>
+ <module>MSOMockServer</module>
<module>MSORESTClient</module>
- <module>MSOGammaBPMN</module>
+ <module>MSOCommonBPMN</module>
+ <module>MSOInfrastructureBPMN</module>
<module>MSOURN-plugin</module>
<module>MSOCockpit</module>
-
- </modules>
-
+ </modules>
+
<!-- Define artifact versions for child modules -->
<dependencyManagement>
<dependencies>
@@ -68,11 +68,6 @@
<version>${saxon.version}</version>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- </dependency>
- <dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>${xmlunit.version}</version>
@@ -90,7 +85,7 @@
</dependency>
</dependencies>
</dependencyManagement>
-
+
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
@@ -101,18 +96,26 @@
<artifactId>httpclient</artifactId>
</dependency>
</dependencies>
-
+
<build>
<plugins>
-
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
- <testFailureIgnore>true</testFailureIgnore>
+ <testFailureIgnore>false</testFailureIgnore>
<argLine>-Xss1m @{argLine}</argLine>
+ <properties>
+ <property>
+ <!-- disabling project default evosuite listener-->
+ <name>usedefaultlisteners</name>
+ <value>true</value>
+ </property>
+ </properties>
</configuration>
+
<!-- <configuration>
<testFailureIgnore>true</testFailureIgnore>
<forkCount>1</forkCount>
@@ -152,7 +155,7 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
-
+
</plugins>
</pluginManagement>
</build>